diff options
| author | Marco Elver <[email protected]> | 2022-01-31 10:34:05 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2022-02-02 12:11:40 +0000 |
| commit | 3c25fc97f5590060464cabfa25710970ecddbc96 (patch) | |
| tree | 16a12a50cc2b3d8f07d543968e4145eb096f78e8 /lib/test_overflow.c | |
| parent | x86/perf: Default set FREEZE_ON_SMI for all (diff) | |
| download | kernel-3c25fc97f5590060464cabfa25710970ecddbc96.tar.gz kernel-3c25fc97f5590060464cabfa25710970ecddbc96.zip | |
perf: Copy perf_event_attr::sig_data on modification
The intent has always been that perf_event_attr::sig_data should also be
modifiable along with PERF_EVENT_IOC_MODIFY_ATTRIBUTES, because it is
observable by user space if SIGTRAP on events is requested.
Currently only PERF_TYPE_BREAKPOINT is modifiable, and explicitly copies
relevant breakpoint-related attributes in hw_breakpoint_copy_attr().
This misses copying perf_event_attr::sig_data.
Since sig_data is not specific to PERF_TYPE_BREAKPOINT, introduce a
helper to copy generic event-type-independent attributes on
modification.
Fixes: 97ba62b27867 ("perf: Add support for SIGTRAP on perf events")
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
