diff options
author | Kees Cook <[email protected]> | 2022-10-25 15:39:35 -0700 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2022-10-27 15:48:19 +0200 |
commit | 12d6c1d3a2ad0c199ec57c201cdc71e8e157a232 (patch) | |
tree | 3b45dd1b420da8afe177d6ae9bc67e1ef12f735c /tools/perf/scripts/python/check-perf-trace.py | |
parent | 99c8eb46773e5cfc5d868b35b77b1e2e19f8bec8 (diff) |
skbuff: Proactively round up to kmalloc bucket size
Instead of discovering the kmalloc bucket size _after_ allocation, round
up proactively so the allocation is explicitly made for the full size,
allowing the compiler to correctly reason about the resulting size of
the buffer through the existing __alloc_size() hint.
This will allow for kernels built with CONFIG_UBSAN_BOUNDS or the
coming dynamic bounds checking under CONFIG_FORTIFY_SOURCE to gain
back the __alloc_size() hints that were temporarily reverted in commit
93dd04ab0b2b ("slab: remove __alloc_size attribute from __kmalloc_track_caller")
Cc: "David S. Miller" <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: David Rientjes <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Link: https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions