diff options
| author | Daniel Borkmann <daniel@iogearbox.net> | 2026-10-18 13:33:52 +0200 |
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2026-10-18 17:02:37 +0200 |
| commit | 73a5accbfd210bda7e88e969310f15f8e515dc86 (patch) | |
| tree | b08ce0952657c0b16591b75c53e513756d5640dd /tools/perf/scripts/python/netdev-times.py | |
| parent | a6303535c2ad9d49598d52556183911f02287791 (diff) | |
bpf, x86: Mask the shift counts of the magic number division
The kernel test robot reports for a clang 22 randconfig with UBSAN
and ThinLTO:
vmlinux.o: error: objtool: do_jit(): unexpected end of section .text.do_jit
Fix by masking the counts to their range like rol64() does, which keeps the
shifts defined for the sanitizer and removes the __ubsan_handle_shift_out_of_bounds()
checks. The counts are below 32 and 64 anyway, so the emitted code does not
change. Reproduced with clang 20 and the robot's config without LTO.
Fixes: 02cfd66f3d9a ("bpf, x86: Divide by constants via multiplication with a magic number")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202610171029.DfoBvNXv-lkp@intel.com/
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20261018113352.730799-1-daniel@iogearbox.net
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions
