Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp143668pxm; Tue, 22 Feb 2022 19:05:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlzKWuXJjKYhE2e1AzKkOBh/QdJsQRyjcrYF1OAOtVAu2ITcpDIjM5ggmab8ESrnIcAKSe X-Received: by 2002:aa7:d68b:0:b0:410:97f0:d015 with SMTP id d11-20020aa7d68b000000b0041097f0d015mr29050458edr.376.1645585549219; Tue, 22 Feb 2022 19:05:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645585549; cv=none; d=google.com; s=arc-20160816; b=SdRM5cVnM8fJwKC2poBQYVq70B6L6JPcAXXDgI0ITAhXO+EhHQ3MIWhL3ibtpinKJR gcyzF/tMlri8zsj1EP1AS0GtppXhx9jOd5SSoCNxEzaI8bLciqwrMG4ciRFstZ8t0Z+8 hu3hheBrrwlvMbqgFm22YkgeNt3Br0noEOf5O/5Obz17VmHrZ9YqzH+bU388Xheji+VD X/Dw9K6GNNOigNzTa7JrOt8+HBRfBwhb7KM+OJrb6LB/ueTaRBWlwp/9xsN5O5/laa+G H+3EhZCO7oQumUk1wGd2cAL8gyjFpDyfOjbMgc3qp2y5/5KzPOJMPJwGMG21H+FvZpXV Z9UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VZfI083wOuo8B8Z3o/ODodReqRbao/97YGDobejD3PE=; b=HS9pT6JVHjw18U2TXK3iW+u78ARCKOdCkdcE1+4TjVnl72h3fLey6agBv88GATbjoy NL1u5xUOinEHSuTOoHGTmDPX4DBdKmworQSkK+sTvSU+nzcX2ZafbsjsgBI5jMfUbrbw C7lupJkS1oQxBLd3Ho/KhwXz/A4UvVmB5xWMjF/lurWmJdriilGDTejsZAqDzgzaiXMl 2CszmuMcT6L0vlCILdA/NgdTuWCsxhL27BiUnV+YJpeFeYXx1VifBcAkbZZhaLSyGvjg EqPuF+pAdg53sVzOGZf8vTmZ4SmRyCVAEZC8X1XQPDZrK9ZDUoBeOF40WHYd5DefdIzk 6saA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=fERsDHE2; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p23si14758420edw.627.2022.02.22.19.05.25; Tue, 22 Feb 2022 19:05:49 -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=@infradead.org header.s=bombadil.20210309 header.b=fERsDHE2; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233675AbiBWBQ4 (ORCPT + 99 others); Tue, 22 Feb 2022 20:16:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbiBWBQy (ORCPT ); Tue, 22 Feb 2022 20:16:54 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1B1539B8E; Tue, 22 Feb 2022 17:16:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description; bh=VZfI083wOuo8B8Z3o/ODodReqRbao/97YGDobejD3PE=; b=fERsDHE2587eIln0cElC4w1/DQ 4BxBvgnOa/uvD1nS3/oVM5eIk/cOIr8/re5U7MwibUHG2JpdApNubnVfHBZXsYd9082DEsxHpuOnF 9qMCkqGXMJG+RTez9Berq/utaoQFP2Z8nrC4gZkXa/qj7BldSvMpEq9Mg4z1Vm1C6yXPSbMw40yfk tVrU4cM4qIMHfaMgtCm5BnPxCegCi4HdwkiHY+rSJZxLGlS/DivycLJKnT/77MqgW5Jwcmlo+D7K4 lkBHzmq/1nQn/0HUBRdQGlSTKZ9yazuAEYBuD+JXgcbRmaXrZTLnSQFqx/hhwxlcu2fA6WNTGCCpD Qxm3cEww==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMgGR-00C5ie-Ed; Wed, 23 Feb 2022 01:16:19 +0000 Date: Tue, 22 Feb 2022 17:16:19 -0800 From: Luis Chamberlain To: Aaron Tomlin , Thiago Jung Bauermann , Mimi Zohar , Heiko Carstens , Philipp Rudo Cc: Christophe Leroy , "cl@linux.com" , "pmladek@suse.com" , "mbenes@suse.cz" , "akpm@linux-foundation.org" , "jeyu@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-modules@vger.kernel.org" , "live-patching@vger.kernel.org" , "atomlin@atomlin.com" , "ghalat@redhat.com" , "allen.lkml@gmail.com" , "joe@perches.com" , "msuchanek@suse.de" , "oleksandr@natalenko.name" Subject: Re: [PATCH v6 01/13] module: Move all into module/ Message-ID: References: <20220218212511.887059-1-atomlin@redhat.com> <20220218212511.887059-2-atomlin@redhat.com> <69fcaad3-e48c-11ca-ed50-7a18831e3e91@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Tue, Feb 22, 2022 at 10:48:00AM +0000, Aaron Tomlin wrote: > On Mon 2022-02-21 12:21 +0000, Christophe Leroy wrote: > > Le 18/02/2022 ? 22:24, Aaron Tomlin a ?crit : > > > kernel/{module_signature.c => module/signature.c} | 0 > > Keeping it outside of kernel/module/ would allow to conditionaly build > > entire kernel/module/ based of CONFIG_MODULES and then avoid all checks > > against CONFIG_MODULES which look misleading at times. > > Luis, > > What is your opinion on this? Indeed, mod_check_sig() is used by code > outside of kernel/module/ too i.e. ima_read_modsig(); albeit, I believe it > does make sense to keep it under kernel/module/ since the function in > question is used to review a given module's signature anyway. How about: obj-$(CONFIG_MODULE_SIG_FORMAT) += module/module_signature.o Luis