Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp659127rdb; Thu, 22 Feb 2024 15:50:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVpiYU4mDNAp1LcQlJmwhjSU6Vae3AHAZBbRUJdKaZY7CB15+IblXBeyQIr9kTEs6Z1xFpYV7Q92bdGlrh6Y5r4LTuRwoMFdR73x/MTHQ== X-Google-Smtp-Source: AGHT+IHzVL2yKNLqWavzgRb7meRajR/o+kZM2lQe+5na3VJOPxTKD1AUyQES2J9yFvE/fNuLguxO X-Received: by 2002:a05:6808:118a:b0:3c0:3f65:dc2f with SMTP id j10-20020a056808118a00b003c03f65dc2fmr442388oil.50.1708645823225; Thu, 22 Feb 2024 15:50:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708645823; cv=pass; d=google.com; s=arc-20160816; b=OLx+kFTL6AXn4juv4dn9Y9G57f+jif+f0vQP9C6CSk8sIVvYyGOpV167tPLmANccEH FrN55mX5G7RWbjiyKLz911rj5ex5eEThjCx0cMKcLhiNC0rucrzpACJbhkpixhhrhPC+ Sw46YpC1Y37gjPTmGhO73P+EvWky6MQgWMGetnYBc6JMFCxt5d17rYm8nCPel7uKz+OI itS0CUptaUFmZh1vEjQ0Bkz9C8qzfHa8G7FXDXxcD73ctMm1+f6oFvPSvW8MggSmtZAX TF3poPN2+5F7CdiMBndLcTe0fwIYtNT+krmNrl5BhY/8ITt2EQAFX4FyoAIexTuJP8lx 4g5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=498g4jmBf0OV0alcf+21qcl4ceWxNTAuehHyuAR9ywk=; fh=G6lHl4PFZpmkSAX10wdAoIMEO2DApBqstaeGtjTcoMY=; b=k1acTOiF2CwCt+nNLPzIog0yUaMly8Dwc6VOcAtLQbeLDVdCVk5O9Kn9Gq41haMd0w 2AFpAlf7uYL9eWV8yeTMilZQB1Ib1+lGSAtBpn5P56bX2Sr1KFJ/3j48pvBIoAmy+5cZ qCiMzYSw6iiHOP8f2BHyyjtrH5Nk0iW+9gC1Yx2kRrQHC3snseCJJ/L5EPK9NsGqWyhQ kcJ+92o8WUHsbU9PAi1Ej7XICC06fe+/ZHevL0kZekeGIyi068nIKvNLaygrf1UaB3x5 /3ad8+rEsBGzWbr5q3xC3uWPbOYHS2/3J1/FvvHH+cm5Tud4WLKyn2UfxYQ8nZ0I+7Q5 66MQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DqaEpfHP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77544-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77544-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s20-20020a63af54000000b005dcd64e8467si11276776pgo.59.2024.02.22.15.50.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 15:50:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77544-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DqaEpfHP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77544-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77544-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 59071B20F0F for ; Thu, 22 Feb 2024 23:49:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E26D713BAE4; Thu, 22 Feb 2024 23:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DqaEpfHP" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07FAD199AD; Thu, 22 Feb 2024 23:49:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708645763; cv=none; b=olpBvmRP4oRlLUNQTcED5b96ncPMoAjlGOUwVL2FeKp6gczLOY42SwhuQxNZzmdyF13HqZzNUApNleN+NZKYWCsUEC4Wh37bASffLW7yklovcriQYDEyfSLWAWHKr6FaT7w8QBpFeilN0yydIMGMqVEBTxMJ5rvAyR4cXTKYN88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708645763; c=relaxed/simple; bh=bgmSMhBzcEqii8d0LHlz7CHuWt0HcycK02XxHyt6XZw=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=G5nL6vp7QPxhzwtPtL5cxpG5k5VwJA5Y1G0ThE0+gH2ZuctFDnBxlCBIf0i6OeDRf4jIRDxjqe2uGMizE26342ADR5YAaH8IsERq/ohOvn8Law3J/bXfDpM7yhb+te3X3PuOrHpW5u5dspdS60p+Qsjpwb+DudOcwsmQJNkS4fM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DqaEpfHP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39476C433C7; Thu, 22 Feb 2024 23:49:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708645762; bh=bgmSMhBzcEqii8d0LHlz7CHuWt0HcycK02XxHyt6XZw=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=DqaEpfHP30g8Iz6Rzef8p2mZktl4RedmOVrmt4dtfVFJdItRjRNzDIz/Pprc5/jn5 02cJvYh9fXA2+/ZdbVWSIxLo4qAeFqy6uer1HmrYAL1/lBCuyg+LoBk8Cc9fLjyfqo XxhHMz6nUzVNWob8UT5KGyh58GZPj1t/z6XOj3AEnqneT3Ul3NT7B6HkwvrSmZZzyj M+9I7Cip7fEm/KNYDe5EEOF0eE3a8YE2KUXWn34HnClJQNgzw/EW6KdUcSXt9tA9q/ 7yszg5RxG7ZfLcecfIb/aF9N6ZOq+gkHSC4LSjO0bHyRy1dLw2HToS6xzTjw6eCBPj 55vJxA9gIZ4kQ== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 23 Feb 2024 01:49:17 +0200 Message-Id: Cc: "Ross Philipson" , "Kanth Ghatraju" , "Peter Huewe" Subject: Re: [PATCH 1/3] tpm: protect against locality counter underflow From: "Jarkko Sakkinen" To: "James Bottomley" , "Lino Sanfilippo" , "Alexander Steffen" , "Daniel P. Smith" , "Jason Gunthorpe" , "Sasha Levin" , , X-Mailer: aerc 0.17.0 References: <20240131170824.6183-1-dpsmith@apertussolutions.com> <20240131170824.6183-2-dpsmith@apertussolutions.com> <2ba9a96e-f93b-48e2-9ca0-48318af7f9b1@kunbus.com> <91f600ef-867b-4523-89be-1c0ba34f8a4c@kunbus.com> <7a7f8f0c1b9d124bfc01b66082abf2d8445564ce.camel@HansenPartnership.com> <354bf802d27ea995858e41dd90d9a83ffc6739aa.camel@HansenPartnership.com> In-Reply-To: <354bf802d27ea995858e41dd90d9a83ffc6739aa.camel@HansenPartnership.com> On Thu Feb 22, 2024 at 11:06 AM EET, James Bottomley wrote: > On Wed, 2024-02-21 at 19:43 +0000, Jarkko Sakkinen wrote: > > On Wed Feb 21, 2024 at 12:37 PM UTC, James Bottomley wrote: > > > On Tue, 2024-02-20 at 22:31 +0000, Jarkko Sakkinen wrote: > [...] > > > > =C2=A0I cannot recall out of top of my head can > > > > =C2=A0=C2=A0 you have two localities open at same time. > > >=20 > > > I think there's a misunderstanding about what localities are: > > > they're effectively an additional platform supplied tag to a > > > command.=C2=A0 Each command can therefore have one and only one > > > locality.=C2=A0 The TPM doesn't > >=20 > > Actually this was not unclear at all. I even read the chapters from > > Ariel Segall's yesterday as a refresher. > >=20 > > I was merely asking that if TPM_ACCESS_X is not properly cleared and > > you se TPM_ACCESS_Y where Y < X how does the hardware react as the > > bug report is pretty open ended and not very clear of the steps > > leading to unwanted results. > > So TPM_ACCESS_X is *not* a generic TPM thing, it's a TIS interface > specific thing. Now the TIS interface seems to be dominating, so > perhaps it is the correct programming model for us to follow, but not > all current TPMs adhere to it. I know, I only have CRB based TPMs in my host machines but here the context is TIS interface so in this scope it's what we care about. We're trying to fix a bug here, not speculate what additional features could be done with localities. BR, Jarkko