Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp73103rdb; Wed, 1 Nov 2023 17:41:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQdYvd3nIWG8Hz1/0kywMT8F7ScMCnwtZMZvKbtcH0m9/n07deBl4sqtCA2GZpwKO3svMY X-Received: by 2002:a17:902:da85:b0:1cc:5835:9630 with SMTP id j5-20020a170902da8500b001cc58359630mr9971778plx.30.1698885692040; Wed, 01 Nov 2023 17:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698885692; cv=none; d=google.com; s=arc-20160816; b=iZlR/nrmkvrWpFkV9NQ04C4cGNF0mDRscOi+vmGnB1Q8dN3wIiPgmshOcliXj3gHTm RVj9GBwDeZX/yDSsqzfAoBQ249pRuMv8VVwMCEDy3Hoq1Ck+nHQ3hh+i5oE5TaW4hJkw LcE+RqPVCTwr6QoYxK4pulMtR9ngJ2e5WuiGrxs+DnElKXBgIy7CqiKjmgXvZUgA+90p nYIP8O1VArqvl+ioXwHGApcWu9WjZ9pDM9De7VHg/bp+vSBp6AioTyIcHi0yp71S7hZJ sbTFAA4ctd+B/buGYqOjcput+tPzcV0bSJsBn+kcawfEK+R0lEM6YnXz0G4R2LllysWw Si8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TXv7lNcUKE/bPvUbNVQ0cVR7ltHedHv7vFfJ1xNnXoo=; fh=JUh5kgGbttTsq99C6IvO2Wb9GswXeinaC55JgwG8jN8=; b=XDUzktoOsmS4D9JRyzsj/brXSHVhnSAj9CRTETd0UpPVq86cschVY1rTfQhVAuJtjG vN+G70xZ7y1OyQb9xk2rDS4idYH+EDlGt8Q7bOtafWTCvOw0yyymbzk/KnUg9ZJ+oGo/ 1/zcGGB3XzrRFEUAjCKniPxw4ltQXd3h1CQJNwWXlAhcQMUAzksxDXtbMfTrvKYpGep4 H3qma1QL8Xphm6Kxim1XMLhbHR36t/+hbWzPUAb4TXkh6lsNhdKz/Es02iGCb7jlx/yb NMMfv8tAd+SJnf6HlkZDyZGlwS0HLx6j72WE0lt91wEKbgcHtoRwBrEHAYAWe0Jr4u2L BIww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=D9no4B2d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id z6-20020a170903018600b001cbe7f1db37si4545403plg.331.2023.11.01.17.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 17:41:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=D9no4B2d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 353B4802691E; Wed, 1 Nov 2023 17:41:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbjKBAlI (ORCPT + 99 others); Wed, 1 Nov 2023 20:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230502AbjKBAlG (ORCPT ); Wed, 1 Nov 2023 20:41:06 -0400 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA2A6113 for ; Wed, 1 Nov 2023 17:41:00 -0700 (PDT) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-5a7dd65052aso5516327b3.0 for ; Wed, 01 Nov 2023 17:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1698885660; x=1699490460; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TXv7lNcUKE/bPvUbNVQ0cVR7ltHedHv7vFfJ1xNnXoo=; b=D9no4B2d4cqTGIzHucsVFeKxSN5A9mmIMdqIFPQ4RzAt/VBlLU8VAsOB0wV1fh0xsm H/pGzVf4EBLMd92afH6nNZWydrUBamPyPQGA09x25gWCeiCuojHllt3VZKhGgqSZ7JN2 q2ZJUwqYiKVXBEfkThmZU2HnvWbjFEDOVoK2ywFzJT6aTLhlR0Y36hEgrJfKxZAmvtra t/yknTSLg9RmHfFDGoVX/1GkHFCPhER4T8a8fdr95/HnWQs087yaa507YscWGoUlpBP2 arbLoim6AdpCroVlMlqTCqOYjLwBoZrwy7LMrf4pfW3fXZGqJuYZUCqAC5oAVQ1fkOfs NR3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698885660; x=1699490460; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TXv7lNcUKE/bPvUbNVQ0cVR7ltHedHv7vFfJ1xNnXoo=; b=WAmFbeVA04euClmMdC4Y1Ddf8+SKoeqGtFo+CUJ1pgcCCjepPicJuzoAeDF2qE/QPG P6RcZXxabjLP9NjlgIirqQcAhLwXeUZhZYmOGXxFbE5hT9AlZdc0Ec73iO+/A+aoMTnh hP5VXoFdPTK2P4KyeMKn62vf+F7oFrycm0n01+PIHj6OjwWEC5/qQ54hC+gYCE7h6Y9B 7t1JOnN95n0SaJx9cyHRSDslWs6wluXZnzHoramrLZQZQ2oFlqiYMoVk4XEIOuZ4OY/D 8EYaounuzxbBtFnh/FnfM7bGrvhr4G2/8tLoTNTXl/XSFdD0hKwp+jrt/6QIijFeg5CQ 77vw== X-Gm-Message-State: AOJu0Yw7g7TVJcGmAkvb4Ocx8LM4ZcmoJ2PffkcN65K6MsZCBtKbcVyh sTp+Q6nHlL00zRlChktDgkg1hRxSL0GojG0f0THo X-Received: by 2002:a25:db13:0:b0:d9c:a3dd:664e with SMTP id g19-20020a25db13000000b00d9ca3dd664emr15078806ybf.56.1698885659901; Wed, 01 Nov 2023 17:40:59 -0700 (PDT) MIME-Version: 1.0 References: <1696457386-3010-12-git-send-email-wufan@linux.microsoft.com> <85311850a862fe6ccb946634429b890a.paul@paul-moore.com> In-Reply-To: <85311850a862fe6ccb946634429b890a.paul@paul-moore.com> From: Paul Moore Date: Wed, 1 Nov 2023 20:40:49 -0400 Message-ID: Subject: Re: [PATCH RFC v11 11/19] dm verity: set DM_TARGET_SINGLETON feature flag 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 01 Nov 2023 17:41:27 -0700 (PDT) On Mon, Oct 23, 2023 at 11:52=E2=80=AFPM Paul Moore w= rote: > 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? A gentle ping with a reminder ... For reference, the full patchset can be found on lore at the link below: https://lore.kernel.org/linux-security-module/1696457386-3010-1-git-send-em= ail-wufan@linux.microsoft.com/ > > diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-targe= t.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 *t= i, u8 **root_digest, unsigned i > > > > static struct target_type verity_target =3D { > > .name =3D "verity", > > - .features =3D DM_TARGET_IMMUTABLE, > > + .features =3D DM_TARGET_SINGLETON | DM_TARGET_IMMUTABLE, > > .version =3D {1, 9, 0}, > > .module =3D THIS_MODULE, > > .ctr =3D verity_ctr, > > -- > > 2.25.1 --=20 paul-moore.com