An in-kernel file loading interface
An in-kernel file loading interface
Posted Feb 18, 2016 8:25 UTC (Thu) by eru (subscriber, #2753)Parent article: An in-kernel file loading interface
Hasn't the kernel always been able to read files for implementing exec? I never thought there is anything special in kernel reading files. (But then, I am not a kernel programmer).
Posted Feb 21, 2016 0:20 UTC (Sun)
by giraffedata (guest, #1954)
[Link]
Yes, and the kernel has always been able to read files for implementing read, too :-)
Exec is essentially a file operation (it even has its own file permission bit). That puts it in a different class from kernel facilities that use files. The latter smells of a layering violation.
Posted Feb 21, 2016 2:09 UTC (Sun)
by anselm (subscriber, #2796)
[Link] (3 responses)
I was under the impression that what exec() does with files is more closely related to mmap() than to read().
Posted Feb 21, 2016 11:43 UTC (Sun)
by PaXTeam (guest, #24616)
[Link] (2 responses)
Posted Feb 21, 2016 11:54 UTC (Sun)
by anselm (subscriber, #2796)
[Link] (1 responses)
Makes sense to me (thank you for the clarification).
The important point as far as I'm concerned is that the kernel doesn't “read” a large executable into memory in its entirety before it is started, but maps it into memory and fetches pages from the file as required according to page faults arising from running the code.
Posted Feb 21, 2016 13:29 UTC (Sun)
by PaXTeam (guest, #24616)
[Link]
An in-kernel file loading interface
Hasn't the kernel always been able to read files for implementing exec? I never thought there is anything special in kernel reading files.
An in-kernel file loading interface
An in-kernel file loading interface
An in-kernel file loading interface
An in-kernel file loading interface
