Messages in this thread | | | Date | Tue, 19 Oct 1999 12:04:57 +0200 | From | Matthew Wilcox <> | Subject | Re: access_ok inside kernelspace |
| |
On Tue, Oct 19, 1999 at 10:30:44AM +0100, Tigran Aivazian wrote: > On Tue, 19 Oct 1999, Ingo Molnar wrote: > > ... provided you are using/setting set_fs()/get_fs() properly. You'll > > obviously not go through the system call handler but call sys_open() or > > whatever directly from within kernel space. > > calling sys_function() functions directly doesn't look right: > > 1. what if one was to do some accounting of the system calls. Not going > through the int 0x80 would break this.
This is arguable. The kernel is allowed to do whatever it likes; why should it be accounted for? It's free to do all the actions which sys_close does; why should it have to go through the syscall handler?
> 2. what if one were to temporarily redirect some system calls to another > handler (like timetravel.o module does).
This is lying to userspace, not to the rest of the kernel.
> Matthew, if, as you say a specific Linux port disallows that, how are you > going to handle kernel/kmod.c and all the other occurrences where > _syscallX() is used from kernel space?
Submit a patch to turn them all into sys_foo() instead.
-- Matthew Wilcox <willy@bofh.ai> "Windows and MacOS are products, contrived by engineers in the service of specific companies. Unix, by contrast, is not so much a product as it is a painstakingly compiled oral history of the hacker subculture." - N Stephenson
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |