summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec/errors.rs
diff options
context:
space:
mode:
authorJaewon Jung <jaewon8868@gmail.com>2026-10-28 16:44:54 +0900
committerSteven Rostedt <rostedt@goodmis.org>2026-11-20 10:02:34 -0500
commitcae7fb0d853eff05c70b08ef9e7ecb18867f8945 (patch)
treee8c6965d4574b6c26df991f91c9997ee70b95d6f /rust/kernel/alloc/kvec/errors.rs
parent2b3bed9617bb71c9b1893d9f54ef8df59a239224 (diff)
tracing: Avoid undefined shifts for zero histogram map size
Reject size=0 before calling roundup_pow_of_two(). include/linux/log2.h documents roundup_pow_of_two() as: - the result is undefined when n == 0 With CONFIG_UBSAN_SHIFT=y, a size=0 histogram trigger reports: UBSAN: shift-out-of-bounds in include/linux/log2.h shift exponent 64 is too large for 64-bit type 'long unsigned int' Tested on x86_64 QEMU: size=0 is rejected without UBSAN warnings, and the histogram modifier and parser tests pass. Fixes: 7ef224d1d0e3 ("tracing: Add 'hist' event trigger command") Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261028074610.2212374-1-jaewon8868@gmail.com Signed-off-by: Jaewon Jung <jaewon8868@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions