Re: Question on asmlinkage

2008-02-04 Thread Peter Teoh
Just a few pointers for everyone to look further: a. kernel space is (for Intel x86) Ring0, and userspace is Ring3, and so when u make transition between these two - u are subjected to HARDWARE control on how the stack space can be used. So Intel manual (System Programming 3a specifically) is

Re: Question on asmlinkage

2008-01-17 Thread Rene Herman
On 16-01-08 13:02, Mulyadi Santosa wrote: Arg! I confused you...sorry! yeah after 2nd thought, it should be on stack, because registers are clobbered during context switch /me takes this opportunity to confuse the discussion further... No they aren't. The stack _is_ switched though.

Re: Question on asmlinkage

2008-01-16 Thread Octavian Purdila
On Wednesday 16 January 2008, srinivas bakki wrote: > > No they aren't. The stack _is_ switched though. > > And how do the arguments reach the kernel stack from the user space if they > were supposed to be fetched from the stack ? > > The arguments come from userspace in registers. The exception

Re: Question on asmlinkage

2008-01-16 Thread srinivas bakki
> > No they aren't. The stack _is_ switched though. And how do the arguments reach the kernel stack from the user space if they were supposed to be fetched from the stack ? Srinivas

Re: Question on asmlinkage

2008-01-16 Thread Mulyadi Santosa
hi... On Jan 16, 2008 6:56 PM, sahlot arvind <[EMAIL PROTECTED]> wrote: > Thanks. > @ Mulyadi > > >don't expect arguments on stack. > > > http://kernelnewbies.org/FAQ/asmlinkage > Just a correction - the link above says "dont expect args in registers but > only on stack". Arg! I confused you.

Re: Question on asmlinkage

2008-01-16 Thread sahlot arvind
Thanks. @ Mulyadi >don't expect arguments on stack. http://kernelnewbies.org/FAQ/asmlinkage Just a correction - the link above says "dont expect args in registers but only on stack". Cheers! On 1/16/08, Mahaveer Darade <[EMAIL PROTECTED]> wrote: > > Hi > > please refer this link > http://kernel

Re: Question on asmlinkage

2008-01-16 Thread Mahaveer Darade
Hi please refer this link http://kernelnewbies.org/FAQ/asmlinkage On Jan 16, 2008 5:05 PM, Mulyadi Santosa <[EMAIL PROTECTED]> wrote: > Hi > > On Jan 16, 2008 6:27 PM, sahlot arvind <[EMAIL PROTECTED]> wrote: > > I am seeing lot of funtions prefixed with "asmlinkage". > > Shall I assume that an

Re: Question on asmlinkage

2008-01-16 Thread Mulyadi Santosa
Hi On Jan 16, 2008 6:27 PM, sahlot arvind <[EMAIL PROTECTED]> wrote: > I am seeing lot of funtions prefixed with "asmlinkage". > Shall I assume that any defined function prefixed with "asmlinkage" is > System Call? > > BTW what is "asmlinkage"? don't expect arguments on stack. regards, Mulyadi.

Question on asmlinkage

2008-01-16 Thread sahlot arvind
I am seeing lot of funtions prefixed with "asmlinkage". Shall I assume that any defined function prefixed with "asmlinkage" is System Call? BTW what is "asmlinkage"? Thanks - A.