Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp580393pxb; Wed, 24 Feb 2021 09:27:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBIk8CmtCYgarW42pxPQGKdGfycEtnSEa7YctSkh1XeKYley0kVyuBRtSFVXFfFwdoX4vt X-Received: by 2002:aa7:c90f:: with SMTP id b15mr25716682edt.51.1614187634607; Wed, 24 Feb 2021 09:27:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614187634; cv=none; d=google.com; s=arc-20160816; b=h57tPc66s3DAdqgxrkES2TH4Oc/JdXYrnY7tgJh3hk8vrH+W6M0edm4yp2X1D56vR7 7ueSmN/gyArkI4KXvuITUFtC0eyf3gN9pvY7JDnI7WI4+0WqGy41xZTJGUPH7Ph7kphF IKLCefJVW31zs0dBfeDlBClkZdl5Q+FNaL0LuMjiJO8SqAymK1i3x043PmEt/rh8JA9W X07NTxBSX08lX3A7IE0MmizgNN2rsk/tjgipGlWBWuGxo63lm0QiByhBSBmID8Up7ZBz j9ZDGpJIGGonSixjRUSaCLW70K/Vv1s/7gOq1UKe2EZ9zhC9IrVE304WHzuMhk1Wc6ye k8YQ== 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=7KXDM6LDAzsfrftt00+X+X7Wign+Ozubc/kApC1veow=; b=evgW+p5Kf4VRVLhAZEJnjqhWqcvqA9UaP5ayGpTtLzs1QcVv2lcMsJP945uR2Ao6Ko BBpXAT3qmyf8CI1hgDqy5uEptHC8R/RONCM7cij+U6k5FuD2QNCb0dLVqmEvoc8kKE+V 1Vcz0jHDYqj3OnUWwrz5pqWWRJ/j/pYMkK47ul6YVhP1AMLRVTGChV9s/Ks4QuAD1YuL L4eeXaJOPrQIbvY+WmeyJxkonvCCSM72VkPK43zGq+sU0f/+BUvBRnjEjljYyJus9K27 gV7N2iJYby1JyET8AdwIsotKoglwJot/1yzZOQSp68LmV5XCWjDdsPgYMQHvccKkBEuv luOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Urv0L9Z7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o12si19988edt.473.2021.02.24.09.26.51; Wed, 24 Feb 2021 09:27:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Urv0L9Z7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbhBXRXu (ORCPT + 99 others); Wed, 24 Feb 2021 12:23:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:51184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233502AbhBXRXp (ORCPT ); Wed, 24 Feb 2021 12:23:45 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D0D5364F0B; Wed, 24 Feb 2021 17:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614187383; bh=yM3gTzozh38TOrtlF44CT4e+9SY2u5O47HHG/3thchw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Urv0L9Z777BEgwBfiogkGzqzX3a7DuHcP3qVAsEU6budUH/VtqxbjAnsmmHMgGEJW 0RnpvncW8Qho1IV/MSilN3cbzqMNLz0p/RJE/knhNU6391jKGwCteRKXLILUedKBuQ OqS4KeWimf6HHtSZqJ9STMGZ1pAxKkrc9iDNsTJgvLCLAW5poQ/ITvtmgx5Hdg9r7Y 21IPplVsfsX2H+ZFzndouaFFoqUALhPSizyjnU5ka05HRm3MZRwvFJtA1OxH36KFxX zqFBIXrH6yQwCNBQ+IWaL66ZoMN8NsBsejtG/EOwcTmxfF3WPDwElJnp4+iQMYDd0s ROM6J8aZtXxiA== Date: Wed, 24 Feb 2021 19:22:45 +0200 From: Jarkko Sakkinen To: Matthew Garrett Cc: Matthew Garrett , linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-pm@vger.kernel.org, keyrings@vger.kernel.org, zohar@linux.ibm.com, jejb@linux.ibm.com, corbet@lwn.net, rjw@rjwysocki.net, Matthew Garrett Subject: Re: [PATCH 3/9] security: keys: trusted: Parse out individual components of the key blob Message-ID: References: <20210220013255.1083202-1-matthewgarrett@google.com> <20210220013255.1083202-4-matthewgarrett@google.com> <20210222073627.GB30403@codon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210222073627.GB30403@codon.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 22, 2021 at 07:36:27AM +0000, Matthew Garrett wrote: > On Sat, Feb 20, 2021 at 05:05:36AM +0200, Jarkko Sakkinen wrote: > > On Sat, Feb 20, 2021 at 01:32:49AM +0000, Matthew Garrett wrote: > > > Performing any sort of state validation of a sealed TPM blob requires > > > being able to access the individual members in the response. Parse the > > > blob sufficiently to be able to stash pointers to each member, along > > > with the length. > > > > > > Signed-off-by: Matthew Garrett > > > > I'll just say LGTM for now. Did not see anything obviously wrong in > > the code change (and does make sense to nitpick minor things just > > yet). > > > > Need to understand the whole use case just a little bit better. > > I wrote this up with some more detail at > https://mjg59.dreamwidth.org/55845.html - it seemed longer than > appropriate for a commit message, but if you'd like more detail > somewhere I can certainly add it. Thanks (bookmarked). I'll read it before reviewing +1 version. Requiring a config flag is something that slows down adoption in the stock kernels. Since we are talking about hibernate the decision whether to have this feature set, does not have to be something that needs to be changed dynamically to a running system. So: maybe the best compromise would be to have it kernel command line option? That way it's easier feature to adapt (e.g. with GRUB configuration) and to enable in the kernel. /Jarkko