Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1221689

Re: [PATCH 0/3] kobject: support namespace aware udev

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH 0/3] kobject: support namespace aware udev
Date 2015-09-09 22:10 +0200
Message-ID <q6TQS-4VR-19@gated-at.bofh.it> (permalink)
References <q6Dj4-6hq-3@gated-at.bofh.it> <q6Si6-2Bs-21@gated-at.bofh.it> <q6SUO-3A4-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Sep 09, 2015 at 03:05:29PM -0400, Michael J Coss wrote:
> On 9/8/2015 11:54 PM, Greg KH wrote:
> > On Tue, Sep 08, 2015 at 10:10:27PM -0400, Michael J. Coss wrote:
> >> Currently when a uevent occurs, the event is replicated and sent to every
> >> listener on the kernel netlink socket, ignoring network namespaces boundaries,
> >> forwarding events to every listener in every network namespace.
> >>
> >> With the expanded use of containers, it would be useful to be able to
> >> regulate this flow of events to specific containers.  By restricting
> >> the events to only the host network namespace, it allows for a userspace
> >> program to provide a system wide policy on which events are routed where.
> > Interesting, but why do you need a container to get a uevent at all?
> > What uevents do a container care about?
> >
> > thanks,
> >
> > greg k-h
> >
> In our use case, we run a full desktop inside the container, including
> X.

Ugh, I was worried you were going to say that :(

> We run the Xserver in headless mode, and forward a uevent to the
> container to allow binding/unbinding of remote keyboard, mice, and
> displays.   So I want the add/del keyboard events, add/del mouse events,
> and add/del display events. This is just one use case, I could image
> others.  The bottom line is that the current behavior is to broadcast to
> everyone all uevents, and I don't see that as correct as it crosses the
> network namespace boundaries.  It seems to me that you would want to
> provide controls as to  where you want to forward those uevents, and
> that is not a policy that I believe should be in the kernel but rather
> in user space.

devices are not in namespaces, which is why we don't partition them off
at all.  And that's why I really don't want to add this type of
filtering either.  It's up to the "master" container/process/whatever to
send uevents to child containers if it really wants to.  If we were to
ever have devices bound only to namespaces, then it would make sense to
only send the uevents for those devices to that namespace.

But as that's never going to happen, I don't want to give people a false
sense of "separation" here that isn't really there at all.

sorry,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] kobject: support namespace aware udev "Michael J. Coss" <michael.coss@alcatel-lucent.com> - 2015-09-09 04:30 +0200
  [PATCH 3/3] net/udevns: Netlink module to forward uevent to containers "Michael J. Coss" <michael.coss@alcatel-lucent.com> - 2015-09-09 04:30 +0200
    Re: [PATCH 3/3] net/udevns: Netlink module to forward uevent to containers ebiederm@xmission.com (Eric W. Biederman) - 2015-09-11 03:20 +0200
      Re: [PATCH 3/3] net/udevns: Netlink module to forward uevent to  containers Michael J Coss <michael.coss@alcatel-lucent.com> - 2015-09-11 21:10 +0200
  [PATCH 2/3] lib/kobject_uevent.c: add uevent forwarding function "Michael J. Coss" <michael.coss@alcatel-lucent.com> - 2015-09-09 04:30 +0200
    Re: [PATCH 2/3] lib/kobject_uevent.c: add uevent forwarding function Greg KH <gregkh@linuxfoundation.org> - 2015-09-09 20:30 +0200
      Re: [PATCH 2/3] lib/kobject_uevent.c: add uevent forwarding function Michael J Coss <michael.coss@alcatel-lucent.com> - 2015-09-09 21:30 +0200
        Re: [PATCH 2/3] lib/kobject_uevent.c: add uevent forwarding function Greg KH <gregkh@linuxfoundation.org> - 2015-09-09 22:20 +0200
          Re: [PATCH 2/3] lib/kobject_uevent.c: add uevent forwarding function Amir Goldstein <amir@cellrox.com> - 2015-09-10 07:50 +0200
            Re: [PATCH 2/3] lib/kobject_uevent.c: add uevent forwarding function Greg KH <gregkh@linuxfoundation.org> - 2015-09-10 08:00 +0200
    Re: [PATCH 2/3] lib/kobject_uevent.c: add uevent forwarding function ebiederm@xmission.com (Eric W. Biederman) - 2015-09-11 03:10 +0200
      Re: [COMMERCIAL] Re: [PATCH 2/3] lib/kobject_uevent.c: add uevent  forwarding function Michael J Coss <michael.coss@alcatel-lucent.com> - 2015-09-11 20:50 +0200
  [PATCH 1/3] lib/kobject_uevent.c: disable broadcast of uevents to other namespaces "Michael J. Coss" <michael.coss@alcatel-lucent.com> - 2015-09-09 04:30 +0200
    Re: [PATCH 1/3] lib/kobject_uevent.c: disable broadcast of uevents to other namespaces ebiederm@xmission.com (Eric W. Biederman) - 2015-09-11 02:50 +0200
      Re: [PATCH 1/3] lib/kobject_uevent.c: disable broadcast of uevents to  other namespaces Michael J Coss <michael.coss@alcatel-lucent.com> - 2015-09-11 20:30 +0200
  Re: [PATCH 0/3] kobject: support namespace aware udev Greg KH <gregkh@linuxfoundation.org> - 2015-09-09 20:30 +0200
    Re: [PATCH 0/3] kobject: support namespace aware udev Michael J Coss <michael.coss@alcatel-lucent.com> - 2015-09-09 21:10 +0200
      Re: [PATCH 0/3] kobject: support namespace aware udev Greg KH <gregkh@linuxfoundation.org> - 2015-09-09 22:10 +0200
        Re: [PATCH 0/3] kobject: support namespace aware udev Michael J Coss <michael.coss@alcatel-lucent.com> - 2015-09-09 22:20 +0200
          Re: [PATCH 0/3] kobject: support namespace aware udev Greg KH <gregkh@linuxfoundation.org> - 2015-09-09 22:30 +0200
            Re: [COMMERCIAL] Re: [PATCH 0/3] kobject: support namespace aware  udev Michael J Coss <michael.coss@alcatel-lucent.com> - 2015-09-09 23:00 +0200
              Re: [COMMERCIAL] Re: [PATCH 0/3] kobject: support namespace aware  udev Greg KH <gregkh@linuxfoundation.org> - 2015-09-10 07:30 +0200

csiph-web