Re: [PATCH v3 1/4] tpm: Add explicit endianness cast

2018-05-02 Thread Thiebaud Weksteen
On Tue, May 1, 2018 at 1:49 PM Jarkko Sakkinen < jarkko.sakki...@linux.intel.com> wrote: > On Wed, Apr 25, 2018 at 03:26:41PM +0200, Thiebaud Weksteen wrote: > > Signed-off-by: Thiebaud Weksteen > > --- > > drivers/char/tpm/tpm_eventlog_of.c | 4 ++-- > > 1

[PATCH v3 1/4] tpm: Add explicit endianness cast

2018-04-25 Thread Thiebaud Weksteen
Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/tpm_eventlog_of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_eventlog_of.c b/drivers/char/tpm/tpm_eventlog_of.c index 96fd5646f866..ea0f16f19d73 100644 --- a/drivers/char/tpm

Re: [PATCH v2 1/4] tpm: Add explicit endianness cast

2018-04-24 Thread Thiebaud Weksteen
On Mon, Apr 23, 2018 at 12:06 PM Luc Van Oostenryck < luc.vanoostenr...@gmail.com> wrote: > On Mon, Apr 23, 2018 at 09:22:06AM +, Thiebaud Weksteen wrote: > > On Fri, Apr 20, 2018 at 4:57 PM Jason Gunthorpe wrote: > > > > > On Thu, Apr 19, 2018 at 01:09:12PM

Re: [PATCH v2 1/4] tpm: Add explicit endianness cast

2018-04-23 Thread Thiebaud Weksteen
On Fri, Apr 20, 2018 at 4:57 PM Jason Gunthorpe wrote: > On Thu, Apr 19, 2018 at 01:09:12PM +0000, Thiebaud Weksteen wrote: > > On Tue, Apr 17, 2018 at 4:00 PM Jason Gunthorpe wrote: > > > > > On Tue, Apr 17, 2018 at 08:32:33AM +, Thiebaud Weksteen wrote: > >

Re: [PATCH v2 1/4] tpm: Add explicit endianness cast

2018-04-19 Thread Thiebaud Weksteen
On Tue, Apr 17, 2018 at 4:00 PM Jason Gunthorpe wrote: > On Tue, Apr 17, 2018 at 08:32:33AM +0000, Thiebaud Weksteen wrote: > > On Tue, Apr 17, 2018 at 5:02 AM Jason Gunthorpe wrote: > > > > > On Thu, Apr 12, 2018 at 12:13:47PM +0200, Thiebaud Weksteen wrote: > &g

Re: [PATCH v2 1/4] tpm: Add explicit endianness cast

2018-04-17 Thread Thiebaud Weksteen
On Tue, Apr 17, 2018 at 5:02 AM Jason Gunthorpe wrote: > On Thu, Apr 12, 2018 at 12:13:47PM +0200, Thiebaud Weksteen wrote: > > Signed-off-by: Thiebaud Weksteen > > drivers/char/tpm/tpm_eventlog_of.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > &g

[PATCH v2 1/4] tpm: Add explicit endianness cast

2018-04-12 Thread Thiebaud Weksteen
Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/tpm_eventlog_of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_eventlog_of.c b/drivers/char/tpm/tpm_eventlog_of.c index 96fd5646f866..d74568d58a66 100644 --- a/drivers/char/tpm

[PATCH v2 3/4] tpm: Move shared eventlog functions to common.c

2018-04-12 Thread Thiebaud Weksteen
Functions and structures specific to TPM1 are renamed from tpm* to tpm1*. Signed-off-by: Thiebaud Weksteen Suggested-by: Jarkko Sakkinen --- drivers/char/tpm/Makefile | 4 +- drivers/char/tpm/eventlog/common.c | 195 drivers/char/tpm/eventlog/tpm1.c

[PATCH v2 4/4] tpm: Move eventlog declarations to its own header

2018-04-12 Thread Thiebaud Weksteen
Reduce the size of tpm.h by moving eventlog declarations to a separate header. Signed-off-by: Thiebaud Weksteen Suggested-by: Jarkko Sakkinen --- drivers/char/tpm/eventlog/acpi.c | 1 + drivers/char/tpm/eventlog/common.c | 2 +- drivers/char/tpm/eventlog/common.h | 35

[PATCH v2 2/4] tpm: Move eventlog files to a subdirectory

2018-04-12 Thread Thiebaud Weksteen
Signed-off-by: Thiebaud Weksteen Suggested-by: Jarkko Sakkinen --- drivers/char/tpm/Makefile | 8 drivers/char/tpm/{tpm_eventlog_acpi.c => eventlog/acpi.c} | 2 +- drivers/char/tpm/{tpm_eventlog_efi.c => eventlog/efi.c} | 2 +- drivers/ch

[PATCH v2 0/4] Refactor TPM event log code

2018-04-12 Thread Thiebaud Weksteen
This patchset implements the proposal from Jarkko Sakkinen [1]. I have included the feedback from Nayna Jain about the function naming. [1] https://lkml.kernel.org/r/20171024222148.gwnkj5vqsyj43...@linux.intel.com Changes since v1: - Add Suggested-by - Fix kbuild report Thiebaud Weksteen (4

[PATCH 2/3] tpm: Move shared eventlog functions to common.c

2018-04-11 Thread Thiebaud Weksteen
Functions and structures specific to TPM1 are renamed from tpm* to tpm1*. Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/Makefile | 4 +- drivers/char/tpm/eventlog/common.c | 195 drivers/char/tpm/eventlog/tpm1.c | 197

[PATCH 1/3] tpm: Move eventlog files to a subdirectory

2018-04-11 Thread Thiebaud Weksteen
Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/Makefile | 8 drivers/char/tpm/{tpm_eventlog_acpi.c => eventlog/acpi.c} | 2 +- drivers/char/tpm/{tpm_eventlog_efi.c => eventlog/efi.c} | 2 +- drivers/char/tpm/{tpm_eventlog_of.c => even

[PATCH 3/3] tpm: Move eventlog declarations to its own header

2018-04-11 Thread Thiebaud Weksteen
Reduce the size of tpm.h by moving eventlog declarations to a separate header. Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/eventlog/common.c | 1 + drivers/char/tpm/eventlog/common.h | 35 ++ drivers/char/tpm/eventlog/tpm1.c | 1 + drivers/char/tpm

[PATCH 0/3] Refactor TPM event log code

2018-04-11 Thread Thiebaud Weksteen
This patchset implements the proposal from Jarkko Sakkinen [1]. I have included the feedback from Nayna Jain about the function naming. [1] https://lkml.kernel.org/r/20171024222148.gwnkj5vqsyj43...@linux.intel.com Thiebaud Weksteen (3): tpm: Move eventlog files to a subdirectory tpm: Move

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-13 Thread Thiebaud Weksteen
On Tue, Mar 13, 2018 at 2:43 PM Ard Biesheuvel wrote: > On 13 March 2018 at 13:41, Jeremy Cline wrote: > > On 03/13/2018 03:59 AM, Ard Biesheuvel wrote: > >> On 13 March 2018 at 07:47, Hans de Goede wrote: > >>> Hi, > >>> > >>

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-13 Thread Thiebaud Weksteen
On Tue, Mar 13, 2018 at 8:59 AM Ard Biesheuvel wrote: > On 13 March 2018 at 07:47, Hans de Goede wrote: > > Hi, > > > > > > On 12-03-18 20:55, Thiebaud Weksteen wrote: > >> > ... > >> > >> Hans, you said you configured the tablet to use

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-13 Thread Thiebaud Weksteen
On Mon, Mar 12, 2018 at 10:03 PM Ard Biesheuvel wrote: > On 12 March 2018 at 19:55, Thiebaud Weksteen wrote: > > On Mon, Mar 12, 2018 at 7:33 PM Jeremy Cline wrote: > > > >> On 03/12/2018 02:29 PM, Thiebaud Weksteen wrote: > >> > On Mon, Mar 12, 2018 at 6:30

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Thiebaud Weksteen
On Mon, Mar 12, 2018 at 7:33 PM Jeremy Cline wrote: > On 03/12/2018 02:29 PM, Thiebaud Weksteen wrote: > > On Mon, Mar 12, 2018 at 6:30 PM Ard Biesheuvel < ard.biesheu...@linaro.org> > > wrote: > > > >> On 12 March 2018 at 17:01, Jeremy Cline wrote: > >

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-12 Thread Thiebaud Weksteen
t; >>>> On 10 March 2018 at 10:45, Thiebaud Weksteen wrote: > >>>>> On Fri, Mar 9, 2018 at 5:54 PM Jeremy Cline wrote: > >>>>> > >>>>>> On Fri, Mar 09, 2018 at 10:43:50AM +, Thiebaud Weksteen wrote: > >>>>>>

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-10 Thread Thiebaud Weksteen
On Fri, Mar 9, 2018 at 5:54 PM Jeremy Cline wrote: > On Fri, Mar 09, 2018 at 10:43:50AM +0000, Thiebaud Weksteen wrote: > > Thanks a lot for trying out the patch! > > > > Please don't modify your install at this stage, I think we are hitting a > > firmware bug and

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-09 Thread Thiebaud Weksteen
--- drivers/firmware/efi/libstub/tpm.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c index 773afcd6a37c..ee3fac109078 100644 --- a/drivers/firmware/efi/libstub/tpm.c +++ b/drivers/firmware/efi/lib

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-09 Thread Thiebaud Weksteen
On Fri, Mar 9, 2018 at 10:29 AM Hans de Goede wrote: > Hi, > On 08-03-18 18:26, Jeremy Cline wrote: > > On 03/08/2018 11:50 AM, Hans de Goede wrote: > >> >> added these now> > >> > >> Hi, > >> > >> On 07-03-18 12:34, Javier Martinez Canillas wrote: > > > > > > > >>> Are you also able to read t

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-08 Thread Thiebaud Weksteen
--- drivers/firmware/efi/libstub/tpm.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c index da661bf8cb96..773afcd6a37c 100644 --- a/drivers/firmware/efi/libstub/tpm.c +++ b/drivers/firmware/efi/libstub/tpm.c

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-08 Thread Thiebaud Weksteen
On Wed, Mar 7, 2018 at 6:33 PM Jeremy Cline wrote: > On 03/07/2018 03:41 AM, Thiebaud Weksteen wrote: > > Hi, > > > > Thanks for testing and sending this report! This patch relies heavily on > > the functions exposed by the firmware. My first guess would be that s

Re: Regression from efi: call get_event_log before ExitBootServices

2018-03-07 Thread Thiebaud Weksteen
Hi, Thanks for testing and sending this report! This patch relies heavily on the functions exposed by the firmware. My first guess would be that some of these may not be implemented correctly by the manufacturer. Could you share more information on this specific device? Do you have any link to th

Re: [PATCH v3 4/5] efi: call get_event_log before ExitBootServices

2018-03-06 Thread Thiebaud Weksteen
On Mon, Mar 5, 2018 at 4:40 PM Marc-André Lureau wrote: > Hi Thiebaud > On Wed, Sep 20, 2017 at 10:13 AM, Thiebaud Weksteen wrote: > > With TPM 2.0 specification, the event logs may only be accessible by > > calling an EFI Boot Service. Modify the EFI stub to copy the log

Re: Proposal: rename tpm1_eventlog.c and tpm2_eventlog.c

2017-10-27 Thread Thiebaud Weksteen
On Thu, Oct 26, 2017 at 4:14 PM, Jarkko Sakkinen wrote: > On Wed, Oct 25, 2017 at 03:18:48PM +0200, Jarkko Sakkinen wrote: >> > Since this may conflict with the last patch set I sent, are you happy >> > for me to base this new set on tpmdd/master? >> >> What about this: you do an updated version o

Re: Proposal: rename tpm1_eventlog.c and tpm2_eventlog.c

2017-10-25 Thread Thiebaud Weksteen
On Wed, Oct 25, 2017 at 12:21 AM, Jarkko Sakkinen wrote: > I noticed when making slides for KS that the naming for event log stuff > that the naming is so broken that it is hard to understand the code. > Here it really would make sense to have a patch set just to clean up the > cruft. Agreed and

Re: [PATCH v3 4/5] efi: call get_event_log before ExitBootServices

2017-10-17 Thread Thiebaud Weksteen
On Mon, Oct 16, 2017 at 1:49 PM, Jarkko Sakkinen wrote: > On Mon, Oct 16, 2017 at 02:28:33PM +0300, Jarkko Sakkinen wrote: >> On Wed, Oct 11, 2017 at 02:52:54PM +0300, Jarkko Sakkinen wrote: >> > On Wed, Oct 11, 2017 at 12:54:26PM +1100, James Morris wrote: >> > > On Tue, 10 Oct 2017, Jarkko Sakki

Re: [PATCH v3 4/5] efi: call get_event_log before ExitBootServices

2017-10-04 Thread Thiebaud Weksteen
On Wed, Oct 4, 2017 at 12:51 PM, Jarkko Sakkinen wrote: > On Fri, Sep 29, 2017 at 08:16:17PM +0300, Jarkko Sakkinen wrote: >> On Tue, Sep 26, 2017 at 02:49:31PM +0200, Thiebaud Weksteen wrote: >> > On Tue, Sep 26, 2017 at 1:45 PM, Jarkko Sakkinen >> > wrote: >>

Re: [PATCH v3 4/5] efi: call get_event_log before ExitBootServices

2017-09-26 Thread Thiebaud Weksteen
On Tue, Sep 26, 2017 at 1:45 PM, Jarkko Sakkinen wrote: > On Wed, Sep 20, 2017 at 10:13:39AM +0200, Thiebaud Weksteen wrote: >> With TPM 2.0 specification, the event logs may only be accessible by >> calling an EFI Boot Service. Modify the EFI stub to copy the log area to >>

[PATCH v3 2/5] tpm: rename event log provider files

2017-09-20 Thread Thiebaud Weksteen
Rename the current TPM Event Log provider files (ACPI and OF) for clarity. Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/Makefile| 4 ++-- drivers/char/tpm/{tpm_acpi.c => tpm_eventlog_acpi.c} | 0 drivers/char/tpm/{tpm_of.c => tpm_eventlog_of.c}

[PATCH v3 4/5] efi: call get_event_log before ExitBootServices

2017-09-20 Thread Thiebaud Weksteen
of the logs: TPM 1.2 (SHA1) or TPM 2.0 ("Crypto Agile"). For now, only the first format is retrieved. Signed-off-by: Thiebaud Weksteen --- arch/x86/boot/compressed/eboot.c | 1 + drivers/firmware/efi/Makefile | 2 +- drivers/firmware/efi/efi.c| 4 ++ driver

[PATCH v3 1/5] tpm: move tpm_eventlog.h outside of drivers folder

2017-09-20 Thread Thiebaud Weksteen
The generic definitions of data structures in tpm_eventlog.h are required by other part of the kernel (namely, the EFI stub). Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/tpm-chip.c| 3 +- drivers/char/tpm/tpm-interface.c | 2 +- drivers/char

[PATCH v3 5/5] tpm: parse TPM event logs based on EFI table

2017-09-20 Thread Thiebaud Weksteen
If we are not able to retrieve the TPM event logs from the ACPI table, check the EFI configuration table (Linux-specific GUID). The format version of the log is now returned by the provider function. Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/Makefile| 1 + drivers/char

[PATCH v3 3/5] tpm: add event log format version

2017-09-20 Thread Thiebaud Weksteen
Although defined as part of the TCG EFI specification, we add these definitions here so that any event log provider may reference them. Signed-off-by: Thiebaud Weksteen --- include/linux/tpm_eventlog.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/tpm_eventlog.h b/include

[PATCH v3 0/5] Call GetEventLog before ExitBootServices

2017-09-20 Thread Thiebaud Weksteen
Fix kbuild failures Version 2: - Move tpm_eventlog.h to top include directory, add commit for this. - Use EFI_LOADER_DATA to store the configuration table - Whitespace and new lines fixes Thiebaud Weksteen (5): tpm: move tpm_eventlog.h outside of drivers folder tpm: rename event log provider fi

Re: [PATCH v2 3/3] tpm: parse TPM event logs based on EFI table

2017-09-18 Thread Thiebaud Weksteen
On Tue, Sep 12, 2017 at 10:48 AM, Thiebaud Weksteen wrote: > On Mon, Sep 11, 2017 at 10:47:50AM -0600, Jason Gunthorpe wrote: >> On Mon, Sep 11, 2017 at 12:00:22PM +0200, Thiebaud Weksteen wrote: >> >> > chip->bin_log_seqops.chip = chip; >> > -

Re: [PATCH v2 3/3] tpm: parse TPM event logs based on EFI table

2017-09-18 Thread Thiebaud Weksteen
On Thu, Sep 14, 2017 at 8:47 PM, Jarkko Sakkinen wrote: > On Mon, Sep 11, 2017 at 12:00:22PM +0200, Thiebaud Weksteen wrote: >> If we are not able to retrieve the TPM event logs from the ACPI table, >> check the EFI configuration table (Linux-specific GUID). >> >> Th

Re: [PATCH v2 2/3] efi: call get_event_log before ExitBootServices

2017-09-18 Thread Thiebaud Weksteen
On Thu, Sep 14, 2017 at 9:02 PM, Jarkko Sakkinen wrote: > On Thu, Sep 14, 2017 at 11:48:54AM -0700, Matthew Garrett wrote: >> On Thu, Sep 14, 2017 at 11:43 AM, Jarkko Sakkinen >> wrote: >> > On Mon, Sep 11, 2017 at 12:00:21PM +0200, Thiebaud Weksteen wrote: >> >

Re: [tpmdd-devel] [PATCH v2 2/3] efi: call get_event_log before ExitBootServices

2017-09-18 Thread Thiebaud Weksteen
On Thu, Sep 14, 2017 at 12:24 PM, Javier Martinez Canillas wrote: > On 09/11/2017 12:00 PM, Thiebaud Weksteen via tpmdd-devel wrote: >> With TPM 2.0 specification, the event logs may only be accessible by >> calling an EFI Boot Service. Modify the EFI stub to copy the log area to

Re: [PATCH v2 3/3] tpm: parse TPM event logs based on EFI table

2017-09-13 Thread Thiebaud Weksteen
the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Thiebaud-Weksteen/Call-GetEventLog-before-ExitBootServices/20170913-221312 > base: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next >

Re: [PATCH v2 3/3] tpm: parse TPM event logs based on EFI table

2017-09-12 Thread Thiebaud Weksteen
On Mon, Sep 11, 2017 at 10:47:50AM -0600, Jason Gunthorpe wrote: > On Mon, Sep 11, 2017 at 12:00:22PM +0200, Thiebaud Weksteen wrote: > > > chip->bin_log_seqops.chip = chip; > > - if (chip->flags & TPM_CHIP_FLAG_TPM2) > > + > > + if (log_ve

[PATCH v2 2/3] efi: call get_event_log before ExitBootServices

2017-09-11 Thread Thiebaud Weksteen
of the logs: TPM 1.2 (SHA1) or TPM 2.0 ("Crypto Agile"). For now, only the first format is retrieved. Signed-off-by: Thiebaud Weksteen --- arch/x86/boot/compressed/eboot.c | 1 + drivers/firmware/efi/Makefile | 2 +- drivers/firmware/efi/efi.c| 2 + driver

[PATCH v2 3/3] tpm: parse TPM event logs based on EFI table

2017-09-11 Thread Thiebaud Weksteen
(previous behaviour). Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/Makefile| 2 +- drivers/char/tpm/tpm.h | 8 + drivers/char/tpm/tpm1_eventlog.c | 15 +++-- drivers/char/tpm/tpm_efi.c | 66 drivers/firmware/efi

[PATCH v2 0/3] Call GetEventLog before ExitBootServices

2017-09-11 Thread Thiebaud Weksteen
for TPM 1.2 devices). --- Patchset Changelog: Version 2: - Move tpm_eventlog.h to top include directory, add commit for this. - Use EFI_LOADER_DATA to store the configuration table - Whitespace and new lines fixes Thiebaud Wekst

[PATCH v2 1/3] tpm: move tpm_eventlog.h outside of drivers folder

2017-09-11 Thread Thiebaud Weksteen
The generic definitions of data structures in tpm_eventlog.h are required by other part of the kernel (namely, the EFI stub). Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/tpm-chip.c| 3 +- drivers/char/tpm/tpm-interface.c | 2 +- drivers/char

Re: [PATCH 1/2] efi: call get_event_log before ExitBootServices

2017-09-07 Thread Thiebaud Weksteen
Hi Ard, Thanks for reviewing the patch. (Non-addressed comments are fixed in the next patch set). On Wed, Sep 06, 2017 at 03:53:33PM +0100, Ard Biesheuvel wrote: > Hi Thiebaud, > > On 6 September 2017 at 15:25, Thiebaud Weksteen wrote: > > With TPM 2.0, access to the event log i

[PATCH 1/2] efi: call get_event_log before ExitBootServices

2017-09-06 Thread Thiebaud Weksteen
With TPM 2.0, access to the event log is only possible by using the EFI TPM2 Boot Service. Modify the EFI stub to copy the log area to a new Linux-specific EFI table so it remains accessible for future use. Signed-off-by: Thiebaud Weksteen --- arch/x86/boot/compressed/eboot.c | 1

[PATCH 2/2] tpm: surface TPM event log based on EFI table

2017-09-06 Thread Thiebaud Weksteen
Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/Makefile| 2 +- drivers/char/tpm/tpm.h | 8 + drivers/char/tpm/tpm1_eventlog.c | 16 +++--- drivers/char/tpm/tpm_efi.c | 66 drivers/char/tpm/tpm_eventlog.h | 1