On Fri, May 5, 2023 at 12:44 AM Jeremy Linton wrote:
>
> 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
On Fri, May 5, 2023 at 12:44 AM Jeremy Linton wrote:
>
> Current compilers note that fname will be null while
> attempting to print failures from strdup().
>
> Further fix a memory leak caused by kernel_uncompressed_buf
> never being used/freed before the allocated block is replaced
> by the one
Hi Jeremy,
Thanks for sharing this. When I get your series, my series is close to
end, so just post it.
My 2/5 is identical to your 4/4, and can be dropped. My 5/5 is similar
to your 2/4, which can be dropped either.
The main difference is about the image probe method. Since the
introduction of
Since slurp_decompress_file() allocates the buffer to hold the content
read from the file, no need to allocate the buffer again.
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a...@kernel.org
Cc: jeremy.lin...@arm.com
---
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.
So reading in the kernel file in a probe file and decide how to unfold
the content by the method itself.
Signed-off-by:
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.
So reading in the kernel file in a probe method and decide how to unfold
the content by the method itself.
Signed-off-by:
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);
Later, info can be used to return both the file descriptor and parsed
slurp_decompress_file() allocates memory but nowhere to free it.
Adding that missing free.
Signed-off-by: Pingfan Liu
To: kexec@lists.infradead.org
Cc: ho...@verge.net.au
Cc: a...@kernel.org
Cc: jeremy.lin...@arm.com
---
kexec/kexec.c | 1 +
1 file changed, 1 insertion(+)
diff --git
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 content by the
On Thu, 4 May 2023 at 18:41, Jeremy Linton wrote:
>
> The linux ZBOOT option creates PEs that contain compressed kernel images
> which are self decompressed on execution by UEFI.
>
> This set adds support for this image format to kexec by decompressing the
> contained kernel image to a temp file,
Current compilers note that fname will be null while
attempting to print failures from strdup().
Further fix a memory leak caused by kernel_uncompressed_buf
never being used/freed before the allocated block is replaced
by the one returned by slurp_decompress_file().
Signed-off-by: Jeremy Linton
The linux ZBOOT option creates PEs that contain compressed kernel images
which are self decompressed on execution by UEFI.
This set adds support for this image format to kexec by decompressing the
contained kernel image to a temp file, then handing the resulting image
off to the existing "Image"
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 alternate kernel image
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 file.
Signed-off-by:
The decision to process a compressed image should
be part of the image specific detection logic. As such
lets clarify the return logic, and remove the is_zlib_file()
logic in the main file type detection loop.
Signed-off-by: Jeremy Linton
---
kexec/arch/arm64/kexec-arm64.c | 6 ++
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 setting for the platform late launch and verifying
that memory
The larger focus of the TrenchBoot project (https://github.com/TrenchBoot) is to
enhance the boot security and integrity in a unified manner. The first area of
focus has been on the Trusted Computing Group's Dynamic Launch for establishing
a hardware Root of Trust for Measurement, also know as
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
into the TPM PCRs using the mainline TPM kernel driver.
The platform
This support allows the DRTM launch to be initiated after and EFI stub
launch of the Linux kernel is done. This is accomplished by providing
a handler to jump to when a Secure Launch is in progress.
Signed-off-by: Ross Philipson
---
drivers/firmware/efi/libstub/x86-stub.c | 55
The Secure Launch MLE environment uses PCRs that are only accessible from
the DRTM locality 2. By default the TPM drivers always initialize the
locality to 0. When a Secure Launch is in progress, initialize the
locality to 2.
Signed-off-by: Ross Philipson
---
drivers/char/tpm/tpm-chip.c | 9
If the MLE kernel is being powered off, rebooted or halted,
then SEXIT must be called. Note that the SEXIT GETSEC leaf
can only be called after a machine_shutdown() has been done on
these paths. The machine_shutdown() is not called on a few paths
like when poweroff action does not have a poweroff
Prior to running the next kernel via kexec, the Secure Launch code
closes down private SMX resources and does an SEXIT. This allows the
next kernel to start normally without any issues starting the APs etc.
Signed-off-by: Ross Philipson
---
arch/x86/kernel/slaunch.c | 69
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 code parked the APs in a pause/jmp loop waiting for an NMI.
The
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 SHA libraries directly in
the code since the compressed kernel is not
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 ++
1 file changed, 270 insertions(+)
create mode 100644
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 file changed, 513 insertions(+)
create mode 100644 include/linux/slaunch.h
diff
From: Arvind Sankar
There are use cases for storing the offset of a symbol in kernel_info.
For example, the trenchboot series [0] needs to store the offset of the
Measured Launch Environment header in kernel_info.
Since commit (note: commit ID from tip/master)
commit 527afc212231 ("x86/boot:
Initial bits to bring in Secure Launch functionality. Add Kconfig
options for compiling in/out the Secure Launch code.
Signed-off-by: Ross Philipson
---
arch/x86/Kconfig | 12
1 file changed, 12 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 53bab12..85ecf3f
On 04/05/23 4:11 am, Eric DeVolder wrote:
Once the kdump service is loaded, if changes to CPUs or memory occur,
either by hot un/plug or off/onlining, the crash elfcorehdr must also
be updated.
The elfcorehdr describes to kdump the CPUs and memory in the system,
and any inaccuracies can
On 04/05/23 3:46 am, Eric DeVolder wrote:
When the kdump service is loaded, if a CPU or memory is hot
un/plugged, the crash elfcorehdr, which describes the CPUs and memory
in the system, must also be updated, else the resulting vmcore is
inaccurate (eg. missing either CPU context or memory
30 matches
Mail list logo