Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications
From: Peter Zijlstra
Date: Fri Aug 02 2024 - 05:26:47 EST
On Thu, Aug 01, 2024 at 02:13:41PM -0700, Andrii Nakryiko wrote:
> Ok, this bisected to:
>
> 675ad74989c2 ("perf/core: Add aux_pause, aux_resume, aux_start_paused")
Adrian, there are at least two obvious bugs there:
- aux_action was key's off of PERF_PMU_CAP_AUX_OUTPUT, which is not
right, that's the capability where events can output to AUX -- aka.
PEBS-to-PT. It should be PERF_PMU_CAP_ITRACE, which is the
PT/CoreSight thing.
- it sets aux_paused unconditionally, which is scribbling in the giant
union which is overwriting state set by perf_init_event().
But I think there's more problems, we need to do the aux_action
validation after perf_get_aux_event(), we can't know if having those
bits set makes sense before that. This means the perf_event_alloc() site
is wrong in the first place.
I'm going to drop these patches for now. Please rework.