Re: [PATCH 6/9] Add a general, global device notification watch list [ver #5]

From
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date
2019-07-03 17:16:32
Also in
keyrings, linux-block, linux-fsdevel, linux-security-module, linux-usb, lkml
Reply to
David Howells, 2019-06-28
On Fri, Jun 28, 2019 at 04:49:30PM +0100, David Howells wrote:
Create a general, global watch list that can be used for the posting of
device notification events, for such things as device attachment,
detachment and errors on sources such as block devices and USB devices.
This can be enabled with:

	CONFIG_DEVICE_NOTIFICATIONS

To add a watch on this list, an event queue must be created and configured:

        fd = open("/dev/event_queue", O_RDWR);
        ioctl(fd, IOC_WATCH_QUEUE_SET_SIZE, page_size << n);

and then a watch can be placed upon it using a system call:

        watch_devices(fd, 12, 0);

Unless the application wants to receive all events, it should employ
appropriate filters.
What "filter"?  Who is going to use this and why a new system call for
this?  You can do this today with udev/netlink/hotplug/whatever so why
create yet-another-way?

I don't think this is a good idea unless we really nail down the api and
who is going to be using it.

thanks,

greg k-h
Thread (22 messages) 22 messages, 4 authors, last reply 2019-07-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help