diff options
| author | Breno Leitao <[email protected]> | 2025-08-27 10:42:22 +0000 |
|---|---|---|
| committer | Paul Walmsley <[email protected]> | 2025-09-05 21:31:28 +0000 |
| commit | 95c54cd9c769a198118772e196adfaa1f002e365 (patch) | |
| tree | de38370d4934604157859a8a10123a1ec452fa6e /scripts/extract-fwblobs | |
| parent | riscv: use lw when reading int cpu in asm_per_cpu (diff) | |
| download | kernel-95c54cd9c769a198118772e196adfaa1f002e365.tar.gz kernel-95c54cd9c769a198118772e196adfaa1f002e365.zip | |
riscv: kexec: Initialize kexec_buf struct
The kexec_buf structure was previously declared without initialization.
commit bf454ec31add ("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: bf454ec31add ("kexec_file: allow to place kexec_buf randomly")
Signed-off-by: Breno Leitao <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paul Walmsley <[email protected]>
Diffstat (limited to 'scripts/extract-fwblobs')
0 files changed, 0 insertions, 0 deletions
