Re: [PATCH 2/2] powerpc: expose secure variables via sysfs

2019-06-13 Thread Greg Kroah-Hartman
On Thu, Jun 13, 2019 at 04:50:27PM -0400, Nayna Jain wrote: > As part of PowerNV secure boot support, OS verification keys are stored > and controlled by OPAL as secure variables. These need to be exposed to > the userspace so that sysadmins can perform key management tasks. > > This patch adds th

[PATCH 2/2] powerpc: expose secure variables via sysfs

2019-06-13 Thread Nayna Jain
As part of PowerNV secure boot support, OS verification keys are stored and controlled by OPAL as secure variables. These need to be exposed to the userspace so that sysadmins can perform key management tasks. This patch adds the support to expose secure variables via a sysfs interface It reuses t

[PATCH 1/2] powerpc/powernv: add OPAL APIs for secure variables

2019-06-13 Thread Nayna Jain
From: Claudio Carvalho The X.509 certificates trusted by the platform and other information required to secure boot the OS kernel are wrapped in secure variables, which are controlled by OPAL. These variables are manipulated by userspace tools using filesystem interface. This patch adds support f

[PATCH 0/2] powerpc/powernv: expose secure variables to userspace

2019-06-13 Thread Nayna Jain
This patch set is part of a series that implements secure boot on PowerNV systems[1]. The original series had been split into two patchsets: 1. powerpc: enable ima arch specific policies[2] 2. powerpc/powernv: expose secure variables to userspace, which is this patchset. Since there are major chan

Re: [PATCH v3 1/3] powerpc/powernv: Add OPAL API interface to get secureboot state

2019-06-13 Thread Daniel Axtens
Hi Nayna, >>> Since OPAL can support different types of backend which can vary in the >>> variable interpretation, a new OPAL API call named OPAL_SECVAR_BACKEND, is >>> added to retrieve the supported backend version. This helps the consumer >>> to know how to interpret the variable. >>> >> (First

Re: [PATCH -next] efi/tpm: fix a compilation warning

2019-06-13 Thread Arnd Bergmann
On Tue, Jun 11, 2019 at 3:59 PM Qian Cai wrote: > > The linux-next "tpm: Reserve the TPM final events table" [1] introduced > a compilation warning, > > drivers/firmware/efi/tpm.c: In function 'efi_tpm_eventlog_init': > drivers/firmware/efi/tpm.c:80:10: warning: passing argument 1 of > 'tpm2_calc_

Re: [PATCH -next] efi/tpm: fix a compilation warning

2019-06-13 Thread Bartosz Szczepanek
On Thu, Jun 13, 2019 at 10:55 AM Arnd Bergmann wrote: > > - efi.tpm_final_log is a physical address that gets passed into > memremap() to return a pointer > - tpm2_calc_event_log_size() takes a pointer argument and > dereferences it. Where does it? It's passed with some added offset to __calc

Re: [PATCH -next] efi/tpm: fix a compilation warning

2019-06-13 Thread Arnd Bergmann
On Thu, Jun 13, 2019 at 1:41 PM Bartosz Szczepanek wrote: > > On Thu, Jun 13, 2019 at 10:55 AM Arnd Bergmann wrote: > > > > - efi.tpm_final_log is a physical address that gets passed into > > memremap() to return a pointer > > - tpm2_calc_event_log_size() takes a pointer argument and > > dere

Re: [PATCH -next] efi/tpm: fix a compilation warning

2019-06-13 Thread Bartosz Szczepanek
On Thu, Jun 13, 2019 at 2:40 PM Arnd Bergmann wrote: > > Would it be correct to change that to 'false' then (or completely remove > the additional remap, given that the other two callers pass false > already) and pass final_tbl? The problem is that we don't know the final_tbl size before running

Re: [PATCH V2 1/2] Abstract out support for locating an EFI config table

2019-06-13 Thread Jarkko Sakkinen
On Fri, Jun 07, 2019 at 01:51:46PM -0700, Matthew Garrett wrote: > We want to grab a pointer to the TPM final events table, so abstract out > the existing code for finding an FDT table and make it generic. > > Signed-off-by: Matthew Garrett Reviewed-by: Jarkko Sakkinen /Jarkko

Re: [PATCH V2 2/2] tpm: Don't duplicate events from the final event log in the TCG2 log

2019-06-13 Thread Jarkko Sakkinen
On Fri, Jun 07, 2019 at 01:51:47PM -0700, Matthew Garrett wrote: > After the first call to GetEventLog() on UEFI systems using the TCG2 > crypto agile log format, any further log events (other than those > triggered by ExitBootServices()) will be logged in both the main log and > also in the Final

Re: [PATCH V2 2/2] tpm: Don't duplicate events from the final event log in the TCG2 log

2019-06-13 Thread Jarkko Sakkinen
On Fri, Jun 07, 2019 at 11:11:21PM +0200, Ard Biesheuvel wrote: > Acked-by: Ard Biesheuvel Ard, is it cool if I include these to my next TPM PR along with the other Matthew's changes? Just sanity checking given that crossing subsystems... /Jarkko

Re: [PATCH V2 2/2] tpm: Don't duplicate events from the final event log in the TCG2 log

2019-06-13 Thread Ard Biesheuvel
On Thu, 13 Jun 2019 at 16:06, Jarkko Sakkinen wrote: > > On Fri, Jun 07, 2019 at 11:11:21PM +0200, Ard Biesheuvel wrote: > > Acked-by: Ard Biesheuvel > > Ard, is it cool if I include these to my next TPM PR along with the > other Matthew's changes? Just sanity checking given that crossing > subsy