summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-12-11 19:00:35 -0800
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-01-13 13:21:03 +0100
commit0fdf6323c35a134f206dcad5babb4ff488552076 (patch)
tree69657657f0c151a4c541ae5250643ccc97fa1d02 /tools/perf/scripts/python/flamegraph.py
parenta813338d910b49375018ebe960f912ca7672f88c (diff)
media: solo6x10: Check for out of bounds chip_id
Clang with CONFIG_UBSAN_SHIFT=y noticed a condition where a signed type (literal "1" is an "int") could end up being shifted beyond 32 bits, so instrumentation was added (and due to the double is_tw286x() call seen via inlining), Clang decides the second one must now be undefined behavior and elides the rest of the function[1]. This is a known problem with Clang (that is still being worked on), but we can avoid the entire problem by actually checking the existing max chip ID, and now there is no runtime instrumentation added at all since everything is known to be within bounds. Additionally use an unsigned value for the shift to remove the instrumentation even without the explicit bounds checking. Link: https://github.com/ClangBuiltLinux/linux/issues/2144 [1] Suggested-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> [hverkuil: fix checkpatch warning for is_tw286x]
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions