linux/arch/riscv
Mark Harris 5caae1deee riscv: hwprobe: Avoid uninitialized read in hwprobe_get_cpus()
When cpusetsize < cpumask_size(), hwprobe_get_cpus() did not fully
initialize its copy of the cpu mask, which could cause non-deterministic
results from the riscv_hwprobe syscall on a system with more than 8 CPUs
when the supplied cpu mask is empty.  Address this by fully initializing
the cpu mask.

Fixes: e178bf146e ("RISC-V: hwprobe: Introduce which-cpus flag")
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Reviewed-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Michael Ellerman <mpe@kernel.org>
Link: https://patch.msgid.link/20260714003056.73707-1-mark.hsj@gmail.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-07-15 11:12:40 -06:00
..
boot soc: devicetree updates for 7.2 2026-06-17 11:16:56 -07:00
configs riscv: defconfig: enable ARCH_ULTRARISC 2026-07-08 10:41:40 -06:00
crypto crypto: riscv/aes - replace min_t with min in riscv64_aes_ctr_crypt 2026-05-22 20:25:29 +08:00
errata riscv: errata: Fix bitwise vs logical AND in MIPS errata patching 2026-04-30 20:00:14 -06:00
include riscv: io: avoid null-pointer arithmetic in PIO helpers 2026-07-13 12:01:49 -06:00
kernel riscv: hwprobe: Avoid uninitialized read in hwprobe_get_cpus() 2026-07-15 11:12:40 -06:00
kvm riscv: kvm: Use endian-specific __lelong for NACL shared memory 2026-06-14 11:09:41 +05:30
lib riscv: add platform-specific double word shifts for riscv32 2026-05-28 21:24:51 -07:00
mm riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU 2026-07-13 11:29:52 -06:00
net bpf: Restrict JIT predictor flush to cBPF 2026-07-01 10:33:38 +02:00
purgatory riscv/purgatory: add asm/purgatory.h 2026-06-06 20:17:52 -06:00
tools riscv: Stop considering R_RISCV_NONE as bad relocations 2025-07-16 08:13:55 -07:00
Kbuild riscv: migrate to the generic rule for built-in DTB 2025-03-18 13:30:13 +00:00
Kconfig riscv: Gate FUNCTION_ALIGNMENT_4B on DYNAMIC_FTRACE 2026-07-13 11:38:56 -06:00
Kconfig.debug
Kconfig.errata riscv: ERRATA_STARFIVE_JH7100: Fix missing dependency on new CONFIG_CACHEMAINT_FOR_DMA 2026-01-15 18:13:04 -07:00
Kconfig.socs riscv: add UltraRISC SoC family Kconfig support 2026-07-08 10:39:49 -06:00
Kconfig.vendor riscv: Add xmipsexectl as a vendor extension 2025-09-18 20:36:00 -06:00
Makefile riscv: Remove support for XIP kernel 2026-04-04 18:42:44 -06:00
Makefile.postlink kbuild: Create intermediate vmlinux build with relocations preserved 2025-03-17 00:29:50 +09:00