From mboxrd@z Thu Jan 1 00:00:00 1970 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 E367C56B70; Mon, 11 Mar 2024 20:25:33 +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=1710188734; cv=none; b=Ioe9LVk5pON3SnyEnclqvlcSECzzIoJW4kbKhukEQAKf03uwQgmt0G2oL2MkpHoZsKA7FYTy+hGNvtm/PGA5800zpJ1zMKdbMCepbHAH84ZnGI7c3sXAiwc19P2uJs3eBaWkv8+hPWwPEDL4DrADvCvB44HCufv+9f356p3JwO0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710188734; c=relaxed/simple; bh=g7a7Yd9Z2FNA7ZNNxwAmkonp9MHBpjW9SwXw2aB1x7Y=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=PGDrYwl8x8TY/xGCvOs8mBuo0bV72woGYYjrVmlRe8wKG3vgyF6zVq0uvelUTPFJq8JhGHOAUqeBbMd5MfgGA/+++Jb7xojZ1umRAmr6L1Z23aFDGrccOCYZaismeYQKopSisKXN7zHs7xDbJwO2TtVYQhdYhM1qio7h1O1Ovpg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ts5HPB10; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ts5HPB10" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E112C433C7; Mon, 11 Mar 2024 20:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710188733; bh=g7a7Yd9Z2FNA7ZNNxwAmkonp9MHBpjW9SwXw2aB1x7Y=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=ts5HPB10Yzocx5ksgB6BXT+IQ91RE0lxy/Cn2rVAmOfCBeg1JKO5qMbDb59q2M/d6 7lOpz73M9iD2r7KBDgSDjbZocgUADPNWhV9Z6CVLLZewE/zuSv91vYPvxcnRgL1XTC rrGy4QHmapS9zrOo6HwBcHMdbP7c0HefCb50lcU5OZQUVqM/PlXmppxU1eGSwZSUbb rKZTD2wjH1vbWvjtiwxSYxMJNnOokgfaqny1AZPdP1ddomWqh1pzICw7ZmOYTZHQwG 9+FG36fiYbDDofOFM4Q/j7GYyLLoTFBxlP3CFjPOZV0a5wAoABPzGegBxJzO8T/6ap nXVQlxNEktOrQ== Precedence: bulk X-Mailing-List: linux-integrity@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: Mon, 11 Mar 2024 22:25:29 +0200 Message-Id: Cc: , , , , , Subject: Re: [RFC PATCH v2 3/3] tpm: of: If available use linux,sml-log to get the log and its size From: "Jarkko Sakkinen" To: "Stefan Berger" , , , X-Mailer: aerc 0.17.0 References: <20240311132030.1103122-1-stefanb@linux.ibm.com> <20240311132030.1103122-4-stefanb@linux.ibm.com> In-Reply-To: <20240311132030.1103122-4-stefanb@linux.ibm.com> On Mon Mar 11, 2024 at 3:20 PM EET, Stefan Berger wrote: > If linux,sml-log is available use it to get the TPM log rather than the > pointer found in linux,sml-base. This resolves an issue on PowerVM and KV= M > on Power where after a kexec the memory pointed to by linux,sml-base may > have become inaccessible or corrupted. Also, linux,sml-log has replaced > linux,sml-base and linux,sml-size on these two platforms. > > Keep the handling of linux,sml-base/sml-size for powernv platforms that > provide the two properties via skiboot. > > Fixes: c5df39262dd5 ("drivers/char/tpm: Add securityfs support for event = log") > Signed-off-by: Stefan Berger I'm worried about not being up to date and instead using "cached" values when verifying anything from a security chip. Does this guarantee that TPM log is corrupted and will not get updated somehow? BR, Jarkko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 545CEC5475B for ; Mon, 11 Mar 2024 20:26:22 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ts5HPB10; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TtpFm5Vnhz3dWc for ; Tue, 12 Mar 2024 07:26:20 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ts5HPB10; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=145.40.73.55; helo=sin.source.kernel.org; envelope-from=jarkko@kernel.org; receiver=lists.ozlabs.org) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TtpDw28kkz3c9r for ; Tue, 12 Mar 2024 07:25:36 +1100 (AEDT) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 24FBFCE0B01; Mon, 11 Mar 2024 20:25:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E112C433C7; Mon, 11 Mar 2024 20:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710188733; bh=g7a7Yd9Z2FNA7ZNNxwAmkonp9MHBpjW9SwXw2aB1x7Y=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=ts5HPB10Yzocx5ksgB6BXT+IQ91RE0lxy/Cn2rVAmOfCBeg1JKO5qMbDb59q2M/d6 7lOpz73M9iD2r7KBDgSDjbZocgUADPNWhV9Z6CVLLZewE/zuSv91vYPvxcnRgL1XTC rrGy4QHmapS9zrOo6HwBcHMdbP7c0HefCb50lcU5OZQUVqM/PlXmppxU1eGSwZSUbb rKZTD2wjH1vbWvjtiwxSYxMJNnOokgfaqny1AZPdP1ddomWqh1pzICw7ZmOYTZHQwG 9+FG36fiYbDDofOFM4Q/j7GYyLLoTFBxlP3CFjPOZV0a5wAoABPzGegBxJzO8T/6ap nXVQlxNEktOrQ== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 11 Mar 2024 22:25:29 +0200 Message-Id: Subject: Re: [RFC PATCH v2 3/3] tpm: of: If available use linux,sml-log to get the log and its size From: "Jarkko Sakkinen" To: "Stefan Berger" , , , X-Mailer: aerc 0.17.0 References: <20240311132030.1103122-1-stefanb@linux.ibm.com> <20240311132030.1103122-4-stefanb@linux.ibm.com> In-Reply-To: <20240311132030.1103122-4-stefanb@linux.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, rnsastry@linux.ibm.com, jsnitsel@redhat.com, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, viparash@in.ibm.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon Mar 11, 2024 at 3:20 PM EET, Stefan Berger wrote: > If linux,sml-log is available use it to get the TPM log rather than the > pointer found in linux,sml-base. This resolves an issue on PowerVM and KV= M > on Power where after a kexec the memory pointed to by linux,sml-base may > have become inaccessible or corrupted. Also, linux,sml-log has replaced > linux,sml-base and linux,sml-size on these two platforms. > > Keep the handling of linux,sml-base/sml-size for powernv platforms that > provide the two properties via skiboot. > > Fixes: c5df39262dd5 ("drivers/char/tpm: Add securityfs support for event = log") > Signed-off-by: Stefan Berger I'm worried about not being up to date and instead using "cached" values when verifying anything from a security chip. Does this guarantee that TPM log is corrupted and will not get updated somehow? BR, Jarkko