linux/arch/riscv/kernel
Breno Leitao 95c54cd9c7 riscv: kexec: Initialize kexec_buf struct
The kexec_buf structure was previously declared without initialization.
commit bf454ec31a ("kexec_file: allow to place kexec_buf randomly")
added a field that is always read but not consistently populated by all
architectures. This un-initialized field will contain garbage.

This is also triggering a UBSAN warning when the uninitialized data was
accessed:

	------------[ cut here ]------------
	UBSAN: invalid-load in ./include/linux/kexec.h:210:10
	load of value 252 is not a valid value for type '_Bool'

Zero-initializing kexec_buf at declaration ensures all fields are
cleanly set, preventing future instances of uninitialized memory being
used.

Fixes: bf454ec31a ("kexec_file: allow to place kexec_buf randomly")
Signed-off-by: Breno Leitao <leitao@debian.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250827-kbuf_all-v1-2-1df9882bb01a@debian.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-09-05 15:31:28 -06:00
..
compat_vdso
pi stackleak: Rename STACKLEAK to KSTACK_ERASE 2025-07-21 21:35:01 -07:00
probes riscv: uprobes: Add missing fence.i after building the XOL buffer 2025-04-24 13:20:02 -07:00
tests
vdso riscv: vdso: Exclude .rodata from the PT_DYNAMIC segment 2025-06-10 13:06:48 -07:00
vendor_extensions riscv: Fix sparse warning in vendor_extensions/sifive.c 2025-06-23 15:57:59 -07:00
.gitignore
Makefile Kbuild updates for v6.16 2025-06-07 10:05:35 -07:00
Makefile.syscalls
acpi.c
acpi_numa.c
alternative.c
asm-offsets.c riscv: uaccess: Only restore the CSR_STATUS SUM bit 2025-06-05 14:03:17 -07:00
bugs.c
cacheinfo.c
cfi.c cfi: Move BPF CFI types and helpers to generic code 2025-07-31 18:23:53 -07:00
compat_signal.c
compat_syscall_table.c
copy-unaligned.S
copy-unaligned.h
cpu-hotplug.c
cpu.c
cpu_ops.c
cpu_ops_sbi.c riscv: cpu_ops_sbi: Use static array for boot_data 2025-06-30 06:58:11 +00:00
cpu_ops_spinwait.c
cpufeature.c riscv: Add support for Zicbop 2025-06-05 11:09:37 -07:00
crash_dump.c
crash_save_regs.S
efi-header.S include: pe.h: Fix PE definitions 2025-05-21 16:46:37 +02:00
efi.c
entry.S riscv: use lw when reading int cpu in new_vmalloc_check 2025-09-05 15:30:45 -06:00
fpu.S
ftrace.c riscv: ftrace: Properly acquire text_mutex to fix a race condition 2025-07-16 08:21:47 -07:00
head.S RISC-V: KVM: Remove scounteren initialization 2025-05-21 09:34:55 +05:30
head.h
hibernate-asm.S
hibernate.c
image-vars.h
irq.c riscv: Helper to parse hart index 2025-06-26 16:06:40 +02:00
jump_label.c
kernel_mode_fpu.c
kernel_mode_vector.c
kexec_elf.c riscv: kexec: Initialize kexec_buf struct 2025-09-05 15:31:28 -06:00
kexec_image.c riscv: kexec: Initialize kexec_buf struct 2025-09-05 15:31:28 -06:00
kexec_relocate.S
kgdb.c riscv: KGDB: Remove ".option norvc/.option rvc" for kgdb_compiled_break 2025-04-16 07:29:34 -07:00
machine_kexec.c
machine_kexec_file.c riscv: kexec: Initialize kexec_buf struct 2025-09-05 15:31:28 -06:00
mcount-dyn.S riscv: ftrace: support direct call using call_ops 2025-06-05 11:09:31 -07:00
mcount.S
module-sections.c riscv: module: Optimize PLT/GOT entry counting 2025-06-05 11:09:43 -07:00
module.c riscv: module: Fix out-of-bounds relocation access 2025-04-14 13:07:07 +00:00
paravirt.c
patch.c
perf_callchain.c
perf_regs.c
process.c RISC-V Patches for the 6.16 Merge Window, Part 1 2025-06-06 18:05:18 -07:00
ptrace.c riscv: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names 2025-07-14 22:27:48 -07:00
reset.c
return_address.c
riscv_ksyms.c
sbi-ipi.c
sbi.c riscv: sbi: add SBI FWFT extension calls 2025-06-04 15:11:02 -07:00
sbi_ecall.c
setup.c riscv: optimize gcd() performance on RISC-V without Zbb extension 2025-07-19 19:08:28 -07:00
signal.c
smp.c riscv: print hartid on bringup 2025-04-01 07:03:03 +00:00
smpboot.c riscv: print hartid on bringup 2025-04-01 07:03:03 +00:00
soc.c
stacktrace.c
suspend.c
suspend_entry.S
sys_hwprobe.c Merge tag 'riscv-mw1-6.16-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux into for-next 2025-06-05 12:26:06 -07:00
sys_riscv.c
syscall_table.c
time.c
traps.c riscv: Enable interrupt during exception handling 2025-07-16 09:05:26 -07:00
traps_misaligned.c riscv: traps_misaligned: properly sign extend value in misaligned load handler 2025-07-16 09:05:39 -07:00
unaligned_access_speed.c riscv: misaligned: request misaligned exception from SBI 2025-06-04 15:11:03 -07:00
vdso.c riscv: enable mseal sysmap for RV64 2025-06-05 14:03:08 -07:00
vec-copy-unaligned.S
vector.c
vendor_extensions.c riscv: Add SiFive xsfvqmaccdod and xsfvqmaccqoq vendor extensions 2025-05-08 11:01:43 -07:00
vmcore_info.c
vmlinux-xip.lds.S
vmlinux.lds.S riscv: Add runtime constant support 2025-03-20 09:15:03 +00:00