Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Smile check my view on syscall, asmlinkage?


    please review my statement to check out whether it is right or not? thanks.

    this topic is about syscall.
    when i invoke a syscall, the parameters are passed through at most 5 registers. so we call access parameters through registers. but, all the syscall implementations routines (sys.c) are started with asmlinkage, which means the functions should get parameters from cpu stack rather than registers. so, are all the parameters in registers pushed into cpu stack when the syscall enters enter.S or somewhere?

    anything special about asmlikage?

  2. #2
    I think when you make syscall, kernel also has to switch to its kernel mode stack too.

  3. #3
    in case of more than 5 params, I think register ebx will be pointing to the memory where parameters can be found, I think that could be stack.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •