[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Access user stack in kernel mode



Hi,

I have a program that invokes system calls in a manner different from what Linux expects. The arguments for the system call are stored on the user-stack (just like arguments for a normal function call), not on the registers. After the system call is invoked (through an interrupt, not 0x80, but a different number) - what must I do in my interrupt handler to access the arguments that were put on the user stack?

As I understand, the moment an interrupt is invoked, we are in kernel- mode. There are a few macros like __get_user_X that can be used to copy data from user-space, but how do I find the addresses of the arguments on the stack? Note that the initial code for the interrupt handler has to be assembly.

Thanks in advance.

Cheers,
Anant


-- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ