Re: [PATCH 1/3] perf: Copy perf_event_attr::sig_data on modification

Peter Zijlstra
2022-02-01T11:07:34Z

On Tue, Feb 01, 2022 at 08:32:45AM +0100, Dmitry Vyukov wrote:
> On Mon, 31 Jan 2022 at 11:34, Marco Elver <elver@google.com> wrote:
> >
> > 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 <dvyukov@google.com>
> > Signed-off-by: Marco Elver <elver@google.com>
>
> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>

Thanks guys! Queued for perf/urgent