Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-09-20 Thread ross . philipson
On 5/12/23 11:04 AM, Thomas Gleixner wrote: On Thu, May 04 2023 at 14:50, Ross Philipson wrote: + +/* CPUID: leaf 1, ECX, SMX feature bit */ +#define X86_FEATURE_BIT_SMX(1 << 6) + +/* Can't include apiddef.h in asm */ Why not? All it needs is a #ifndef __ASSEMBLY__ guard around the C

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-06-15 Thread Ross Philipson
On 5/15/23 21:45, Matthew Garrett wrote: On Mon, May 15, 2023 at 09:11:15PM -0400, Daniel P. Smith wrote: On 5/12/23 12:17, Ross Philipson wrote: This is a good point. At this point it is really something we overlooked. We will have to revisit this and figure out the best way to find the final

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-15 Thread Matthew Garrett
On Mon, May 15, 2023 at 09:11:15PM -0400, Daniel P. Smith wrote: > On 5/12/23 12:17, Ross Philipson wrote: > > This is a good point. At this point it is really something we > > overlooked. We will have to revisit this and figure out the best way to > > find the final event log depending on how

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-15 Thread Daniel P. Smith
On 5/12/23 12:17, Ross Philipson wrote: On 5/12/23 07:26, Matthew Garrett wrote: On Thu, May 04, 2023 at 02:50:16PM +, Ross Philipson wrote: +static void sl_find_event_log(struct slr_table *slrt) If this is called after the EFI stub then we're presumably post-ExitBootServices and we're

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-15 Thread Ross Philipson
On 5/12/23 14:04, Thomas Gleixner wrote: On Thu, May 04 2023 at 14:50, Ross Philipson wrote: + +/* CPUID: leaf 1, ECX, SMX feature bit */ +#define X86_FEATURE_BIT_SMX(1 << 6) + +/* Can't include apiddef.h in asm */ Why not? All it needs is a #ifndef __ASSEMBLY__ guard around the C parts.

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-12 Thread Thomas Gleixner
On Thu, May 04 2023 at 14:50, Ross Philipson wrote: > + > +/* CPUID: leaf 1, ECX, SMX feature bit */ > +#define X86_FEATURE_BIT_SMX (1 << 6) > + > +/* Can't include apiddef.h in asm */ Why not? All it needs is a #ifndef __ASSEMBLY__ guard around the C parts. > +#define XAPIC_ENABLE (1 << 11)

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-12 Thread Matthew Garrett
On Fri, May 12, 2023 at 12:17:50PM -0400, Ross Philipson wrote: > I am not 100% sure what you are asking but we also measure the EFI memory > map. This comment is just to note that if the e820 exceeded the space in the > fixed map in boot parameters, we would pick up any extra entries when >

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-12 Thread Ross Philipson
On 5/12/23 07:26, Matthew Garrett wrote: On Thu, May 04, 2023 at 02:50:16PM +, Ross Philipson wrote: +static void sl_find_event_log(struct slr_table *slrt) If this is called after the EFI stub then we're presumably post-ExitBootServices and we're copied the TPM event log into a

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-12 Thread Matthew Garrett
On Thu, May 04, 2023 at 02:50:16PM +, Ross Philipson wrote: > +static void sl_find_event_log(struct slr_table *slrt) If this is called after the EFI stub then we're presumably post-ExitBootServices and we're copied the TPM event log into a configuration table so it's available to the

[PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-10 Thread Ross Philipson
The Secure Launch (SL) stub provides the entry point for Intel TXT (and later AMD SKINIT) to vector to during the late launch. The symbol sl_stub_entry is that entry point and its offset into the kernel is conveyed to the launching code using the MLE (Measured Launch Environment) header in the

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-05 Thread Simon Horman
On Fri, May 05, 2023 at 02:58:28PM -0400, Ross Philipson wrote: > On 5/5/23 13:47, Simon Horman wrote: > > On Thu, May 04, 2023 at 02:50:16PM +, Ross Philipson wrote: ... > > > +asmlinkage __visible void sl_check_region(void *base, u32 size) > > > +{ > > > + sl_check_pmr_coverage(base, size,

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-05 Thread Ross Philipson
On 5/5/23 13:47, Simon Horman wrote: On Thu, May 04, 2023 at 02:50:16PM +, Ross Philipson wrote: The Secure Launch (SL) stub provides the entry point for Intel TXT (and later AMD SKINIT) to vector to during the late launch. The symbol sl_stub_entry is that entry point and its offset into

Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub

2023-05-05 Thread Simon Horman
On Thu, May 04, 2023 at 02:50:16PM +, Ross Philipson wrote: > The Secure Launch (SL) stub provides the entry point for Intel TXT (and > later AMD SKINIT) to vector to during the late launch. The symbol > sl_stub_entry is that entry point and its offset into the kernel is > conveyed to the