mbox series

[0/2] Preserve TPM log across kexec

Message ID 20240306155511.974517-1-stefanb@linux.ibm.com (mailing list archive)
Headers show
Series Preserve TPM log across kexec | expand

Message

Stefan Berger March 6, 2024, 3:55 p.m. UTC
This series resolves an issue on PowerVM and KVM on Power where the memory
the TPM log was held in may become inaccessible or corrupted after a kexec
soft reboot. The solution on these two platforms is to store the whole log
in the device tree because the device tree is preserved across a kexec with
either of the two kexec syscalls.

Regards,
   Stefan

Stefan Berger (2):
  powerpc/prom_init: Replace linux,sml-base/sml-size with linux,sml-log
  tpm: of: If available Use linux,sml-log to get the log and its size

 arch/powerpc/kernel/prom_init.c |  8 ++------
 drivers/char/tpm/eventlog/of.c  | 36 ++++++++++-----------------------
 2 files changed, 13 insertions(+), 31 deletions(-)

Comments

Stefan Berger March 6, 2024, 4:08 p.m. UTC | #1
On 3/6/24 10:55, Stefan Berger wrote:
> This series resolves an issue on PowerVM and KVM on Power where the memory
> the TPM log was held in may become inaccessible or corrupted after a kexec
> soft reboot. The solution on these two platforms is to store the whole log
> in the device tree because the device tree is preserved across a kexec with
> either of the two kexec syscalls.
> 
FYI: This was the previous attempt that didn't work with the older kexec 
syscall: 
https://lore.kernel.org/lkml/4afde78d-e138-9eee-50e0-dbd32f4dcfe0@linux.ibm.com/T/#m158630d214837e41858b03d4b025e6f96cb8f251

> Regards,
>     Stefan
> 
> Stefan Berger (2):
>    powerpc/prom_init: Replace linux,sml-base/sml-size with linux,sml-log
>    tpm: of: If available Use linux,sml-log to get the log and its size
> 
>   arch/powerpc/kernel/prom_init.c |  8 ++------
>   drivers/char/tpm/eventlog/of.c  | 36 ++++++++++-----------------------
>   2 files changed, 13 insertions(+), 31 deletions(-)
>
Rob Herring (Arm) March 7, 2024, 9:42 p.m. UTC | #2
On Wed, Mar 06, 2024 at 11:08:20AM -0500, Stefan Berger wrote:
> 
> 
> On 3/6/24 10:55, Stefan Berger wrote:
> > This series resolves an issue on PowerVM and KVM on Power where the memory
> > the TPM log was held in may become inaccessible or corrupted after a kexec
> > soft reboot. The solution on these two platforms is to store the whole log
> > in the device tree because the device tree is preserved across a kexec with
> > either of the two kexec syscalls.
> > 
> FYI: This was the previous attempt that didn't work with the older kexec
> syscall: https://lore.kernel.org/lkml/4afde78d-e138-9eee-50e0-dbd32f4dcfe0@linux.ibm.com/T/#m158630d214837e41858b03d4b025e6f96cb8f251

Doesn't everyone else still need that? Is powerpc the only ones that 
care about the old kexec syscall?

Rob
Stefan Berger March 7, 2024, 10:32 p.m. UTC | #3
On 3/7/24 16:42, Rob Herring wrote:
> On Wed, Mar 06, 2024 at 11:08:20AM -0500, Stefan Berger wrote:
>>
>>
>> On 3/6/24 10:55, Stefan Berger wrote:
>>> This series resolves an issue on PowerVM and KVM on Power where the memory
>>> the TPM log was held in may become inaccessible or corrupted after a kexec
>>> soft reboot. The solution on these two platforms is to store the whole log
>>> in the device tree because the device tree is preserved across a kexec with
>>> either of the two kexec syscalls.
>>>
>> FYI: This was the previous attempt that didn't work with the older kexec
>> syscall: https://lore.kernel.org/lkml/4afde78d-e138-9eee-50e0-dbd32f4dcfe0@linux.ibm.com/T/#m158630d214837e41858b03d4b025e6f96cb8f251
> 
> Doesn't everyone else still need that? Is powerpc the only ones that
Are you referring to the old series with 'that' ? I more or less had to 
abandon it because it wouldn't solve the problem for the old kexec 
syscall, so that's why I am embedding the whole log now in the 
devicetree since the DT is properly carried across the kexec soft reboot 
on PowerVM and KVM for Power. Maybe other platforms will (have to) 
follow, but I don't know.

> care about the old kexec syscall?
> 
> Rob