Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4179837iob; Tue, 17 May 2022 16:14:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiQEkMq7qjRSWowPWLWDQLm8C8hqd0kAjJq7XYNIWqVVlE7GUTXRtBka6CidwiJYvEdB8U X-Received: by 2002:a05:6a02:105:b0:381:fd01:330f with SMTP id bg5-20020a056a02010500b00381fd01330fmr20848042pgb.483.1652829267078; Tue, 17 May 2022 16:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652829267; cv=none; d=google.com; s=arc-20160816; b=BC5IpV2v3D0M0PKHqkigMHIKV4BTfwBgjTWg4ZeiUh5qU1d9Q5qqIxX+CLrnqB7jXG w0xCbm0bD6X1CVJDhwjowe4IYG/3w1wBzAXTfCgKUW9eaEghC5sNf5bQ4Ia3xb4JddRi 9xSaCLZK/m89OLKSARQJ3HBRtYLSBHieTCkMc6hQ/njliBbMOh7MqmGPBNIFyjQc4jRJ CE+tekw0CuSPGvqDIozJfeiVVPx9/G31U1EYA8ULDaBMBgXIbm+vkjM3qbAXc7s6jMXT LfqFG1PRREM4xlh5NywrFDFg6/akt90sv8ZdW1AhtXCUKLeHwBvn8wVS/8D1CZYOpeDH lWRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8rb5YAnT4q61r5OFUKyY8/kc8YnIY9p2tTz3G6h+GnI=; b=jq+73XnIBTVo3lyr9RRSdZgemHAZ2gz/fneiRIt0CC27avIDRjKRmRDRCYvsqL89cE 7QkhYBMh5SLn7fI3+sEfDRsu7K5Qp5YRsYbuHyM6hsj8QUULAjrnZRNMjfDfxAERw54h PBqrjvpq1l+MF0iTLntmP8wgt6i7xv6juqEbacO5iyF18MPwU5KU7nwDLZLI4jRGyGAD ZsTuD/fC/s7X/gzonFh9mrW3KnKgyQN3uX5bE2Hv4dEf0+NS4j3uzP2kYu/yI3IiidLn 2KN2Dav2YwzBuk1zTJhQ2TL53wUJa8ZQjB6H1b5w78cg6qPxlOHLFaKEWXBz10E7QTVs pkSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=K+NCG2NO; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a056a00234300b005101c2ed1d6si879232pfj.175.2022.05.17.16.14.13; Tue, 17 May 2022 16:14:27 -0700 (PDT) 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=@chromium.org header.s=google header.b=K+NCG2NO; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235429AbiEQDiW (ORCPT + 99 others); Mon, 16 May 2022 23:38:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235745AbiEQDiQ (ORCPT ); Mon, 16 May 2022 23:38:16 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E07946B1F for ; Mon, 16 May 2022 20:38:14 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id x23so15769520pff.9 for ; Mon, 16 May 2022 20:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8rb5YAnT4q61r5OFUKyY8/kc8YnIY9p2tTz3G6h+GnI=; b=K+NCG2NOY2YHCZGF9tR3CDFh6GmYnmapld8oChptia7I0fznmJTqFy4IMPDhzPzrpB GSJnUjrCDj89eeru6nx+LJLj1uPP74dleWSLfQYcQtNKqITscv70QYhZXqFiLf4zCOwW ACYO6Tlu5Tz6ik2Cp8qUhoVk8JI4piml8NDRg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8rb5YAnT4q61r5OFUKyY8/kc8YnIY9p2tTz3G6h+GnI=; b=FPa4xheEPlXE1KQdxlT5et0LnknPQzzC5OvvehHqs0zIJuEAVLP/WpbkRPyFY/1lvv 76O3F/K+fN7zzR9gbFmR89oSJThx2rEa8iCWzTRbtsqPjGEsWT5MFh3rdrVXW6hgtL0e XgQN0g7IvlGJE9QOe2ktdA0RzK9heILdIIQl3be8lJR+8YQsKWWS6VJuh0idzcfo/koo hA80UnxU88oz1m/eVVT1fB5c/t6F0dqpER8bcTfKCJ2KOBlPiX58p++Ymm1WSeDORY22 VusZa3IX7FJ5kf9d5uOzXcPNAVCbFGWNWNpkf+r+Zclhw1Din9t83G0aHGDQkSwJOK8W rn8g== X-Gm-Message-State: AOAM533imqOQrDZksGXLghScQ33sHLqvj2g54yBY/vcpSSfsgCFnZpZN QHV5mOM5RD1DsqFT6VqRk0nqSA== X-Received: by 2002:a05:6a02:10d:b0:381:f4c8:ad26 with SMTP id bg13-20020a056a02010d00b00381f4c8ad26mr17570035pgb.135.1652758693846; Mon, 16 May 2022 20:38:13 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i7-20020a17090332c700b0015e8d4eb27esm7802065plr.200.2022.05.16.20.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 20:38:13 -0700 (PDT) Date: Mon, 16 May 2022 20:38:12 -0700 From: Kees Cook To: Matthias Kaehlcke Cc: Alasdair Kergon , Mike Snitzer , James Morris , "Serge E . Hallyn" , dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu , Douglas Anderson , linux-security-module@vger.kernel.org Subject: Re: [PATCH v3 1/3] dm: Add verity helpers for LoadPin Message-ID: <202205162035.CABA5B2C6@keescook> References: <20220504195419.1143099-1-mka@chromium.org> <20220504125404.v3.1.I3e928575a23481121e73286874c4c2bdb403355d@changeid> <02028CEA-5704-4A51-8CAD-BEE53CEF7CCA@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 Mon, May 16, 2022 at 11:51:54AM -0700, Matthias Kaehlcke wrote: > 'targets' are different types of DM mappings like 'linear' or 'verity'. A > device mapper table contains has one or more targets that define the mapping > of the blocks of the mapped device. > > Having spelled that out I realize that the above check is wrong. It would > consider a device like this trusted: > > 0 10000000 linear 8:1 > 10000000 10001000 verity > > In the above case only a small part of the DM device would be backed by verity. > > I think we want a table with a single entry that is a verity target. Ah-ha! Okay, that's what I was worried about. Yes, a device made up of only trusted verity targets should be the only trusted device. (So, technically it could be more than 1 verity target, but each would need to be trusted. Supporting that arrangement, though, may be overkill -- I would expect a 1:1 mapping as you suggest. -- Kees Cook