Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12368

Where is source code for linux kernel syscall service routines?

$
0
0

My understanding of a syscall (high level) workflow is:

  1. User calls libc wrapper
  2. wrapper puts syscall number and arguments in the right place, registers or stack
  3. wrapper executes syscall or int 0x80 instruction
  4. kernel interrupt handler calls sys_xxx() service routine

If that is the case, then there should be a bunch of sys_xxx() functions in kernel source. For example, for read(), in kernel 2.6 code, I found sys_read. However, in kernel 5.4 code, I did not find such service routine code, the only sys_read I found is acting like a drop in replacement for the libc wrapper. So I am confused..

A related question - the reason that kernel puts the implementation in sys_xxx() is that kernel space can also call these functions, is that correct?


Viewing all articles
Browse latest Browse all 12368

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>