On Tue, Aug 19, 2025 at 09:24:26AM +0800, Pingfan Liu wrote:
> 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..
.data section remains unchanged. Therefore, the .data
section offset in the new PE file, plus the payload offset within that
section, yields the payload offset within the new PE file.
Finally, the new PE file 'zboot.efi' can be got by the command:
make -C tools/kexec zboot
Signed-off-by:
ced from
the size of the uncompressed file 'vmlinux.bin', which is usually less
than 64MB. With the help of a group of bpf kfuncs: bpf_decompress(),
bpf_copy_to_kernel(), bpf_mem_range_result_put(), this bpf-prog stores
the uncompressed kernel image inside the kernel space.
Signed-o
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
ation of the ringbuf
size, the bpf-prog writer can change its proper size according to
the kernel image size without modifying the kernel code)
Signed-off-by: Pingfan Liu
Cc: Alexei Starovoitov
Cc: Baoquan He
Cc: Dave Young
Cc: Andrew Morton
Cc: Philipp Rudo
Cc: b...@vg
SEC("fentry.s/bpf_post_handle_pefile")
They are fixed and provided for all kinds of bpf-prog which interacts
with the kexec kernel component.
Signed-off-by: Pingfan Liu
Cc: Alexei Starovoitov
Cc: Baoquan He
Cc: Dave Young
Cc: Andrew Morton
Cc: Philipp Rudo
Cc: b...@vger.kernel.org
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
the bpf bytecode is
extracted from the '.bpf' section in the PE file.
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 | 1 +
kernel/Kconfig.kexec| 9 ++
kernel/Ma
e 2MB each time with a transient
virtual address, up to a 1GB limit. After decompression finishes, it
presents all of the decompressed data in a new unified virtual
address space.
Signed-off-by: Pingfan Liu
Cc: Alexei Starovoitov
Cc: Daniel Borkmann
Cc: John Fastabend
Cc: Andrii Nakryiko
Cc: M
parsed and then forwarded to the kernel for
subsequent parsing stages. This necessitates a mechanism to channel the
intermedia data from the BPF program directly to the kernel.
bpf_kexec_carrier() is introduced to serve that purpose.
Signed-off-by: Pingfan Liu
Cc: Alexei Starovoitov
Cc: Daniel
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
and mark them sleepable
- use listener and publisher model to implement bpf_copy_to_kernel()
- keep each introduced kfunc under the control of memcg
RFCv1 -> RFCv2
- Use bpf kfunc instead of helper
- Use C source code to generate the light skeleton file
*** BLURB HERE ***
Pingfan Liu (12)
14 matches
Mail list logo