lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJzde04id1kWhnR5HfuFEZR+ej7xXAsmQ9HpwYT5rQEY4Jsntw@mail.gmail.com>
Date:   Tue, 15 Nov 2022 10:05:35 -0600
From:   Allen Webb <allenwebb@...gle.com>
To:     Lucas De Marchi <lucas.demarchi@...el.com>
Cc:     Luis Chamberlain <mcgrof@...nel.org>,
        Alexey Gladkov <gladkov.alexey@...il.com>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] modules: add modalias file to sysfs for modules.

On Mon, Nov 14, 2022 at 11:22 AM Lucas De Marchi
<lucas.demarchi@...el.com> wrote:
>
> On Mon, Nov 14, 2022 at 10:42:50AM -0600, Allen Webb wrote:
> >On Fri, Nov 11, 2022 at 12:29 PM Luis Chamberlain <mcgrof@...nel.org> wrote:
> >>
> >> On Fri, Nov 11, 2022 at 09:28:52AM -0600, Allen Webb wrote:
> >> > USB devices support the authorized attribute which can be used by
> >> > user-space to implement trust-based systems for enabling USB devices. It
> >> > would be helpful when building these systems to be able to know in
> >> > advance which kernel drivers (or modules) are reachable from a
> >> > particular USB device.
> >> >
> >> > This information is readily available for external modules in
> >> > modules.alias. However, builtin kernel modules are not covered. This
> >> > patch adds a sys-fs attribute to both builtin and loaded modules
> >> > exposing the matching rules in the modalias format for integration
> >> > with tools like USBGuard.
> >> >
> >> > Signed-off-by: Allen Webb <allenwebb@...gle.com>
> >>
> >> Thanks for the patch Allen!
> >>
> >> I'd rather have something generic though, and it would seem kmod [0] already
> >> does this, have you seen the kmod support for builtin.alias.bin
> >>
> >> Can't that be used?
> >
> >Probably, but I don't see the builtin.alias.bin in my build. Is it experimental?
>
> no. That is generated by depmod since v27 using modules.builtin.modinfo
> generated by the kernel build system. Highly recommend v30 though
> as there were fixes in v28 and v29 and some changes to speed up its
> generation/use in v30:  See entries mentioning
> builtin.alias and bultin.modinfo in
> https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/tree/NEWS
>
> libkmod/modprobe/modinfo also have the corresponding changes to lookup that
> index when resolving aliases.

I see the file but it is largely missing the aliases I am interested
in, so it looks like I might need to modify my patch that creates
buildin.alias to add the missing alias defines in the header along
with the other module metadata for builtin modules. Does this sound
right to you?

>
> Lucas De Marchi
>
>
> >
> >>
> >> [0] git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
> >>
> >>   Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ