Re: [RFC v2 10/16] luo: luo_ioctl: add ioctl interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 14, 2025 at 11:34:43AM -0300, Jason Gunthorpe wrote:
> On Thu, Jul 10, 2025 at 10:26:45AM +0300, Mike Rapoport wrote:
> > IIUC Christian's point was mostly not about using VFS APIs (i.e.
> > read/write) but about using a special pseudo fs rather than devtmpfs to
> > drive ioctls.
> >  
> > So instead of 
> > 
> > 	fd = open("/dev/liveupdate", ...);
> > 	ioctl(fd, ...);
> > 
> > we'd use
> > 
> > 	fd = open("/sys/fs/kexec/control", ...);
> > 	ioctl(fd, ...);
> 
> Please no, /sys/ is much worse.
> 
> /dev/ has lots of infrastructure to control permissions/etc that /sys/
> does not.
> 
> If you want to do ioctls to something that you open() is a character
> dev and you accept the limitations with namespaces, coarse permissions
> and so on.

Then use a special filesystem, and not sysfs.  It's easy to embed a
virtual filesystem in a driver, please do that instead.

thanks,

greg k-h




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux