Re: [PATCH 2/3] RISC-V: use memcpy for kexec_file mode

2021-10-31 Thread Björn Töpel
On Sat, 30 Oct 2021 at 05:51, Eric W. Biederman wrote: > > Liao Chang writes: > > > The pointer to buffer loading kernel binaries is in kernel space for > > kexec_fil mode, When copy_from_user copies data from pointer to a block > > of memory, it checkes that the pointer is in the user space rang

[PATCH 0/4] kexec-tools RISC-V port

2025-04-09 Thread Björn Töpel
From: Björn Töpel Hi! This is an attempt to finally get the RISC-V patches for kexec-tools upstream. Simon suggested in [1] that: > In my mind the big question is how to move RISC-V support from that > branch, to being merged into main. > > IIRC there were some issues that

[PATCH 2/4] RISC-V: Enable kexec_file_load syscall

2025-04-09 Thread Björn Töpel
From: Li Zhengyu Create prepare_kexec_file_options() function to prepare the options to kexec_file_load syscall, and it would be used in elf_riscv_load() or the future image_riscv_load(). The patch comes from the RISC-V Linux kernel_file_load support[1], So its author should be Li Zhengyu. [1]:

[PATCH 3/4] RISC-V: Separate elf_riscv_find_pbase out

2025-04-09 Thread Björn Töpel
From: Song Shuai The is the preparative patch for RISC-V kexec Image file support. Separate the elf_riscv_find_pbase() function out to allow kernel_load syscall load Image binary file. Signed-off-by: Song Shuai --- kexec/arch/riscv/kexec-elf-riscv.c | 72 +- kexec/

[PATCH 4/4] RISC-V: Support loading Image binary file

2025-04-09 Thread Björn Töpel
From: Song Shuai Add image-riscv file_type to probe/load Image file type, As for kexec_load, find the pbase aligned text_offset from image header and prepare segments for this syscall. for kexec_file_load, setup the related options and let kernel part to deal with the Image. Signed-off-by: Son

Re: [PATCH 1/4] RISC-V: Add support for riscv kexec/kdump on kexec-tools

2025-04-22 Thread Björn Töpel
Simon! Simon Horman writes: > Thanks Björn, > > Overall I am happy with this patchset. But there are a few minor points > I'd like addressed, which relate strictly to build coverage and the CI. > I can handle these myself if you prefer. It's really up to you! What do you prefer? I can spin a v2

[PATCH 1/4] RISC-V: Add support for riscv kexec/kdump on kexec-tools

2025-04-14 Thread Björn Töpel
via parsing dtb, but it can't see the Reserved EFI Runtime memory. That would corrupt EFI Runtime memory and fail the kexeced kernel to deal EFI stuff. In my test, the kexeced kernel warned "efi: System table signature incorrect!" and then paniced at efi_call_rt

[PATCH v2 1/4] RISC-V: Add support for riscv kexec/kdump on kexec-tools

2025-04-23 Thread Björn Töpel
"efi: System table signature incorrect!" and then paniced at efi_call_rts() due to the null efi.runtime. So we should use /proc/iomem to get memory ranges. Björn Töpel: * Massaged this commit message! * Fixed up the build, by adding missing RV stub. * RISC-V: Only cap the upper/end

[PATCH v2 3/4] RISC-V: Separate elf_riscv_find_pbase out

2025-04-22 Thread Björn Töpel
From: Song Shuai The is the preparative patch for RISC-V kexec Image file support. Separate the elf_riscv_find_pbase() function out to allow kernel_load syscall load Image binary file. Signed-off-by: Song Shuai --- kexec/arch/riscv/kexec-elf-riscv.c | 72 +- kexec/

[PATCH v2 0/4] kexec-tools RISC-V port

2025-04-22 Thread Björn Töpel
From: Björn Töpel Hi! *Patch history* v1: https://lore.kernel.org/kexec/20250409201428.648717-1-bj...@kernel.org/ v2: Added Github Actions support for riscv64 (Simon) Sorted filenames in Makefile (Simon) Added missing dist files (Simon) Fixed mips build (Simon) Here's a pass

[PATCH v2 2/4] RISC-V: Enable kexec_file_load syscall

2025-04-22 Thread Björn Töpel
From: Li Zhengyu Create prepare_kexec_file_options() function to prepare the options to kexec_file_load syscall, and it would be used in elf_riscv_load() or the future image_riscv_load(). The patch comes from the RISC-V Linux kernel_file_load support[1], So its author should be Li Zhengyu. [1]:

[PATCH v2 4/4] RISC-V: Support loading Image binary file

2025-04-22 Thread Björn Töpel
From: Song Shuai Add image-riscv file_type to probe/load Image file type, As for kexec_load, find the pbase aligned text_offset from image header and prepare segments for this syscall. for kexec_file_load, setup the related options and let kernel part to deal with the Image. Signed-off-by: Son