[PATCHv7 5/5] arm64: Hook up the ZBOOT support as vmlinuz

2023-08-02 Thread Pingfan Liu
From: Jeremy Linton Add the previously defined _probe() and _usage() routines to the kexec file types table, and build the new module. It should be noted that this "vmlinuz" support reuses the "Image" support to actually load the resulting image after it has been decompressed to a temporary

[PATCHv7 0/5] arm64: zboot support

2023-08-02 Thread Pingfan Liu
From: root 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 how to unfold the

[PATCHv7 1/5] kexec/arm64: Simplify the code for zImage

2023-08-02 Thread Pingfan Liu
Inside zimage_probe(), it uncompresses the kernel and performs some check, similar to image_probe(). Taking a close look, the uncompressing has already executed before the image probe is called. What is missing here is to provide a fd, pointing to an uncompressed kernel image. This patch creates

[PATCHv7 4/5] arm64: Add ZBOOT PE containing compressed image support

2023-08-02 Thread Pingfan Liu
From: Jeremy Linton The kernel EFI stub ZBOOT feature creates a PE that contains a compressed linux kernel image. The stub when run in a valid UEFI environment then decompresses the resulting image and executes it. Support these image formats with kexec as well to avoid having to keep an

[PATCHv7 3/5] kexec/zboot: Add arch independent zboot support

2023-08-02 Thread Pingfan Liu
From: Jeremy Linton The linux kernel CONFIG_ZBOOT option creates self decompressing PE kernel images. So this means that kexec should have a generic understanding of the format which may be used by multiple arches. So lets add an arch independent validation and decompression routine.

[PATCHv7 2/5] kexec: Introduce a member kernel_fd in kexec_info

2023-08-02 Thread Pingfan Liu
Utilize the image load interface to export the kernel fd, which points to the uncompressed kernel and will be passed to kexec_file_load. The credit goes to the Dave Young, who contributes the original code. Signed-off-by: Pingfan Liu Co-authored-by: Dave Young To: kexec@lists.infradead.org Cc:

Re: [PATCHv6 3/5] kexec/zboot: Add arch independent zboot support

2023-08-02 Thread Pingfan Liu
On Wed, Aug 2, 2023 at 8:33 PM Simon Horman wrote: > > On Wed, Aug 02, 2023 at 02:17:57PM +0200, Simon Horman wrote: > > On Wed, Aug 02, 2023 at 02:16:33PM +0200, Simon Horman wrote: > > > On Wed, Aug 02, 2023 at 05:53:59PM +0800, Pingfan Liu wrote: > > > > Hi Simon, > > > > > > > > Thanks for

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

2023-08-02 Thread Mimi Zohar
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 > why this is not documented to the long description? The motivation is to detect whether

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

2023-08-02 Thread Tushar Sugandhi
On 8/1/23 20:58, Jarkko Sakkinen wrote: 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

Re: [PATCH v2] x86/kexec: Add EFI config table identity mapping for kexec kernel

2023-08-02 Thread Borislav Petkov
On Wed, Aug 02, 2023 at 04:55:27PM +0200, Ard Biesheuvel wrote: > ... because now, entering via startup_32 is broken, given that it only > maps the kernel image itself and relies on the #PF handling for > everything else it accesses, including firmware tables. > > AFAICT this also means that

Re: [PATCH v2] x86/kexec: Add EFI config table identity mapping for kexec kernel

2023-08-02 Thread Ard Biesheuvel
On Wed, 2 Aug 2023 at 15:59, Borislav Petkov wrote: > > On Wed, Aug 02, 2023 at 08:40:36AM -0500, Tom Lendacky wrote: > > Short of figuring out how to map page accesses earlier through the > > boot_page_fault IDT routine > > And you want to do that because? > ... because now, entering via

Re: [PATCH v2] x86/kexec: Add EFI config table identity mapping for kexec kernel

2023-08-02 Thread Borislav Petkov
On Wed, Aug 02, 2023 at 08:40:36AM -0500, Tom Lendacky wrote: > Short of figuring out how to map page accesses earlier through the > boot_page_fault IDT routine And you want to do that because? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH v2] x86/kexec: Add EFI config table identity mapping for kexec kernel

2023-08-02 Thread Tom Lendacky
On 8/2/23 04:39, Borislav Petkov wrote: On Wed, Aug 02, 2023 at 04:22:54PM +0800, Tao Liu wrote: Thanks for the patch! I have tested it on the lenovo machine in the past few days, no issue found, so the patch tests OK. Thanks for testing! Mike, Tom, the below ok this way? Short of figuring

Re: [PATCHv6 3/5] kexec/zboot: Add arch independent zboot support

2023-08-02 Thread Simon Horman
On Wed, Aug 02, 2023 at 02:17:57PM +0200, Simon Horman wrote: > On Wed, Aug 02, 2023 at 02:16:33PM +0200, Simon Horman wrote: > > On Wed, Aug 02, 2023 at 05:53:59PM +0800, Pingfan Liu wrote: > > > Hi Simon, > > > > > > Thanks for the try. Please see the comment below. > > > > > > On Tue, Aug 1,

Re: [PATCHv6 3/5] kexec/zboot: Add arch independent zboot support

2023-08-02 Thread Simon Horman
On Wed, Aug 02, 2023 at 02:16:33PM +0200, Simon Horman wrote: > On Wed, Aug 02, 2023 at 05:53:59PM +0800, Pingfan Liu wrote: > > Hi Simon, > > > > Thanks for the try. Please see the comment below. > > > > On Tue, Aug 1, 2023 at 3:00 PM Simon Horman wrote: > > > > > > On Mon, Jul 24, 2023 at

Re: [PATCHv6 3/5] kexec/zboot: Add arch independent zboot support

2023-08-02 Thread Simon Horman
On Wed, Aug 02, 2023 at 05:53:59PM +0800, Pingfan Liu wrote: > Hi Simon, > > Thanks for the try. Please see the comment below. > > On Tue, Aug 1, 2023 at 3:00 PM Simon Horman wrote: > > > > On Mon, Jul 24, 2023 at 10:21:40AM +0800, Pingfan Liu wrote: > > > From: Jeremy Linton > > > > > > The

Re: [PATCHv6 3/5] kexec/zboot: Add arch independent zboot support

2023-08-02 Thread Pingfan Liu
Hi Simon, Thanks for the try. Please see the comment below. On Tue, Aug 1, 2023 at 3:00 PM Simon Horman wrote: > > On Mon, Jul 24, 2023 at 10:21:40AM +0800, Pingfan Liu wrote: > > From: Jeremy Linton > > > > The linux kernel CONFIG_ZBOOT option creates > > self decompressing PE kernel images.

Re: [PATCH v2] x86/kexec: Add EFI config table identity mapping for kexec kernel

2023-08-02 Thread Borislav Petkov
On Wed, Aug 02, 2023 at 04:22:54PM +0800, Tao Liu wrote: > Thanks for the patch! I have tested it on the lenovo machine in the > past few days, no issue found, so the patch tests OK. Thanks for testing! Mike, Tom, the below ok this way? --- From: "Borislav Petkov (AMD)" Date: Sun, 16 Jul 2023

Re: [PATCH v2] x86/kexec: Add EFI config table identity mapping for kexec kernel

2023-08-02 Thread Tao Liu
Hi Borislav, On Sat, Jul 29, 2023 at 12:56 AM Borislav Petkov wrote: > > On Thu, Jul 27, 2023 at 07:03:26PM +0800, Tao Liu wrote: > > Hi Borislav, > > > > Sorry for the late response. I spent some time retesting your patch > > against 6.5.0-rc1 and 6.5.0-rc3, and it is OK. So > > > >