The objcopy binary can append an section into PE file, but it disregards
the DOS header. While the zboot format carries important information:
payload offset and size in the DOS header.
In order to keep track and update such information, here introducing a
dedicated binary tool to build zboot imag
This BPF program aligns with the convention defined in the kernel file
kexec_pe_parser_bpf.lskel.h, where the interface between the BPF program
and the kernel is established, and is composed of:
four maps:
struct bpf_map_desc ringbuf_1;
struct bpf_map_des
Now everything is ready for kexec PE image parser. Select it on arm64
for zboot and UKI image support.
Signed-off-by: Pingfan Liu
Acked-by: Catalin Marinas
Cc: Will Deacon
To: linux-arm-ker...@lists.infradead.org
---
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/kexec.h
The routine to search a symbol in ELF can be shared, so split it out.
Signed-off-by: Pingfan Liu
Cc: Baoquan He
Cc: Dave Young
Cc: Andrew Morton
Cc: Philipp Rudo
To: ke...@lists.infradead.org
---
include/linux/kexec.h | 8
kernel/kexec_file.c | 86 +++-
All kexec PE bpf prog should align with the interface exposed by the
light skeleton
four maps:
struct bpf_map_desc ringbuf_1;
struct bpf_map_desc ringbuf_2;
struct bpf_map_desc ringbuf_3;
struct bpf_map_desc ringbuf
Analague to kernel/bpf/preload/iterators/Makefile,
this Makefile is not invoked by the Kbuild system. It needs to be
invoked manually when kexec_pe_parser_bpf.c is changed so that
kexec_pe_parser_bpf.lskel.h can be re-generated by the command "bpftool
gen skeleton -L kexec_pe_parser_bpf.o".
kexec_
This patch does two things:
First, register as a listener on bpf_copy_to_kernel()
Second, in order that the hooked bpf-prog can call the sleepable kfuncs,
bpf_handle_pefile and bpf_post_handle_pefile are marked as
KF_SLEEPABLE.
Signed-off-by: Pingfan Liu
Cc: Alexei Starovoitov
Cc: Philipp Rudo
As UEFI becomes popular, a few architectures support to boot a PE format
kernel image directly. But the internal of PE format varies, which means
each parser for each format.
This patch (with the rest in this series) introduces a common skeleton
to all parsers, and leave the format parsing in
bpf-
This commit bridges the gap between bpf-prog and the kernel
decompression routines. At present, only a global memory allocator is
used for the decompression. Later, if needed, the decompress_fn's
prototype can be changed to pass in a task related allocator.
This memory allocator can allocate 2MB e
In the security kexec_file_load case, the buffer which holds the kernel
image should not be accessible from the userspace.
Typically, BPF data flow occurs between user space and kernel space in
either direction. However, kexec_file_load presents a unique case where
user-originated data must be pa
The KEXE PE format parser needs the kernel built-in decompressor to
decompress the kernel image. So moving the decompressor out of __init
sections.
Signed-off-by: Pingfan Liu
Cc: Andrew Morton
To: linux-ker...@vger.kernel.org
---
include/linux/decompress/mm.h | 7 +++
lib/Kconfig
In latter patches, PE format parser will extract the linux kernel inside
and try its real format parser. So making kexec_image_load_default
global.
Signed-off-by: Pingfan Liu
Cc: Baoquan He
Cc: Dave Young
Cc: Andrew Morton
To: ke...@lists.infradead.org
---
include/linux/kexec.h | 1 +
kernel/
Cc systemd-devel@lists.freedesktop.org so any UKI expert can comment
*** Review the history ***
Nowadays UEFI PE bootable image is more and more popular on the distribution.
But it is still an open issue to load that kind of image by kexec with IMA
enabled
There are several approaches to reslov
On Sa, 16.08.25 22:47, Demi Marie Obenour (demioben...@gmail.com) wrote:
> On a system where /etc is read-only, systemd-logind fails to start.
> I have tried making / a writable overlayfs without any success so
> far. The code is at https://github.com/DemiMarie/spectrum (branch
> b4/systemd) and
14 matches
Mail list logo