The HyperNews Linux KHG Discussion Pages

Ok: Make a syscall despite of wrong fs!!

Forum: The Linux Kernel Hackers' Guide
Re: Question Can I make syscall from inside a kernel module? (Shawn Chang)
Re: Feedback Re: Can I make syscall from inside a kernel module? (Massoud Asgharifard)
Keywords: syscall, module, fs
Date: Fri, 23 Jan 1998 12:00:16 GMT
From: Mikhail Kourinny <misio@kurin.kharkov.ua>

Yes, despite of fs pointing to wrong place. There are functions somewhere in the kernel named put_fs and get_fs. Using these functions you should place KERNEL_DS in fs. And after syscall restore it, certainly. You can avoid it if you don't pass user space pointers a paramters, IMHO.

Regards, Mikhail