Re: asmlinkage

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

 



> You are probably confusing the user-space and the kernel-space side of
> the thing. On the user-side, the wrapper takes arguments from the stack
> and loads them to the registers. And calls the trap. Now the kernel
> parts comes to play. It does some setup and calls the sys_* function.
> But the arguments are still in registers. So the asmlinkage tells the
> compiler, that the function will have the args in registers and not on
> the stack, as would be expected for C function.

Isnt it the other way around .... when the sys_* function is called .. the 
arguments are on the stack .... the syscall handler saves the register 
arguments (SAVE_ALL) and then invokes the actual syscall .... asmlinkage 
means that the arguments are on the stack and not in registers .... plz 
correct me if i am wrong.

Bijoy.


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux