Why is there conflicting information out there for asmlinkage ?

Valentin Vidić vvidic at valentin-vidic.from.hr
Wed May 6 14:34:37 EDT 2020


On Wed, May 06, 2020 at 06:21:54PM +0530, Sreyan Chakravarty wrote:
> I thought that all C programs normally use the stack for function calls.
> That's why in most languages if you are stuck in an infinite recursion you
> get a "Stack Overflow Error".

Not really, depends on the calling convention used. For example:

  https://en.wikipedia.org/wiki/X86_calling_conventions#System_V_AMD64_ABI

first six parameters are passed using registers.

For system calls it is similar:

  http://man7.org/linux/man-pages/man2/syscall.2.html

-- 
Valentin



More information about the Kernelnewbies mailing list