Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3522152ybd; Fri, 28 Jun 2019 10:03:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyR+RcIh8kli05NTTUzZyP8YiZR0WAFrYhRsWon2CKZsO+L3FF1fSRYd/Pa/n7LTV/94nT1 X-Received: by 2002:a17:90a:7d09:: with SMTP id g9mr14170873pjl.38.1561741423754; Fri, 28 Jun 2019 10:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561741423; cv=none; d=google.com; s=arc-20160816; b=sIcfzCzS8ql3lqhN9ZxouVKONU+oHDhnb8mEkiUh49phifc4tdP0RkvNM64J8F7Mg7 GTiXmyzW871m9jfaLl5KwcV0JEV24oPhHpfsX4VrmmYIzterpgg+d8D4DyOgYTDS90oF k5eT7tij8nhXf3XaTbEs61TrlnWvpnuLo5HTrMwpdNFE7QBG3VYf7THGr0mydB3mTAE2 3o+7tNCjJzX8yWpnZNyCXM2ph/iXE/ifC0KRQGE1OuvZwFVajzrvDsfj7nRDFf8ZZze3 vhJRhWNMsw5czNsFnCFcyG+za/pNfLFLl/H3FhbHq5WXmIk2zxHh5KuSRPDV2jP0yBuI 8pRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=pMPaKvw3PvvaV7l1SrFqM/mi0tA3zrHvN9Sm+SebSeY=; b=oUy/YFO2Vu1eqqiEOduf4r53n3WFMuObQyHeX1NMDZHSsSkGQ3XJPWmEISrdl2a0bn qs1d1mgypKHccvJKIDdHiqvRD75pA+AYosfBGrS56EEJ4wBbrDwr7NOVkamxQCJV7oTI IqiHG3BpLU8Hqxq4yhzRFZ7YMUHq5Zou0N5tEqcLnCteM2K2vvz3T5Vjn0z3WG+wbEJH lf0wVVm8g2l2241RaQeJ72SW0q1OZZCjQ/7RqMFRSPmDrDa5cRr8blStiNWJ/K9BvGbP YFGCIkOf4I3A0UCAKMecUXOwcDOQ2v2O9vm7/6xHH8V65vC7UYB0UrXpYYghEyClTHDW vd6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11si2555336pll.213.2019.06.28.10.03.27; Fri, 28 Jun 2019 10:03:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726549AbfF1RDQ (ORCPT + 99 others); Fri, 28 Jun 2019 13:03:16 -0400 Received: from linux.microsoft.com ([13.77.154.182]:60832 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbfF1RDQ (ORCPT ); Fri, 28 Jun 2019 13:03:16 -0400 Received: by linux.microsoft.com (Postfix, from userid 1029) id DA9F320BE446; Fri, 28 Jun 2019 10:03:15 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by linux.microsoft.com (Postfix) with ESMTP id 856A53010329; Fri, 28 Jun 2019 10:03:15 -0700 (PDT) Date: Fri, 28 Jun 2019 10:03:15 -0700 (PDT) From: Jaskaran Singh Khurana X-X-Sender: jaskarankhurana@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net To: Milan Broz cc: Eric Biggers , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-fsdevel@vger.kernel.org, agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, jmorris@namei.org, scottsh@microsoft.com, mpatocka@redhat.com Subject: Re: [RFC PATCH v5 1/1] Add dm verity root hash pkcs7 sig validation. In-Reply-To: <264565b3-ff3c-29c0-7df0-d8ff061087d3@gmail.com> Message-ID: References: <20190619191048.20365-1-jaskarankhurana@linux.microsoft.com> <20190619191048.20365-2-jaskarankhurana@linux.microsoft.com> <20190627234149.GA212823@gmail.com> <20190628030017.GA673@sol.localdomain> <264565b3-ff3c-29c0-7df0-d8ff061087d3@gmail.com> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Eric/Milan, On Fri, 28 Jun 2019, Milan Broz wrote: > On 28/06/2019 05:00, Eric Biggers wrote: >>> Hello Eric, >>> >>> This started with a config (see V4). We didnot want scripts that pass this >>> parameter to suddenly stop working if for some reason the verification is >>> turned off so the optional parameter was just parsed and no validation >>> happened if the CONFIG was turned off. This was changed to a commandline >>> parameter after feedback from the community, so I would prefer to keep it >>> *now* as commandline parameter. Let me know if you are OK with this. >>> >>> Regards, >>> JK >> >> Sorry, I haven't been following the whole discussion. (BTW, you sent out >> multiple versions both called "v4", and using a cover letter for a single patch >> makes it unnecessarily difficult to review.) However, it appears Milan were >> complaining about the DM_VERITY_VERIFY_ROOTHASH_SIG_FORCE option which set the >> policy for signature verification, *not* the DM_VERITY_VERIFY_ROOTHASH_SIG >> option which enabled support for signature verification. Am I missing >> something? You can have a module parameter which controls the "signatures >> required" setting, while also allowing people to compile out kernel support for >> the signature verification feature. > > Yes, this was exactly my point. > > I think I even mention in some reply to use exactly the same config Makefile logic > as for FEC - to allow completely compile it out of the source: > > ifeq ($(CONFIG_DM_VERITY_FEC),y) > dm-verity-objs += dm-verity-fec.o > endif > >> Sure, it means that the signature verification support won't be guaranteed to be >> present when dm-verity is. But the same is true of the hash algorithm (e.g. >> sha512), and of the forward error correction feature. Since the signature >> verification is nontrivial and pulls in a lot of other kernel code which might >> not be otherwise needed (via SYSTEM_DATA_VERIFICATION), it seems a natural >> candidate for putting the support behind a Kconfig option. > > On the other side, dm-verity is meant for a system verification, so if it depends > on SYSTEM_DATA_VERIFICATION is ... not so surprising :) > > But the change above is quite easy and while we already have FEC as config option, > perhaps let's do it the same here. > > Milan > Yes, I will make this change. Please consider this discussion as resolved. Thanks. Regards, Jaskaran.