Re: [PATCH] bpf: fix sample_flags for bpf_perf_event_output
From: SeongJae Park
Date: Mon Oct 17 2022 - 19:36:04 EST
On Mon, 17 Oct 2022 15:52:15 -0700 Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> Hi SeongJae,
>
> On Mon, Oct 17, 2022 at 12:27 PM SeongJae Park <sj@xxxxxxxxxx> wrote:
> >
> > Hello,
> >
> >
> > The commit that this patch is fixing[1] also causes yet another segfault for
> > 'perf-script' of tracepoint records. For example:
> >
> > $ sudo timeout 3 perf record -e exceptions:page_fault_user
> > [ perf record: Woken up 1 times to write data ]
> > [ perf record: Captured and wrote 0.228 MB perf.data (74 samples) ]
> > $ sudo perf script
> > Segmentation fault
> >
> > Reverting this patch and the original bug commit[1] fixes the issue. I haven't
> > deep dive yet because I'm not familiar with this area. Anybody has any idea
> > about this?
> >
> > [1] 838d9bb62d13 ("perf: Use sample_flags for raw_data")
>
> Sorry for the trouble.
No problem.
> I think you also need to apply the below:
>
> https://lore.kernel.org/r/20221012143857.48198-1-james.clark@xxxxxxx
Thank you for this nice answer. I confirmed that this fixes my issue.
Thanks,
SJ
[...]