Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp657642lql; Mon, 11 Mar 2024 13:21:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUWwUwh0LySljGTduQQ6oeMi8DqFOTPx4Jz/bwT2truSr2KGXowfLVXx6afErjdTMgkcjkEguQBYDC9DGvTxiyDER6cPYeNzGQRnxJEQ== X-Google-Smtp-Source: AGHT+IFgu685BhW6YNjbzDJ2GjjcfEvhOgtOuvS9aZMl4AUKDP6ulJ9kWFgHRagmQGEPnny77yYh X-Received: by 2002:a17:90a:c684:b0:29b:277d:2590 with SMTP id n4-20020a17090ac68400b0029b277d2590mr7305119pjt.34.1710188517291; Mon, 11 Mar 2024 13:21:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710188517; cv=pass; d=google.com; s=arc-20160816; b=Ua6dizEW/ejDOFEihToZ49z4Ig+LSXu7i50k+guIrRuR6D4i8tp6q4IKcLL98K2V3y JjZSyaqK/fFcUzntBFuA4WSmgf3MmyEOCl6gopRcILynVxzco30wI7t5E8TY+0CC0vrG gDYB2bx7osoOL39KMbOfbS87zrOiaoTEwgyIcWcWiBIpjGL8OWbaL9Kb9wBwVzgSeFuk O6GdPNaDXbnoj/L5dwJAs7LIQj7uZ9YpmQjgvigBPF5AGh1HM1WuqYv+Xo/xhsLAjtgP ADqSD0TkX4twhHY+wY4gp74vRUA7OmzrCpdih/s34Z5uG8otiaMBCwZlXYkgzSFNdrz5 uZdw== 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=m0g91sXKYJS/kIzIdqTu2G6HaWEmgoKbDue6b3HELzA=; fh=Xbl+Av2giiajvg7+L7p8iEPCvLPwuqAfpJKq2kstcuo=; b=II8i8gYWPMD1V4lIYapEuEU88pZ13qJT1KUZWvLG6Qhj7GTiGPX186fOG/C7wtl5Xv 5x9jaZG8BuwZXwsIclj0jwMwd0JWmw4b4COK7hXNC3RmiOvm0RSS+pUIcJGwag+aYh4C hqJKB+vLjZqG/5CO17AFgB3jO6nH9QrlKdIVQyz0M5S0dQfz/vtAWA26mFOxz1ScaUsk A1FOhmhZal43acd1Xk2pwUqA1TycfIfGSYa+d9/2agQXGykL2CobexzzcmObSoz4kKp6 0ONWcbx3Cgdv3aAzUC4ntBjrcEF9LOMt3HTVXxqJue300wvU9AioCQXOwm0mNNyHu+Kq HkhQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fRZCIsUw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99504-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99504-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 t10-20020a17090abc4a00b0029a39d66114si9679998pjv.77.2024.03.11.13.21.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 13:21:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99504-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=fRZCIsUw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99504-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99504-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 7183DB212D6 for ; Mon, 11 Mar 2024 20:21:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2620E56772; Mon, 11 Mar 2024 20:21:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fRZCIsUw" 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 43C6A53E2C; Mon, 11 Mar 2024 20:21:42 +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=1710188503; cv=none; b=NhfWsiOQWN+32ruee9l+uTbzXCXy3p7HBsKIeGYDdh47BRfrfEHOuWP8TBZDzJ1I6oCKRQQxRvXQprGAPGeXBeoqi2buVoe+u5ljGYn4K6ZGTgbYMQM63+AwAGaBpcn/zCuV+8d/+0brx0VliqDN3Zw7EiRQ1Q/RiFFlCcgsYxQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710188503; c=relaxed/simple; bh=m0g91sXKYJS/kIzIdqTu2G6HaWEmgoKbDue6b3HELzA=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=D7gD8ONUIFToxXSowm0jMjeuf2N9HcuVwOM73rdWXn6u+RNsbsRTb+l9Cjr/y54glTRlbU888E9qm6/JFBtPUfoANz1EJcQPVwmEJRFkZ8NSy0IW0h+8nXduIfwRAZn90xXowAEF+dhzv8s1z7DfNJzgWMJSG46iOpSp2kEhmak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fRZCIsUw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2D49C433C7; Mon, 11 Mar 2024 20:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710188502; bh=m0g91sXKYJS/kIzIdqTu2G6HaWEmgoKbDue6b3HELzA=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=fRZCIsUw+ltmZpj7Ioa6QyF4bBXq0ClTyx5UbpaGj0BwwmhEKNap0i2kmsFvMTfYH uAF252gxfBFsafjM9Yuk4LafJYv3Me+15/ThPDqUT/zg6IVy0kX5DdZAEfIwHN5CJa kaWzEkGHE7xv/n1Re/hQ6Xh2eldHCz0IXefPxRAdP4TN6IF7a3sTG3G7rzjwPKzjFm 9x7SzQmlcJu6w9SEwD1WoiYIV/WJ86JSJ9WMmBIwMVMwH/b8Ox9dwWhkJV1+UUAUt4 SeFUzsKgAL8hqx2FabponQ8JhErgPZBo8wt5HWubHhzrwi+E8LQSEkDhXyw5hd4fY/ Ptdw0KX8aKSVg== 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: Mon, 11 Mar 2024 22:21:38 +0200 Message-Id: Cc: , , , , , Subject: Re: [RFC PATCH v2 1/3] powerpc/prom_init: Replace linux,sml-base/sml-size with linux,sml-log From: "Jarkko Sakkinen" To: "Stefan Berger" , , , X-Mailer: aerc 0.17.0 References: <20240311132030.1103122-1-stefanb@linux.ibm.com> <20240311132030.1103122-2-stefanb@linux.ibm.com> In-Reply-To: <20240311132030.1103122-2-stefanb@linux.ibm.com> On Mon Mar 11, 2024 at 3:20 PM EET, Stefan Berger wrote: > linux,sml-base holds the address of a buffer with the TPM log. This > buffer may become invalid after a kexec. To avoid accessing an invalid > address or corrupted buffer, embed the whole TPM log in the device tree > property linux,sml-log. This helps to protect the log since it is > properly carried across a kexec soft reboot with both of the kexec > syscalls. - Describe the environment where TPM log gets corrupted. - Describe why TPM log gets corrupted on kexec. > > Avoid having the firmware ingest the whole TPM log when calling > prom_setprop but only create the linux,sml-log property as a place holder= . > Insert the actual TPM log during the tree flattening phase. This commit message should shed some light about reasons of the corruption in order to conclude that it should be fixed up like this. I.e. why the "post-state" is a legit state where can be continued despite a log being corrupted. Especially in security features this is pretty essential information. BR, Jarkko