Re: [PATCH 3/5] arm64: change the prototype of image probe function

2023-05-05 Thread Pingfan Liu
On Fri, May 5, 2023 at 11:42 PM Simon Horman wrote: > > On Fri, May 05, 2023 at 10:54:35AM +0800, Pingfan Liu wrote: > > Changing the aarch64 probe's prototype from > > typedef int (probe_t)(const char *kernel_buf, off_t kernel_size); > > to > > typedef int (probe_t)(const char

Re: [PATCH 0/5] arm64: zboot support

2023-05-05 Thread Pingfan Liu
On Sat, May 6, 2023 at 6:38 AM Jeremy Linton wrote: > > On 5/4/23 21:54, Pingfan Liu wrote: > > As more complicated capsule kernel format occurs like zboot, where the > > compressed kernel is stored as a payload. The straight forward > > decompression can not meet the demand. > > > > As the first

[PATCH 5/5] arm64: add support for zboot image

2023-05-05 Thread Pingfan Liu
zboot image consists of zboot_header and Image.gz. And the compressed payload should be located and parsed with extra effort. Most of important, the kernel can only work with Image, so the final fd should point to a temporary file, which contains Image. Signed-off-by: Pingfan Liu To:

Re: [PATCH 0/5] arm64: zboot support

2023-05-05 Thread Jeremy Linton
On 5/4/23 21:54, Pingfan Liu wrote: As more complicated capsule kernel format occurs like zboot, where the compressed kernel is stored as a payload. The straight forward decompression can not meet the demand. As the first step, on aarch64, reading in the kernel file in a probe method and decide

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 12/14] x86: Secure Launch late initcall platform module

2023-05-05 Thread Simon Horman
On Thu, May 04, 2023 at 02:50:21PM +, 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

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

2023-05-05 Thread Ross Philipson
On 5/5/23 13:52, Simon Horman wrote: On Thu, May 04, 2023 at 02:50:17PM +, 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

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

2023-05-05 Thread Ross Philipson
On 5/5/23 13:54, Simon Horman wrote: On Thu, May 04, 2023 at 02:50:18PM +, 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

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 09/14] x86: Secure Launch SMP bringup support

2023-05-05 Thread Simon Horman
On Thu, May 04, 2023 at 02:50:18PM +, 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

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

2023-05-05 Thread Simon Horman
On Thu, May 04, 2023 at 02:50:17PM +, 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 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

Re: [PATCH v6 05/14] x86: Secure Launch main header file

2023-05-05 Thread Ross Philipson
On 5/5/23 12:25, Simon Horman wrote: On Thu, May 04, 2023 at 02:50:14PM +, Ross Philipson wrote: Introduce the main Secure Launch header file used in the early SL stub and the early setup code. Signed-off-by: Ross Philipson --- include/linux/slaunch.h | 513

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

2023-05-05 Thread Ross Philipson
On 5/5/23 12:22, Simon Horman wrote: On Thu, May 04, 2023 at 02:50:13PM +, 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 02/14] Documentation/x86: Secure Launch kernel documentation

2023-05-05 Thread Ross Philipson
On 5/5/23 12:19, Simon Horman wrote: On Thu, May 04, 2023 at 02:50:11PM +, Ross Philipson wrote: Introduce background, overview and configuration/ABI information for the Secure Launch kernel feature. Signed-off-by: Daniel P. Smith Signed-off-by: Ross Philipson Hi Ross and Daniel, some

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

2023-05-05 Thread Simon Horman
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 implementation > uses the established approach of #including the

Re: [PATCH v6 05/14] x86: Secure Launch main header file

2023-05-05 Thread Simon Horman
On Thu, May 04, 2023 at 02:50:14PM +, Ross Philipson wrote: > Introduce the main Secure Launch header file used in the early SL stub > and the early setup code. > > Signed-off-by: Ross Philipson > --- > include/linux/slaunch.h | 513 > > 1

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

2023-05-05 Thread Simon Horman
On Thu, May 04, 2023 at 02:50:13PM +, 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 02/14] Documentation/x86: Secure Launch kernel documentation

2023-05-05 Thread Simon Horman
On Thu, May 04, 2023 at 02:50:11PM +, Ross Philipson wrote: > Introduce background, overview and configuration/ABI information > for the Secure Launch kernel feature. > > Signed-off-by: Daniel P. Smith > Signed-off-by: Ross Philipson Hi Ross and Daniel, some minor nits from my side. >

Re: [PATCH v6 00/14] x86: Trenchboot secure dynamic launch Linux kernel support

2023-05-05 Thread Ross Philipson
On 5/5/23 04:39, Bagas Sanjaya wrote: On Thu, May 04, 2023 at 02:50:09PM +, Ross Philipson wrote: This patchset provides detailed documentation of DRTM, the approach used for adding the capbility, and relevant API/ABI documentation. In addition to the documentation the patch set introduces

Re: [PATCH 3/5] arm64: change the prototype of image probe function

2023-05-05 Thread Simon Horman
On Fri, May 05, 2023 at 10:54:35AM +0800, Pingfan Liu wrote: > Changing the aarch64 probe's prototype from > typedef int (probe_t)(const char *kernel_buf, off_t kernel_size); > to > typedef int (probe_t)(const char *kernel_buf, off_t kernel_size, struct > kexec_info *info); > >

Re: [PATCH 1/5] kexec: Adding missing free for kernel_buf

2023-05-05 Thread Simon Horman
On Fri, May 05, 2023 at 10:54:33AM +0800, Pingfan Liu wrote: > slurp_decompress_file() allocates memory but nowhere to free it. > Adding that missing free. Hi Pingfan, There seem to be: a) other places where slurp_decompress_file() is called and; b) other places where do_kexec_file_load()