Re: [PATCH] usb: hub: report failure to enumerate uevent to userspace

From: David Howells
Date: Wed Jun 05 2019 - 17:24:55 EST

Eugeniu Rosca <erosca@xxxxxxxxxxxxxx> wrote:

> - Looking at commit [4], it seems that the new "notifier" interface/api
> forces userspace applications to link against -lkeyutils [5].

No. The keyctl(2) syscall is implemented in -lkeyutils library, and not in
-lc. That's all. If you want to call KEYCTL_NOTIFY to watch a key or
keyring, you need it; not otherwise.

> Assuming the latter is designed for ("Kernel key management") [6],
> it may look like the keyutils library is being abused to handle
> the "USB (or really any hardware events)". Do you really plan to
> extend the scope of the library to handle these new tasks?


That said, it's probably worth providing some userspace library to wrap the
ring management.