aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorAdrian Hunter <[email protected]>2024-06-24 23:11:00 +0300
committerPeter Zijlstra <[email protected]>2024-07-04 16:00:23 +0200
commit43deb76b19663a96ec2189d8f4eb9a9dc2d7623f (patch)
tree7eeecacf11ab99771efdcb7e15219b909e43bdb4 /tools/testing/selftests/bpf/progs/test_autoload.c
parentdbc48c8f41c208082cfa95e973560134489e3309 (diff)
perf: Fix default aux_watermark calculation
The default aux_watermark is half the AUX area buffer size. In general, on a 64-bit architecture, the AUX area buffer size could be a bigger than fits in a 32-bit type, but the calculation does not allow for that possibility. However the aux_watermark value is recorded in a u32, so should not be more than U32_MAX either. Fix by doing the calculation in a correctly sized type, and limiting the result to U32_MAX. Fixes: d68e6799a5c8 ("perf: Cap allocation order at aux_watermark") Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions