Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1637860rda; Mon, 23 Oct 2023 20:53:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwT6hNTEhonIv2eC5k+jh7lwkw4J4mde9C5dPSrAXaJOreL/v8ctkV853VMIp4QHgIfsWz X-Received: by 2002:a17:903:23cd:b0:1ca:7086:60ec with SMTP id o13-20020a17090323cd00b001ca708660ecmr10501200plh.65.1698119624899; Mon, 23 Oct 2023 20:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698119624; cv=none; d=google.com; s=arc-20160816; b=pJBcaWB7aevwJfj+82BkGQz1hyhKDQdRpRGV9wndkSNtFuJTy4iR6D3N/ZEPgKgq5I /2fXcHZPjaEEDV8phJ8/ZhG+OdwO2kkzi9KRj+/A6394SgqVK6oWJjRD4p19alKixzeb IWk9D9bNQfMtamX+44Hz4G8G8O4Y1ntLGnFYrNS7xFoNPxLf8kXamYkgNIDTQtmxIcyG PKs58zOIryEEtp/yC466pySE4r/4/5TzLs7AT30kl+0emT2U0EMmUlLiB3/uW1B3wYak 3cppJccxuipEzdxppU2m696glY5NnUBzdpGsxEO+Nhe9gPjRTh/0kJJr0gCdHA//eOQ+ M0xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:subject:cc:to:from :message-id:date:dkim-signature; bh=HLvkudqanD7ho/JohV3yYMvdl0m/YZEqjpT0bM0Y7Gw=; fh=wT7ne114MvKPMftSKn5e2Yopb6Fqz4/qWpN6WXdRdRg=; b=Ks2M/V6z2ksLQutJZXWLtPM2sJ8tu+7uKSgbc/FuXBsBocv+RSEXmMy7ZPY1tGGvV+ vH0+QhVbAD6xkhGGeR72YSWE16hxLvk2gRvyBNETffNTbsqxAUn2F6bunVNrmpTVSZC2 1iX1EXyHwBpV1aoeIeuOIS3gqws9+//I2d/ngLKUsOVUQkqIIzoy5lB7FsdTEonL+1RE WFz5tfVi11wkgNdOTZyoG5xsWToG1pL+NcYXJ2SQK8NXIJV07WdBBTaLX/+hJiJxMb2S 4vBRC4wrgvGsZyMJati+dTKUbIXjs3DuQKVwmO6nb81FwG8f1iLMjIR0+SKIDPurAxUA 5QRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=XNc3KcIb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id w15-20020a170902e88f00b001b8921fbd87si8091551plg.490.2023.10.23.20.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 20:53:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=XNc3KcIb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 26E75809C92F; Mon, 23 Oct 2023 20:53:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232464AbjJXDxE (ORCPT + 99 others); Mon, 23 Oct 2023 23:53:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232285AbjJXDwr (ORCPT ); Mon, 23 Oct 2023 23:52:47 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F7E310E4 for ; Mon, 23 Oct 2023 20:52:31 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-41cbd1d7e04so23843151cf.1 for ; Mon, 23 Oct 2023 20:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1698119550; x=1698724350; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:message-id:date:from:to :cc:subject:date:message-id:reply-to; bh=HLvkudqanD7ho/JohV3yYMvdl0m/YZEqjpT0bM0Y7Gw=; b=XNc3KcIb+IR8QS+MHo1fOpYYF218BMMpw9ZcQas/Zpj/xANT2PzcX4M5DsFY6GkHqo GerPdig2n7O8sfAn0qDHvpz7jzGrLAenJNm2fMLtJgW6GHMP1BM/mocMG5qmzrI00V8z OD2X/6lxilvyC0tlj2dWBsJrLgBQnunzBka62gH08EiefGgRKntxbfvMO3yzbVXTldlr QPnp2txrzw92B0Cicpf2FTbrf7sRyc3NGEdJdeTq2R4bArrNpYRBleLaA/LChZocuWuk pjqLpKlaAh+qrOCmUZL5tI60SseyZxjXGmoEe6jGKxvMeejw6mSyHUDZQTDbWUQwK6Hr j0ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698119550; x=1698724350; h=in-reply-to:references:subject:cc:to:from:message-id:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HLvkudqanD7ho/JohV3yYMvdl0m/YZEqjpT0bM0Y7Gw=; b=kxE2+wI04u8aijhzB5o1qbTZNnJNCk5nvMTFPU73P0AOln+GgpigEVE+HSXhzo0bDA r2VXqG/elt1bK0DYu7Ame/iEGjguRlvruCqT8k7ds1GiG5ojv3vuAntlQG6ucf1iEJha GX9pNgJvFT8vca5Nupi6gqa7UONMprFpLCKcpZUbzBORuoGNY6Lhq7N4GH5awMLKXCrw wcIpFzKAMS4JqJfy6ZCl36wQs/VFOQMW6/Bl7QVAHez2hPsnRwbcRtLqMTNcJ2rY/OZ8 WAEi2P0q8nuyGvOTAHtVeu3Dy4dpsCmtqA/0DyYvaqtuPGFoUO484EjzjP7hUBuYQP6m EhCw== X-Gm-Message-State: AOJu0YyhcqN8qKtle7iOXONvShTSEi6M5F8CEKm0s9aZX3XRHF0lyYjg XERjetNsMsaDiBofUgq6/w8M X-Received: by 2002:ac8:5c08:0:b0:41b:ff51:4e72 with SMTP id i8-20020ac85c08000000b0041bff514e72mr11390786qti.48.1698119550281; Mon, 23 Oct 2023 20:52:30 -0700 (PDT) Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id kr25-20020ac861d9000000b004181c32dcc3sm3179140qtb.16.2023.10.23.20.52.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 20:52:29 -0700 (PDT) Date: Mon, 23 Oct 2023 23:52:29 -0400 Message-ID: <85311850a862fe6ccb946634429b890a.paul@paul-moore.com> From: Paul Moore To: Fan Wu , corbet@lwn.net, zohar@linux.ibm.com, jmorris@namei.org, serge@hallyn.com, tytso@mit.edu, ebiggers@kernel.org, axboe@kernel.dk, agk@redhat.com, snitzer@kernel.org, eparis@redhat.com Cc: linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-block@vger.kernel.org, dm-devel@redhat.com, audit@vger.kernel.org, roberto.sassu@huawei.com, linux-kernel@vger.kernel.org, Fan Wu Subject: Re: [PATCH RFC v11 11/19] dm verity: set DM_TARGET_SINGLETON feature flag References: <1696457386-3010-12-git-send-email-wufan@linux.microsoft.com> In-Reply-To: <1696457386-3010-12-git-send-email-wufan@linux.microsoft.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 23 Oct 2023 20:53:40 -0700 (PDT) On Oct 4, 2023 Fan Wu wrote: > > The device-mapper has a flag to mark targets as singleton, which is a > required flag for immutable targets. Without this flag, multiple > dm-verity targets can be added to a mapped device, which has no > practical use cases and will let dm_table_get_immutable_target return > NULL. This patch adds the missing flag, restricting only one > dm-verity target per mapped device. > > Signed-off-by: Fan Wu > --- > v1-v10: > + Not present > --- > drivers/md/dm-verity-target.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) This seems reasonable to me and matches with other users of DM_TARGET_IMMUTABLE. Alasdair, Mike, can we get an ACK on this? > diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c > index 26adcfea0302..80673b66c194 100644 > --- a/drivers/md/dm-verity-target.c > +++ b/drivers/md/dm-verity-target.c > @@ -1503,7 +1503,7 @@ int dm_verity_get_root_digest(struct dm_target *ti, u8 **root_digest, unsigned i > > static struct target_type verity_target = { > .name = "verity", > - .features = DM_TARGET_IMMUTABLE, > + .features = DM_TARGET_SINGLETON | DM_TARGET_IMMUTABLE, > .version = {1, 9, 0}, > .module = THIS_MODULE, > .ctr = verity_ctr, > -- > 2.25.1 -- paul-moore.com