Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp125622iob; Tue, 17 May 2022 21:04:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/peZev+CRwnJLxPD8Hx1OcjfnDRxAop1aZydJS8vcm16/6eO+HxAdMcUCCw88EAtXVovI X-Received: by 2002:a63:314b:0:b0:3f5:dc43:3b81 with SMTP id x72-20020a63314b000000b003f5dc433b81mr3811854pgx.456.1652846674203; Tue, 17 May 2022 21:04:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652846674; cv=none; d=google.com; s=arc-20160816; b=kauAGN+4YMc2Rb6G1n0uT4z2kmVSUeNNBAPeUGt2W21pApPPxhrLK5gp2RsAT2kWhZ /1olmvCNyk8pVd8SZ1Yhdua/vsO+zjbkROlTYKkSeJ5rxBfa+JUXdFZxuuv7Iw8J5v2e E+9Ap35WNfz8MZq3nLZ9AhkeSS7ULkFu2yr840dE4oz2JUpO1kDF9qmhqzzW0kflJeiU 853Us9BvACyU+fcmV5d1itdBYFMeZ92tDtDitk+Lq2bnxaDTVzuVqK5YCq52f9iHQYW6 6G/N6KO4Le1CBUM6zB6Ra6hx3E51Yyx/w70ohiqopKczwHsDNZF81OLHkfdN6pQvG3XO YSJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dDud8QpcHOOGMYFVwG6KRCTw7kIHDGrPd+sI68v2xZg=; b=wO9PKfJtIjWWZhEE0+KkY06gp4lPnBN8DpUr7xI3zfW5LERkvkpC92DVMd6Y3X19dc EuDCC/c1rCWOIjcW5rRWiXQLHSx8eTDYWxvjMNfrm4C+xPxGF0jAC4S+uJAz7vJpyVJl uxSpSAFMyPKQIxjuD9B4tVKHf64m5CzSlGROZd9wFEukFgoWm5XDAsYi93erRtMH6J9w XJyj4ld4OLrpTfe5O/fHWoWF2KtkQTPMNWkLfv1LG1tkOuBemSM0ZCE1kC8ZpPpJYAJs LqC9gPfqKX1z1zU4IiBeL36xRvOiEtqtgj7DIexB6vhK7FTXK4g/WobCncK7JqX5cnNA DaFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GPXx2iWG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p26-20020a634f5a000000b003c5e6c1497fsi1156588pgl.374.2022.05.17.21.04.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:04:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GPXx2iWG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4803D996B4; Tue, 17 May 2022 20:39:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231916AbiEQXfS (ORCPT + 99 others); Tue, 17 May 2022 19:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbiEQXfG (ORCPT ); Tue, 17 May 2022 19:35:06 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BDB527DE for ; Tue, 17 May 2022 16:35:05 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id x12so583677pgj.7 for ; Tue, 17 May 2022 16:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dDud8QpcHOOGMYFVwG6KRCTw7kIHDGrPd+sI68v2xZg=; b=GPXx2iWGpvjahWJ/eNt1vuxX+XfXwsKDhFEE5llZ+iBUQkHBDl8Q1os/RQzkoSp4Xw oTtcxIKjZMu/LrvUzup2xopqBZYgA6GQbmmxYEoGNvGbf76Qscn6owliQXAnB1t6K2DR 4P2qMtKQ+M3+qEFrUp0umfBe7sJ+lxeus7J2A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dDud8QpcHOOGMYFVwG6KRCTw7kIHDGrPd+sI68v2xZg=; b=MdTOcBwmlQZvV1aIVROn6mbOHUdVHMmGpAJ/PCJhtyaJh4AEt0i2hsOJcN9+x9w/nV y3l+eG20GRghBHxoFvcOqbPrD6ETdSsQbr9ytW7JBARI8cHCCxhar9C6jJ67Iwl9Qr2l 3t8yOMu40kLouGkalrPBye94wWEEWPfwBbjcBZ3lzd0xMjn2QmlYOamVzAXj9eI53FE3 usdVhqEJybviHX2X2pf25oc583DSIxKZaj2XZ+9yT9cLewW56QFBj2omR3kyE8MBiHu5 7WwSV3iejYaKyKDRWYNmnY10IvPC/j1/nLSno7YKn8J0p9/TmGPugKSB4B9mwJUC4aFQ uz1g== X-Gm-Message-State: AOAM531hqKz/5RjhExW0qO9ALIbvv3YujFLYo8ohihsYCfobFL8SxxJM MhqGThwzlYpkAxiEYkze8u1DTQ== X-Received: by 2002:a05:6a00:298a:b0:50e:8e3:b673 with SMTP id cj10-20020a056a00298a00b0050e08e3b673mr24631943pfb.28.1652830505085; Tue, 17 May 2022 16:35:05 -0700 (PDT) Received: from localhost ([2620:15c:11a:202:a14:3166:4b67:b688]) by smtp.gmail.com with UTF8SMTPSA id l17-20020a170903245100b001617e18e253sm162705pls.143.2022.05.17.16.35.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 May 2022 16:35:04 -0700 (PDT) From: Matthias Kaehlcke To: Alasdair Kergon , Mike Snitzer , Kees Cook , James Morris , "Serge E . Hallyn" Cc: linux-security-module@vger.kernel.org, dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu , Douglas Anderson , Matthias Kaehlcke Subject: [PATCH v4 3/3] dm: verity-loadpin: Use CONFIG_SECURITY_LOADPIN_VERITY for conditional compilation Date: Tue, 17 May 2022 16:34:57 -0700 Message-Id: <20220517163437.v4.3.I5aca2dcc3b06de4bf53696cd21329dce8272b8aa@changeid> X-Mailer: git-send-email 2.36.0.550.gb090851708-goog In-Reply-To: <20220517233457.1123309-1-mka@chromium.org> References: <20220517233457.1123309-1-mka@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 The verity glue for LoadPin is only needed when CONFIG_SECURITY_LOADPIN_VERITY is set, use this option for conditional compilation instead of the combo of CONFIG_DM_VERITY and CONFIG_SECURITY_LOADPIN. Signed-off-by: Matthias Kaehlcke --- Changes in v4: - none Changes in v3: - none Changes in v2: - none drivers/md/Makefile | 7 +------ include/linux/dm-verity-loadpin.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/md/Makefile b/drivers/md/Makefile index 71771901c823..a96441752ec7 100644 --- a/drivers/md/Makefile +++ b/drivers/md/Makefile @@ -83,6 +83,7 @@ obj-$(CONFIG_DM_LOG_WRITES) += dm-log-writes.o obj-$(CONFIG_DM_INTEGRITY) += dm-integrity.o obj-$(CONFIG_DM_ZONED) += dm-zoned.o obj-$(CONFIG_DM_WRITECACHE) += dm-writecache.o +obj-$(CONFIG_SECURITY_LOADPIN_VERITY) += dm-verity-loadpin.o ifeq ($(CONFIG_DM_INIT),y) dm-mod-objs += dm-init.o @@ -108,12 +109,6 @@ ifeq ($(CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG),y) dm-verity-objs += dm-verity-verify-sig.o endif -ifeq ($(CONFIG_DM_VERITY),y) -ifeq ($(CONFIG_SECURITY_LOADPIN),y) -dm-verity-objs += dm-verity-loadpin.o -endif -endif - ifeq ($(CONFIG_DM_AUDIT),y) dm-mod-objs += dm-audit.o endif diff --git a/include/linux/dm-verity-loadpin.h b/include/linux/dm-verity-loadpin.h index c2bfd2b9c651..dd66ece9a751 100644 --- a/include/linux/dm-verity-loadpin.h +++ b/include/linux/dm-verity-loadpin.h @@ -15,7 +15,7 @@ struct trusted_root_digest { u8 data[]; }; -#if IS_ENABLED(CONFIG_SECURITY_LOADPIN) && IS_BUILTIN(CONFIG_DM_VERITY) +#if IS_ENABLED(CONFIG_SECURITY_LOADPIN_VERITY) bool dm_verity_loadpin_is_sb_trusted(struct super_block *sb); #else static inline bool dm_verity_loadpin_is_sb_trusted(struct super_block *sb); -- 2.36.0.550.gb090851708-goog