Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1141988lqo; Thu, 9 May 2024 06:06:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXrDJ++7JQPydpQU++x7OIgY5v4f2xAq0+93kNi/GZau94OD4cnBz9hVUdXD+dypil1nfp7WgpBEOtNXt8OcZy09rXCzRYBVY8pht2Bkw== X-Google-Smtp-Source: AGHT+IEk/VVa+pgSrnzZtSRbkF9BNESexLFVJJ6pR2ef4t5iuRRJexwEBe7QiR3jerfwKN22XBP2 X-Received: by 2002:ae9:f449:0:b0:790:b2a3:f86c with SMTP id af79cd13be357-792b27f5699mr545834985a.34.1715260014751; Thu, 09 May 2024 06:06:54 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf30a863si135321885a.321.2024.05.09.06.06.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 06:06:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174525-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Jo0/DrPk"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-174525-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174525-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 096281C21E52 for ; Thu, 9 May 2024 13:06:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68F5414EC71; Thu, 9 May 2024 13:06:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Jo0/DrPk" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 348A06E60E; Thu, 9 May 2024 13:06:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.15 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715260008; cv=fail; b=gNZw6nX9Rfd9J8jm0kQ7SDf6jZ3Nt8BHa1LJt/WNNo843eA5Jy51X/OkUodwkZj7BtxmOrM/BZc8jMgQ7UyH8vpNxsjf0i6Zxv9oFw9yFeqOxJDWjdR7CLK6K5TsKARi/yQ/OR38NLS5axhhS8qcUt20KolT9JTTxnjhThxsgpk= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715260008; c=relaxed/simple; bh=TWGEWjtJJw6rU+/bqUB7Qx5IpcQwHKpAYYr7fEXoM9E=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=FT6l9gEvgSj3Yh/C6zNw4fjJo3e2Ehl8uXQa4ZKEE0fDeVmzgwqReizdJzuaVb+mq/zPJ596g2wKSxnJJ0VbwWIGcPO+CpqUtVNAk/NIhMpr7kN2kV6/6f/vse0Z9mnV7K00p2X27No32w7CF05rOE6XBGUUgixJdw2SHUGCVUw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Jo0/DrPk; arc=fail smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715260006; x=1746796006; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=TWGEWjtJJw6rU+/bqUB7Qx5IpcQwHKpAYYr7fEXoM9E=; b=Jo0/DrPkRpzXHEa/Be6338or4LbhIYH2CkE87Ac0DUJaK8K/kfPOj3nf uRFWXn8IeFwT/VNJwKUS/yohC4GMduoM6AL23/dHfVSd0GLPHTRYKiA11 vL1wGBbPOI8jIGSe0YCRf9UVuFCdlj2FfhEUH6ZkmOoLLOADwkR75xM3/ 5j6ZscGcxAe8cakrUGjHPHHlH8hkm4CSO8l+kCjpmhdR17kAG80EsGgEH HUV+tdW53ZpY3Qsh2F9h8JfEHxnlN05SuuJ82ZT1LS1rJb2+22ioLStfh /zTQGlFEMTGeK0UM8OqaGFzBnaikGjX13CBVX8PYiPesuvtfC2ltkNRLC Q==; X-CSE-ConnectionGUID: HZE5oKJMTO+nOCg6qklgLQ== X-CSE-MsgGUID: XZgrV/QcRuGyQuFZGKxQTQ== X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="14973777" X-IronPort-AV: E=Sophos;i="6.08,147,1712646000"; d="scan'208";a="14973777" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2024 06:06:45 -0700 X-CSE-ConnectionGUID: E8R7mnIST9i9k2SPbezt0A== X-CSE-MsgGUID: 4e+FYAVjRL+9A/I+iUDnjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,147,1712646000"; d="scan'208";a="29311392" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa010.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 09 May 2024 06:06:46 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 9 May 2024 06:06:45 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 9 May 2024 06:06:44 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 9 May 2024 06:06:44 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.40) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 9 May 2024 06:06:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NMi0KHWQn2Uvp9sx4fA0BNRAEoOy7X4Plls9utbfucoEiY1ZpFFpKTNAobj90xNZAZ3dvHSDpbAqWvcJAAzzmqoaj9wysUBmJl4uxGbcE0hGIW4ZwJSHy73e6vowNIyTn3L14UAXudK7a0PmmcB1oREjN1hlIWfWNkjZTcsMBVF+Yp9exWwaZZQK7vNys7Md8MVOIzjKTGATM3lZrQ8mlNJs0viJFMlyVIyiVzV1/EnlMAxzdJy1Q8U7QJWpcI4QNhartYwCQgmsrYd2+/skmR4B4Xqn19HNhE1hXa1UoDhX5pfFZnzuTsSlYYvr2xUOUZeqAWUBgNpmD3PsN4J2Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4pzsSEwSsn+uvV4IIkCyqv3Y2rqndXerY4fIh6UeDS4=; b=DOxGav718ayE4QFbCzy+gKw5PfLBpt1dI6I4JdEhsgHsY1K5xyBfa3OukM4iePmu2jBRoWwPJgzvwuFMLwU34x9zDERs0p7+6pvYeMrRtZvnPJWY9UgITB+rL6IhgL+263WTi/YyUwOa+kc45GDCFI+1uZQDvYjnPeRblM1kTJuz2KD5VET+Bw3JsgyBuwekBKRaCVwQpWybNuiunxMU4K96eYE39Mi1sr6KFdPU8kPVZD2wwsGWo+K2Kt8BsraQy/dJxMD+iLTF/WCJVpYnJw+jlEnLfpCFtyVSXpZBBKqjcZIqEjja2EmIUImduBgNdoLKu/eyYyi5ZAWox7Nvjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) by SA1PR11MB8542.namprd11.prod.outlook.com (2603:10b6:806:3a7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.47; Thu, 9 May 2024 13:06:36 +0000 Received: from CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::7141:316f:77a0:9c44]) by CY5PR11MB6139.namprd11.prod.outlook.com ([fe80::7141:316f:77a0:9c44%5]) with mapi id 15.20.7544.046; Thu, 9 May 2024 13:06:36 +0000 Date: Thu, 9 May 2024 08:06:34 -0500 From: Lucas De Marchi To: Jose Ignacio Tornos Martinez CC: , , Subject: Re: [PATCH v2] module: create weak dependecies Message-ID: <5o5jlonbr2ggei7zxh7m2mql3rt6xnmmmo2hv6ktpvi26c7uuw@odtumzc76xoq> References: <20240509102442.176958-1-jtornosm@redhat.com> Content-Type: text/plain; charset="us-ascii"; format=flowed Content-Disposition: inline In-Reply-To: <20240509102442.176958-1-jtornosm@redhat.com> X-ClientProxiedBy: MW4PR03CA0040.namprd03.prod.outlook.com (2603:10b6:303:8e::15) To CY5PR11MB6139.namprd11.prod.outlook.com (2603:10b6:930:29::17) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY5PR11MB6139:EE_|SA1PR11MB8542:EE_ X-MS-Office365-Filtering-Correlation-Id: 624ccc70-766a-482e-3549-08dc7028db9d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|366007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?LP9ZZlEVCYTKt6dr/URNqsFJvXljDG3hnpsKW/PNdIl/D6WFGAd1sAWx30CA?= =?us-ascii?Q?4gKz8bh3QQDpd5Oywqq150QjJnp1ErbJqu9gYk2PeL4PVSb2EqYNRvGQ1lVz?= =?us-ascii?Q?4rXXghdOQjicEEFZCUt+f/2s3fHlPKaJVrPv80vCFJTI76ZvI9TDZhtsASPH?= =?us-ascii?Q?tt99tnGBfDitW30QgKBc+KWTuMWKyNRUCNNl72dmDqw0ibKVOz3YHAdjnMBt?= =?us-ascii?Q?UGU6u/FM9EL2rYcHIMsOIfFzjieP9txpAwEzlpwNORrCyKSiJzKBJYO2RpIb?= =?us-ascii?Q?X8ql4LbLuGGF7h0KcYJZbM6bsqDoblwsD9pH0pIMRQshVbihlYK4siFmJX24?= =?us-ascii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VGy7lUneQa3EtPdOy1EzkKKUc?= =?us-ascii?Q?=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY5PR11MB6139.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?UcmSEO8oUvrEiakgAk9G12cvaOGBTKaaqbFPqBs3yOASxazD/DrMwwTcgOlb?= =?us-ascii?Q?YRE+wWB1PwnKvbzufLiEDqXzncEEP8m09ochwQr5AEtAABHSP8Olr5tX+8dV?= =?us-ascii?Q?ecT+IWSyJ2qlnx50efcZYteuc0CzPtN7Bcm1nGdrAxXDa/Hix7Xon9wklv4w?= =?us-ascii?Q?ifEAo07Pr+TCeAi6zSFrFLvbbbAoF1N9IDM0xkQ5iGBAiZTvXlkHmtbBYUxa?= =?us-ascii?Q?I4i2fn6F+haslV38BFzEsxLCEZgKjJ+NVzq8HHCE3T9BTodROwSIi+vcYBNv?= =?us-ascii?Q?GB5OIfFBTtRa91AJ20ZBh1a47BuKdZ3ahQzZ3hUXlDSdSqDHQH1usgoc4yWg?= =?us-ascii?Q?3WZd41XiLsKeoJu3wJuMlS+5vXJpyIbB9NGVDdTuN25mu0zzTxd4Tu04Z9hM?= =?us-ascii?Q?SyLqSpUDmtsIr0QTD2byEyQ92D2eeBL7MeH6oTA2CCo+YjdgjBCM/n8vwJwF?= =?us-ascii?Q?sOxBx0T+7yfvrrbqHtDiElotvUluE7RtsQEoW0v2/6YAXYlZxLk8+2lizwHx?= =?us-ascii?Q?fg+bgg0IeIVvRC1c0Fb6WX8jyktbZBRtLRf1iMqk+1023tMA/8fgcEiXmt3n?= =?us-ascii?Q?seByO9YuQ2MksaN/Xv3+rxWJTfFy+6CyujWp4Ddqvrf5gpLPa38shO/Zr4j3?= =?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1bJIO/rbllN8K0BAgkk/cDbCTy7ioKW+?= =?us-ascii?Q?nvy9HAAAPdfBX/ydHWRLRnrgRqqAv5hXDFuY4gHkOUlFRXFTXpsEmYey98Jp?= =?us-ascii?Q?7g=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 624ccc70-766a-482e-3549-08dc7028db9d X-MS-Exchange-CrossTenant-AuthSource: CY5PR11MB6139.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2024 13:06:36.7216 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9DEs5QqYA64ud77NJfSGEylxK2wb+Si/p7NUA5IP3Jj2aESkaJgnJLzMah6CzruZLOHKFfKlsUKnV2UFLAXFHLUXVTJO7L/QUDzWFgrBJWs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8542 X-OriginatorOrg: intel.com On Thu, May 09, 2024 at 12:24:40PM GMT, Jose Ignacio Tornos Martinez wrote: >It has been seen that for some network mac drivers (i.e. lan78xx) the >related module for the phy is loaded dynamically depending on the current >hardware. In this case, the associated phy is read using mdio bus and then >the associated phy module is loaded during runtime (kernel function >phy_request_driver_module). However, no software dependency is defined, so >the user tools will no be able to get this dependency. For example, if >dracut is used and the hardware is present, lan78xx will be included but no >phy module will be added, and in the next restart the device will not work >from boot because no related phy will be found during initramfs stage. > >In order to solve this, we could define a normal 'pre' software dependency >in lan78xx module with all the possible phy modules (there may be some), >but proceeding in that way, all the possible phy modules would be loaded >while only one is necessary. > >The idea is to create a new type of dependency, that we are going to call >'weak' to be used only by the user tools that need to detect this situation. >In that way, for example, dracut could check the 'weak' dependency of the >modules involved in order to install these dependencies in initramfs too. >That is, for the commented lan78xx module, defining the 'weak' dependency >with the possible phy modules list, only the necessary phy would be loaded >on demand keeping the same behavior, but all the possible phy modules would >be available from initramfs. I think it's important a note about backward compatibility. If a system doesn't have a new-enough depmod, it will basically not create the new weadep file and initrd generators won't be able to use that. Only downside is not being able to use the new feature, but it should still work as previously. > >The 'weak' dependency support has been included in kmod: >https://github.com/kmod-project/kmod/commit/05828b4a6e9327a63ef94df544a042b5e9ce4fe7 > >Signed-off-by: Jose Ignacio Tornos Martinez >--- >V1 -> V2: >- Include reference to 'weak' dependency support in kmod. > > include/linux/module.h | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/include/linux/module.h b/include/linux/module.h >index 1153b0d99a80..231e710d8736 100644 >--- a/include/linux/module.h >+++ b/include/linux/module.h >@@ -173,6 +173,11 @@ extern void cleanup_module(void); > */ > #define MODULE_SOFTDEP(_softdep) MODULE_INFO(softdep, _softdep) > >+/* Weak module dependencies. See man modprobe.d for details. Documentation/process/coding-style.rst section 8 says to balance the /* and */, but up to Luis what he enforces in the module tree. Reviewed-by: Lucas De Marchi Lucas De Marchi >+ * Example: MODULE_WEAKDEP("module-foo") >+ */ >+#define MODULE_WEAKDEP(_weakdep) MODULE_INFO(weakdep, _weakdep) >+ > /* > * MODULE_FILE is used for generating modules.builtin > * So, make it no-op when this is being built as a module >-- >2.44.0 >