Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-06 Thread Bartosz Szczepanek
Nope, it doesn't work. It compiled (after correcting one more leftover mapping), but panicked the same way. I've came up with a set of changes that make it working in my setup, see attached patch. There was a problem with passing already remapped address to tpm2_calc_event_log_size(), which tried

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-03 Thread Jarkko Sakkinen
On Fri, May 03, 2019 at 08:02:18AM +0200, Ingo Molnar wrote: > > * Matthew Garrett wrote: > > > On Thu, May 2, 2019 at 12:15 AM Ard Biesheuvel > > wrote: > > > > > > (+ Ingo) > > > > > > On Tue, 30 Apr 2019 at 21:52, Matthew Garrett wrote: > > > > > > > > On Tue, Apr 30, 2019 at 6:07 AM

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-03 Thread Ingo Molnar
* Matthew Garrett wrote: > On Thu, May 2, 2019 at 12:15 AM Ard Biesheuvel > wrote: > > > > (+ Ingo) > > > > On Tue, 30 Apr 2019 at 21:52, Matthew Garrett wrote: > > > > > > On Tue, Apr 30, 2019 at 6:07 AM Bartosz Szczepanek > > > wrote: > > > > > > > > I may be a little late with this

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-02 Thread Jarkko Sakkinen
On Thu, May 02, 2019 at 11:03:08AM -0700, Matthew Garrett wrote: > On Thu, May 2, 2019 at 1:32 AM Jarkko Sakkinen > wrote: > > > > On Tue, Apr 30, 2019 at 03:07:09PM +0200, Bartosz Szczepanek wrote: > > > I may be a little late with this comment, but I've just tested these > > > patches on

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-02 Thread Jarkko Sakkinen
On Thu, May 02, 2019 at 09:14:49AM +0200, Ard Biesheuvel wrote: > (+ Ingo) > > On Tue, 30 Apr 2019 at 21:52, Matthew Garrett wrote: > > > > On Tue, Apr 30, 2019 at 6:07 AM Bartosz Szczepanek > > wrote: > > > > > > I may be a little late with this comment, but I've just tested these > > >

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-02 Thread Matthew Garrett
Sorry, how about this one? I was confused by why I wasn't hitting this, but on closer examination it turns out that my system populates the final event log with 0 events which means we never hit this codepath :( diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c index

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-02 Thread Matthew Garrett
On Thu, May 2, 2019 at 12:15 AM Ard Biesheuvel wrote: > > (+ Ingo) > > On Tue, 30 Apr 2019 at 21:52, Matthew Garrett wrote: > > > > On Tue, Apr 30, 2019 at 6:07 AM Bartosz Szczepanek > > wrote: > > > > > > I may be a little late with this comment, but I've just tested these > > > patches on

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-02 Thread Matthew Garrett
On Thu, May 2, 2019 at 1:32 AM Jarkko Sakkinen wrote: > > On Tue, Apr 30, 2019 at 03:07:09PM +0200, Bartosz Szczepanek wrote: > > I may be a little late with this comment, but I've just tested these > > patches on aarch64 platform (from the top of jjs/master) and got > > kernel panic ("Unable to

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-02 Thread Jarkko Sakkinen
On Tue, Apr 30, 2019 at 03:07:09PM +0200, Bartosz Szczepanek wrote: > I may be a little late with this comment, but I've just tested these > patches on aarch64 platform (from the top of jjs/master) and got > kernel panic ("Unable to handle kernel read", full log at the end of > mail). I think

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-02 Thread Ard Biesheuvel
(+ Ingo) On Tue, 30 Apr 2019 at 21:52, Matthew Garrett wrote: > > On Tue, Apr 30, 2019 at 6:07 AM Bartosz Szczepanek wrote: > > > > I may be a little late with this comment, but I've just tested these > > patches on aarch64 platform (from the top of jjs/master) and got > > kernel panic ("Unable

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-05-02 Thread Bartosz Szczepanek
Second patch tries to unmap "mapping" which is not declared. I'm on top of jjs/master and your TPM_MEMREMAP patches are already there, so the first patch applied cleanly. Using it, kernel still panicked on boot: EFI stub: Booting Linux Kernel... EFI stub: EFI_RNG_PROTOCOL unavailable, no

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-04-30 Thread Matthew Garrett
On Tue, Apr 30, 2019 at 12:51 PM Matthew Garrett wrote: > Yes, it looks like this is just broken. Can you try with the attached patch? Actually, please try this one. diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c index 2ccaa6661aaf..db0fdaa9c666 100644 ---

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-04-30 Thread Matthew Garrett
On Tue, Apr 30, 2019 at 6:07 AM Bartosz Szczepanek wrote: > > I may be a little late with this comment, but I've just tested these > patches on aarch64 platform (from the top of jjs/master) and got > kernel panic ("Unable to handle kernel read", full log at the end of > mail). I think there's

Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table

2019-04-30 Thread Bartosz Szczepanek
I may be a little late with this comment, but I've just tested these patches on aarch64 platform (from the top of jjs/master) and got kernel panic ("Unable to handle kernel read", full log at the end of mail). I think there's problem with below call to tpm2_calc_event_log_size(), where physical