Re: FYI: Userland breakage caused by udev bind commit

From: Christian Brauner
Date: Mon Dec 24 2018 - 13:42:13 EST


On Mon, Dec 24, 2018 at 10:28:20AM -0800, Linus Torvalds wrote:
> On Mon, Dec 24, 2018 at 10:13 AM Christian Brauner <christian@xxxxxxxxxx> wrote:
> >
> > So one possibility is to add a socket option for lib/kobject_uevent.c
> > that can be set via setsockopt. We did something like this in netlink
> > for strict property and header checking without breaking backwards
> > compatibility.
>
> I'd actually prefer for it to be some /sys interface or other. Maybe
> it could even be per-device or class, and you could do something like
>
> echo "enable bind" > /sys/bus/serio/uevent
>
> the uevent code already supports a per-node "filter" function, maybe
> that notion could be extended to also have a filter for uevent types.

Hm, then we maybe we should think about proper kernel-side uevent
filtering at some point (thinking out loud). But that's also a lot of
complexity and I'm not sure that udev users actually would want this.
Would be helpful if a current udev maintainer could comment on this (I
think recently Yu Watanabe stepped up to maintain systemd-udevd? But I
haven't got his mail address.)
But imho, if we can come up with something simple like a flag first as
opt-in we can still allow for more fine-grained filtering later...

Christian

>
> But I'm just handwaving. Maybe it's better per uevent socket or something.
>
> Linus