Re: [PATCH v8 06/15] x86: Add early SHA support for Secure Launch early measurements

2024-04-04 Thread Jarkko Sakkinen
On Thu Apr 4, 2024 at 2:56 AM EEST, Eric Biggers wrote: > On Wed, Apr 03, 2024 at 09:32:02AM -0700, Andy Lutomirski wrote: > > On Fri, Feb 23, 2024, at 10:30 AM, Eric Biggers wrote: > > > On Fri, Feb 23, 2024 at 06:20:27PM +, Andrew Cooper wrote: > > >> On 23/02/2024 5:54 pm, Eric Biggers

Re: [systemd-devel] [PATCH 0/1] x86/kexec: UKI support

2023-09-25 Thread Jarkko Sakkinen
On Mon Sep 18, 2023 at 6:41 PM EEST, Dimitri John Ledkov wrote: > On Tue, 12 Sept 2023 at 11:38, Jarkko Sakkinen wrote: > > > > On Tue Sep 12, 2023 at 2:20 AM EEST, Neal Gompa wrote: > On Mon, Sep 11, > > 2023 at 7:15 PM Jarkko Sakkinen wrote: > > > > On

Re: [PATCH v2 0/2] x86/kexec: UKI Support

2023-09-14 Thread Jarkko Sakkinen
On Thu Sep 14, 2023 at 7:11 PM EEST, Jan Hendrik Farr wrote: > > BTW, would not be a bad idea to extend CC list to at least Matthew and > > James Bottomley on this patch. > > Sure. Added Matthew and James in CC > > Also, I already made some minor changes. cmdline is now used from the > syscall if

Re: [PATCH v2 0/2] x86/kexec: UKI Support

2023-09-14 Thread Jarkko Sakkinen
On Thu Sep 14, 2023 at 3:26 PM EEST, Jarkko Sakkinen wrote: > On Thu Sep 14, 2023 at 12:32 PM EEST, Lennart Poettering wrote: > > On Mi, 13.09.23 16:00, Philipp Rudo (pr...@redhat.com) wrote: > > > > > For example there are two definitions for the UKI which cont

Re: [PATCH v2 0/2] x86/kexec: UKI Support

2023-09-14 Thread Jarkko Sakkinen
On Thu Sep 14, 2023 at 12:32 PM EEST, Lennart Poettering wrote: > On Mi, 13.09.23 16:00, Philipp Rudo (pr...@redhat.com) wrote: > > > For example there are two definitions for the UKI which contradict each > > other. > > The dedicated one [1] you have cited earlier and the one in the BLS for > >

Re: [PATCH 0/1] x86/kexec: UKI support

2023-09-14 Thread Jarkko Sakkinen
On Thu Sep 14, 2023 at 12:11 PM EEST, Lennart Poettering wrote: > On Mi, 13.09.23 17:45, Jarkko Sakkinen (jar...@kernel.org) wrote: > > > On Tue Sep 12, 2023 at 11:49 PM EEST, Jan Hendrik Farr wrote: > > > > > > > These are sort of "tautological" argu

Re: [PATCH 0/1] x86/kexec: UKI support

2023-09-14 Thread Jarkko Sakkinen
On Thu Sep 14, 2023 at 11:48 AM EEST, Lennart Poettering wrote: > On Di, 12.09.23 17:32, Jan Hendrik Farr (ker...@jfarr.cc) wrote: > > > >> The format itself is rather simple. It's just a PE file (as required > > >> by the UEFI spec) that contains a small stub application in the .text, > > >>

Re: [PATCH 0/1] x86/kexec: UKI support

2023-09-13 Thread Jarkko Sakkinen
On Wed Sep 13, 2023 at 6:07 PM EEST, Jan Hendrik Farr wrote: > On Wed, Sep 13, 2023, at 4:45 PM, Jarkko Sakkinen wrote: > > On Tue Sep 12, 2023 at 11:49 PM EEST, Jan Hendrik Farr wrote: > >> > >> > These are sort of "tautological" arguments. There m

Re: [PATCH 0/1] x86/kexec: UKI support

2023-09-13 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 11:49 PM EEST, Jan Hendrik Farr wrote: > > > These are sort of "tautological" arguments. There must be some > > objective reasons why this architecture was chosen instead of > > other (i.e. using what already pre-exists). > > I think I misunderstood you in my earlier reply.

Re: [PATCH 0/1] x86/kexec: UKI support

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 9:56 PM EEST, Jan Hendrik Farr wrote: > > What sort of bottleneck does the EFI stub have so that we need yet > > another envelope? > > Well I can come up with a few advantages of UKI compared to normal bzImage > with builtin initrd and cmdline. > > 1. You already identified

Re: [PATCH 0/1] x86/kexec: UKI support

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 6:32 PM EEST, Jan Hendrik Farr wrote: > >> The format itself is rather simple. It's just a PE file (as required > >> by the UEFI spec) that contains a small stub application in the .text, > >> .data, etc sections that is responsible for invoking the contained > >> kernel and

Re: [systemd-devel] [PATCH 0/1] x86/kexec: UKI support

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 2:20 AM EEST, Neal Gompa wrote: > On Mon, Sep 11, 2023 at 7:15 PM Jarkko Sakkinen wrote: > > On Sat Sep 9, 2023 at 7:18 PM EEST, Jan Hendrik Farr wrote: > > > Hello, > > > > > > this patch implements UKI support for kexec_file_

Re: [PATCH 0/1] x86/kexec: UKI support

2023-09-12 Thread Jarkko Sakkinen
On Tue Sep 12, 2023 at 1:54 AM EEST, Jan Hendrik Farr wrote: > > What the heck is UKI? > > UKI (Unified Kernel Image) is the kernel image + initrd + cmdline (+ > some other optional stuff) all packaged up together as one EFI > application. > > This EFI application can then be launched directly by

Re: [PATCH 0/1] x86/kexec: UKI support

2023-09-11 Thread Jarkko Sakkinen
On Sat Sep 9, 2023 at 7:18 PM EEST, Jan Hendrik Farr wrote: > Hello, > > this patch implements UKI support for kexec_file_load. It will require support > in the kexec-tools userspace utility. For testing purposes the following can > be used: > https://github.com/Cydox/kexec-test/ > > There has

Re: [PATCH 1/6] tpm: implement TPM2 function to get update counter

2023-08-03 Thread Jarkko Sakkinen
On Thu Aug 3, 2023 at 4:22 AM EEST, Mimi Zohar wrote: > On Wed, 2023-08-02 at 06:58 +0300, Jarkko Sakkinen wrote: > > > > From long description I see zero motivation to ack this change, except > > some heresay about IMA requiring it. Why does IMA need update_cnt and > >

Re: [PATCH 1/6] tpm: implement TPM2 function to get update counter

2023-08-03 Thread Jarkko Sakkinen
On Thu Aug 3, 2023 at 12:04 AM EEST, Tushar Sugandhi wrote: > Btw, the function tpm2_pcr_read is not exposed directly to the other > subsystems (like IMA).  It is exposed via tpm_pcr_read. > > Do you want to expose tpm2_pcr_read directly, > or do you want me to update the function signature of

Re: [PATCH 1/6] tpm: implement TPM2 function to get update counter

2023-08-01 Thread Jarkko Sakkinen
On Wed Aug 2, 2023 at 12:01 AM EEST, Tushar Sugandhi wrote: > Thanks for the response Jarkko. > > On 8/1/23 12:02, Jarkko Sakkinen wrote: > > The short summary is cryptic to say the least. > Do you mean the patch subject line, or the description below? It is in the process doc

Re: [PATCH 1/6] tpm: implement TPM2 function to get update counter

2023-08-01 Thread Jarkko Sakkinen
The short summary is cryptic to say the least. "update counter" does not map it to have anything to do with PCRs. Why not "tpm: Read pcrUpdateCounter field from TPM2_PCR_Read"? On Tue Aug 1, 2023 at 9:19 PM EEST, Tushar Sugandhi wrote: > The TPM2_PCR_Read command returns TPM2_PCR_Read Response

Re: [PATCH v9 2/4] tpm: of: Make of-tree specific function commonly available

2023-06-28 Thread Jarkko Sakkinen
On Fri, 2023-06-09 at 14:49 -0400, Stefan Berger wrote: > > On 6/9/23 14:18, Jarkko Sakkinen wrote: > > On Thu May 25, 2023 at 1:56 AM EEST, Jerry Snitselaar wrote: > > > On Tue, Apr 18, 2023 at 09:44:07AM -0400, Stefan Berger wrote: > > > > Simplify tpm_read_

Re: [PATCH v9 2/4] tpm: of: Make of-tree specific function commonly available

2023-06-10 Thread Jarkko Sakkinen
On Fri Jun 9, 2023 at 9:49 PM EEST, Stefan Berger wrote: > > > On 6/9/23 14:18, Jarkko Sakkinen wrote: > > On Thu May 25, 2023 at 1:56 AM EEST, Jerry Snitselaar wrote: > >> On Tue, Apr 18, 2023 at 09:44:07AM -0400, Stefan Berger wrote: > >>> Simplify tpm_re

Re: [PATCH v9 2/4] tpm: of: Make of-tree specific function commonly available

2023-06-09 Thread Jarkko Sakkinen
; used also for kexec support. Call the new of_tpm_get_sml_parameters() > > function from the TPM Open Firmware driver. > > > > Signed-off-by: Stefan Berger > > Cc: Jarkko Sakkinen > > Cc: Jason Gunthorpe > > Cc: Rob Herring > > Cc: Frank Rowand > > R

Re: [PATCH v6 08/14] x86: Secure Launch kernel late boot stub

2023-05-23 Thread Jarkko Sakkinen
On Fri May 12, 2023 at 6:58 PM EEST, Ross Philipson wrote: > On 5/10/23 19:02, Jarkko Sakkinen wrote: > > On Thu May 4, 2023 at 5:50 PM EEST, Ross Philipson wrote: > >> The routine slaunch_setup is called out of the x86 specific setup_arch > >> routine during early ker

Re: [PATCH v6 08/14] x86: Secure Launch kernel late boot stub

2023-05-10 Thread Jarkko Sakkinen
On Thu May 4, 2023 at 5:50 PM EEST, Ross Philipson wrote: > The routine slaunch_setup is called out of the x86 specific setup_arch > routine during early kernel boot. After determining what platform is > present, various operations specific to that platform occur. This > includes finalizing

Re: [PATCH v6 04/14] x86: Secure Launch Resource Table header file

2023-05-10 Thread Jarkko Sakkinen
On Thu May 4, 2023 at 5:50 PM EEST, Ross Philipson wrote: > Introduce the Secure Launch Resource Table which forms the formal > interface between the pre and post launch code. > > Signed-off-by: Ross Philipson > --- > include/linux/slr_table.h | 270 >

Re: [PATCH v6 09/14] x86: Secure Launch SMP bringup support

2023-05-10 Thread Jarkko Sakkinen
On Thu May 4, 2023 at 5:50 PM EEST, Ross Philipson wrote: > On Intel, the APs are left in a well documented state after TXT performs > the late launch. Specifically they cannot have #INIT asserted on them so > a standard startup via INIT/SIPI/SIPI cannot be performed. Instead the > early SL stub

Re: [PATCH v6 12/14] x86: Secure Launch late initcall platform module

2023-05-10 Thread Jarkko Sakkinen
On Thu May 4, 2023 at 5:50 PM EEST, Ross Philipson wrote: > From: "Daniel P. Smith" > > The Secure Launch platform module is a late init module. During the > init call, the TPM event log is read and measurements taken in the > early boot stub code are located. These measurements are extended >

Re: [PATCH v6 12/14] x86: Secure Launch late initcall platform module

2023-05-10 Thread Jarkko Sakkinen
On Thu May 4, 2023 at 5:50 PM EEST, Ross Philipson wrote: > From: "Daniel P. Smith" > > The Secure Launch platform module is a late init module. During the > init call, the TPM event log is read and measurements taken in the > early boot stub code are located. These measurements are extended >

Re: [PATCH v6 06/14] x86: Add early SHA support for Secure Launch early measurements

2023-05-10 Thread Jarkko Sakkinen
On Wed May 10, 2023 at 4:21 AM EEST, Eric Biggers wrote: > On Thu, May 04, 2023 at 02:50:15PM +, Ross Philipson wrote: > > From: "Daniel P. Smith" > > > > The SHA algorithms are necessary to measure configuration information into > > the TPM as early as possible before using the values. This

Re: [PATCH v8 2/4] tpm: of: Make of-tree specific function commonly available

2022-09-01 Thread Jarkko Sakkinen
from the TPM Open Firmware driver. > > Signed-off-by: Stefan Berger > Cc: Jarkko Sakkinen > Cc: Jason Gunthorpe > Cc: Rob Herring > Cc: Frank Rowand > Reviewed-by: Mimi Zohar > Tested-by: Nageswara R Sastry > Reviewed-by: Jarkko Sakkinen > Tested-by: Coiby Xu

Re: [PATCH v7 4/6] tpm: of: Make of-tree specific function commonly available

2022-08-14 Thread Jarkko Sakkinen
On Sun, Aug 14, 2022 at 10:16:09PM +0300, Jarkko Sakkinen wrote: > On Fri, Aug 12, 2022 at 12:43:03PM -0400, Stefan Berger wrote: > > Simplify tpm_read_log_of() by moving reusable parts of the code into > > an inline function that makes it commonly available so it can be > >

Re: [PATCH v7 4/6] tpm: of: Make of-tree specific function commonly available

2022-08-14 Thread Jarkko Sakkinen
from the TPM Open Firmware driver. > > Signed-off-by: Stefan Berger > Cc: Jarkko Sakkinen > Cc: Jason Gunthorpe > Cc: Rob Herring > Cc: Frank Rowand > Reviewed-by: Mimi Zohar > Tested-by: Nageswara R Sastry > > --- > v7: > - Added original comment ba

Re: [PATCH v5 4/6] tpm: of: Make of-tree specific function commonly available

2022-07-28 Thread Jarkko Sakkinen
On Fri, Jul 15, 2022 at 12:01:36PM -0400, Stefan Berger wrote: > > > On 7/10/22 23:04, Jarkko Sakkinen wrote: > > On Wed, Jul 06, 2022 at 11:23:27AM -0400, Stefan Berger wrote: > > > Simplify tpm_read_log_of() by moving reusable parts of the code into > > &

Re: [PATCH v5 4/6] tpm: of: Make of-tree specific function commonly available

2022-07-10 Thread Jarkko Sakkinen
from the TPM Open Firmware driver. > > Signed-off-by: Stefan Berger > Cc: Jarkko Sakkinen > Cc: Jason Gunthorpe > Cc: Rob Herring > Cc: Frank Rowand > > --- > v4: > - converted to inline function > --- > drivers/char/tpm/eventlog/of.c | 31 +-

Re: [PATCH v4 3/5] tpm: of: Make of-tree specific function commonly available

2022-07-10 Thread Jarkko Sakkinen
from the TPM Open Firmware driver. > > Signed-off-by: Stefan Berger > Cc: Jarkko Sakkinen > Cc: Jason Gunthorpe > Cc: Rob Herring > Cc: Frank Rowand > > --- > v4: > - converted to inline function > --- > drivers/char/tpm/eventlog/of.c | 31 +-

Re: [PATCH v2 1/3] tpm: of: Move of-tree specific code from tpm driver into of driver

2022-06-30 Thread Jarkko Sakkinen
On Wed, Jun 29, 2022 at 10:16:37AM -0400, Stefan Berger wrote: > > > On 6/28/22 22:45, Jarkko Sakkinen wrote: > > On Tue, Jun 28, 2022 at 09:29:48AM -0400, Stefan Berger wrote: > > > > > > > > > On 6/27/22 18:43, Rob Herring wrote: > > >

Re: [PATCH v2 1/3] tpm: of: Move of-tree specific code from tpm driver into of driver

2022-06-28 Thread Jarkko Sakkinen
nfirmware driver to make the code reusable. Call the new > > > > There is no such 'Openfirmware driver'. > > > > > of_tpm_get_sml_parameters() function from the TPM Openfirmware driver. > > > > > > Signed-off-by: Stefan Berger > > > Cc: Ja

Re: [PATCH 3/3] tpm: of: Call of_tpm_get_sml_parameters() to get base and size of log

2022-06-15 Thread Jarkko Sakkinen
On Tue, Jun 14, 2022 at 12:12:58PM -0400, Stefan Berger wrote: > Simplify tpm_read_log_of() and call of_tpm_get_sml_parameters() to get > the base and size of the TPM log. > > Signed-off-by: Stefan Berger > Cc: Jarkko Sakkinen > Cc: Jason Gunthorpe > --- > drivers/cha