Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp217025rwb; Thu, 1 Dec 2022 01:03:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf6RVS8bcMAcgfb3MpXrvTChypoLuPMHUoIq9uV3piYQsuGfD7uOq1dj9W5dWhAQp3s4uZN4 X-Received: by 2002:a17:907:9616:b0:7b2:9f1f:48cc with SMTP id gb22-20020a170907961600b007b29f1f48ccmr134407ejc.164.1669885438503; Thu, 01 Dec 2022 01:03:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669885438; cv=none; d=google.com; s=arc-20160816; b=QLEhMWEYOMmRutOGkivKkkyNsZD2ZniWElhQMoAcVloS2pUhhT+SgWLw/8Hth19lB0 UwSML2j9UhrE+EwFQkmSsUK6UQK2JTK2xRW8ZUPNfoRQPe21Btu2a9QkfE/plBDjlzCK friunDpxBrQ6MUTFM9SSTsQ943akHrSngodkJCMju7irNH26csEwZ9cNSgEhNHmePXIB Ji4gYWcty+9/XZtp6dLPdbTWiVYgLp/X7xBsxg9TwmM23mDVwNr0H4F3ULjj5DUBlyDC I+fjUSDWpUI/0548kImPmiZjMMQAPuDz4r/FcrC2DmpSrirJVA10J5k3GF5VhmEykrWb shNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=f3IiJcFRFBLRPpqA8F/7uFKuqJayt9wEiSD0SwL5itE=; b=qAmkjIiNpM62x0L3er9yEsPSKwZ7qYP20tMPYzZoEqeIcRR+yulJ8udo2hieouYiEz iOU6B+q29Qs0jykxpQ68ZGVxTGxjJJhiSQARZCVw9ousycO0dTwg6DhDq3ZtP+ob2ksB DJFQ1pY3TRG4VAD5JT/yJiyW4hJKpIPKz6q80dzXr+J8MjxDEByXuy1U2yAGfKdG4ejG +n+zw5oSFXNY3PjSPqWVzyqKT5PdNUIk66THEIDe/07DkdF2c/yOMJHDjVzowLG/ECz+ 8DsfVLB3LrHfq65uiY2TwWj1XVAEnCooWN3EgsdVcQ2E+OXWuNLdFJe+TVarFuTxJtES G70Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1jyhZPFK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020a056402278600b00468f9f21c11si3655323ede.245.2022.12.01.01.03.38; Thu, 01 Dec 2022 01:03:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1jyhZPFK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229769AbiLAI04 (ORCPT + 82 others); Thu, 1 Dec 2022 03:26:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbiLAI0r (ORCPT ); Thu, 1 Dec 2022 03:26:47 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 072B463D6E; Thu, 1 Dec 2022 00:26:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AC9B8B81E5D; Thu, 1 Dec 2022 08:26:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE2E9C433D6; Thu, 1 Dec 2022 08:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669883199; bh=0v/dpeMN0p7fo5PgE4B1pGCBv2KmNGUMHOEOdHV/Zcg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1jyhZPFK+Ep5/C8SwcvxvjaUpqP3wVecqIt3iOEpBEHfwytXWcrGv2Y8h0qNJ+PyS yZuDjbrw5B2mRJav6voN0z7ZbKftXRo/2/28TTHXT7wApSGISs6fQVcjJpR+5HGNQj Tu3oiOA+lhflmdRFuauNEZdHU5uL2t4sF/+imUE4= Date: Thu, 1 Dec 2022 07:06:08 +0100 From: Greg Kroah-Hartman To: Allen Webb Cc: Christophe Leroy , Luis Chamberlain , "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4] modules: add modalias file to sysfs for modules. Message-ID: References: <20221130221447.1202206-1-allenwebb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221130221447.1202206-1-allenwebb@google.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 > > 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