ioctl() and sysctl()
Matthew Dillon
dillon at apollo.backplane.com
Wed Nov 12 22:03:32 PST 2003
:I'm at the point where I have to touch ioctl() and sysctl() to finish
:my work on stackgap removal from the linux emulator and separation of
:COMPAT_43 from the main tree.
:
:The ioctl() syscall is emulated by in the linuxolator and involves a
:stackgap allocation when servicing the LINUX_CDROMSUBCHNL ioctl().
:In order to remedy the problem, I have to get rid of deep
:copyin()/copyout()'s. For example, the smb device has the following
:ioctl() cmd structure:
:
It may not be possible to remove the deep copyin and copyout ops
from ioctl but it ought to be possible to augment the interface to
supply an optional callback function that the emulation code can
supply.
e.g. so keep the copyin's and copyout's pretty much as they are and
call them if the callback function is NULL. If the callback function is
not NULL call the ioctl code would call the callback function instead.
This way we only have to mess around with ioctl's related to linux emulated
calls in order to get rid of the linux emulation's stackgap.
-Matt
More information about the Kernel
mailing list