diff options
| author | Andy Chiu <tchiu@tenstorrent.com> | 2026-07-24 19:15:50 -0500 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2026-08-20 20:08:50 -0600 |
| commit | 2b05c327597b9f736d1c43fd38ad315055b21a28 (patch) | |
| tree | 999503e533f7d494c7f5d84719b32af18925a061 /scripts/objdiff | |
| parent | 5d8b56956da28eedd30620bc9c10789cf9891ecb (diff) | |
| download | linux-next-2b05c327597b9f736d1c43fd38ad315055b21a28.tar.gz linux-next-2b05c327597b9f736d1c43fd38ad315055b21a28.zip | |
riscv: hwprobe: initialize pair->value in hwprobe_one_pair()
The vendor-extension handlers reached from hwprobe_one_pair()
(hwprobe_isa_vendor_ext_thead_0() and friends) only OR the present bits
into pair->value via VENDOR_EXTENSION_SUPPORTED() and clear their own
missing bits; they assume the caller has already zeroed pair->value.
That holds for hwprobe_get_values() (it zeroes each pair) and
hwprobe_get_cpus() (it re-initializes its scratch pair per key), but not
for complete_hwprobe_vdso_data(), which reuses a single pair across all
keys without re-zeroing. A vendor key therefore inherits stale bits from
the previously probed key, and the wrong value is cached in the vDSO
all_cpu_hwprobe_values[] and handed to userspace on the fast patih.
Zero pair->value once at the top of hwprobe_one_pair() so every handler
starts from a clean value regardless of the caller, and drop the now
redundant zeroing in the *_BLOCK_SIZE cases. hwprobe_isa_ext0() keeps its
own zeroing because hwprobe_ext0_has() calls it directly, bypassing
hwprobe_one_pair().
Fixes: a5ea53da65c5 ("riscv: hwprobe: Add thead vendor extension probing")
Signed-off-by: Andy Chiu <tchiu@tenstorrent.com>
Reviewed-by: Jesse Taube <jtaubepe@redhat.com>
Link: https://patch.msgid.link/20260725001614.2578617-2-tchiu@tenstorrent.com
Cc: stable@vger.kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
