Re: Invoking a system call from within the kernel

2017-11-19 Thread Greg KH
On Sat, Nov 18, 2017 at 02:09:31PM -0500, Demi Marie Obenour wrote: > Async system calls move the thread pool to the kernel. The kernel has > system-wide information and perform optimizations regarding e.g. > scheduling and threadpool size that userspace cannot. Furthermore, > the kernel

Re: Invoking a system call from within the kernel

2017-11-18 Thread valdis . kletnieks
On Sat, 18 Nov 2017 14:09:31 -0500, Demi Marie Obenour said: > Only whitelisted system calls would be allowed, such as open(), read(), > and write(). Async getuid() would not be allowed. Nor would async > exit() or exit_group(). You missed the point - If you allow async calls, you need to deal

Re: Invoking a system call from within the kernel

2017-11-18 Thread valdis . kletnieks
On Sat, 18 Nov 2017 13:15:27 -0500, Demi Marie Obenour said: > However, the ioctl I actually want to implement (see above) does the > system call asynchronously. That isn’t possible using the existing > APIs. Ever consider that it's because there's no clear semantics to what executing an

Re: Invoking a system call from within the kernel

2017-11-18 Thread Demi Marie Obenour
On Thu, Nov 16, 2017 at 10:54:24AM +0100, Greg KH wrote: > On Wed, Nov 15, 2017 at 09:16:35PM -0500, Demi Marie Obenour wrote: > > I am looking to write my first driver. This driver will create a single > > character device, which can be opened by any user. The device will > > support one

Re: Invoking a system call from within the kernel

2017-11-16 Thread Greg KH
On Wed, Nov 15, 2017 at 09:16:35PM -0500, Demi Marie Obenour wrote: > I am looking to write my first driver. This driver will create a single > character device, which can be opened by any user. The device will > support one ioctl: > > long ioctl_syscall(int fd, long syscall, long