Re: [PATCH v2 1/1] perf arm64: Send pointer auth masks to ring buffer

From: Peter Zijlstra
Date: Thu Oct 27 2022 - 13:25:24 EST


On Thu, Oct 27, 2022 at 03:11:47PM +0100, James Clark wrote:

> Sorry for flip flopping, but I've read those threads that I linked and
> spoke with Kristina and we would like to stick with the per sample
> implementation after all.
>
> The reason is that in the future there may also be a prctrl for 48/52
> bit userspace addressing which would change the mask dynamically in the
> same way as the enabled keys. Although this isn't possible now it makes
> sense to do it this way in case of that, and also for consistency with
> the ptrace feature.
>
> I also think that repeating the mask in this case has a very low impact
> because if you are doing dwarf unwinding, then the whole stack is saved
> anyway, so a few extra u64s wouldn't be noticeable.
>
> Are you ok with that and for me to resubmit with the expanded commit
> message?

But you can send a side-band thing around if/when it changes. Same as
all the other stuff. We don't include MMAP data with each event either.

Yes, the DWARF thing is slow as anything. but imagine needing this for
something else as well, and then you're stuck with it.