Re: [PATCH v4] modules: add modalias file to sysfs for modules.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 30, 2022 at 04:14:47PM -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@xxxxxxxxxx>
> ---
>  drivers/base/Makefile          |   2 +-
>  drivers/base/base.h            |   8 +
>  drivers/base/bus.c             |  42 ++++++
>  drivers/base/mod_devicetable.c | 257 +++++++++++++++++++++++++++++++++
>  drivers/usb/core/driver.c      |   2 +
>  include/linux/device/bus.h     |   8 +
>  include/linux/module.h         |   1 +
>  kernel/module/internal.h       |   2 +
>  kernel/module/sysfs.c          |  88 +++++++++++
>  kernel/params.c                |   7 +
>  10 files changed, 416 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/base/mod_devicetable.c
> 
> Fixed another kernel config incompability identified by:
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> 
> Fixed a couple CHECK messages from checkpatch.pl.
> 
> There are still some CHECK messages that are by design in a macro that
> depends on modifying a parameter and string literal concatenation.
> 
> There is also a maintainer file update warning for a new file, but that
> file is already covered by an existing maintainers entry.
> 

Again, please read the kernel documentation for how to list changes that
have happened since the 1st version you submitted, it's impossible to
know what has changed in each version here, right?  Also how has this
changed based on the reviews of the first release where people pointed
you at other alternatives?  How did they not work out?

You might need to start including a 0/1 email with all of this
information as it needs an introduction in places, right?

thanks,

greg k-h



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux