aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorMarco Elver <[email protected]>2022-01-31 10:34:07 +0000
committerPeter Zijlstra <[email protected]>2022-02-02 12:11:40 +0000
commitddecd22878601a606d160680fa85802b75d92eb6 (patch)
treee3e3e3e0d39ced09c898006b35437ad933c52fe8 /lib/test_overflow.c
parentselftests/perf_events: Test modification of perf_event_attr::sig_data (diff)
downloadkernel-ddecd22878601a606d160680fa85802b75d92eb6.tar.gz
kernel-ddecd22878601a606d160680fa85802b75d92eb6.zip
perf: uapi: Document perf_event_attr::sig_data truncation on 32 bit architectures
Due to the alignment requirements of siginfo_t, as described in 3ddb3fd8cdb0 ("signal, perf: Fix siginfo_t by avoiding u64 on 32-bit architectures"), siginfo_t::si_perf_data is limited to an unsigned long. However, perf_event_attr::sig_data is an u64, to avoid having to deal with compat conversions. Due to being an u64, it may not immediately be clear to users that sig_data is truncated on 32 bit architectures. Add a comment to explicitly point this out, and hopefully help some users save time by not having to deduce themselves what's happening. Reported-by: Dmitry Vyukov <[email protected]> Signed-off-by: Marco Elver <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Dmitry Vyukov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions