From: Peter Zijlstra <peterz@infradead.org>
To: James Clark <james.clark@arm.com>
Cc: linux-perf-users@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, broonie@kernel.org,
acme@kernel.org, Andrew Kilroy <andrew.kilroy@arm.com>,
Vince Weaver <vincent.weaver@maine.edu>,
Mark Rutland <mark.rutland@arm.com>,
Ingo Molnar <mingo@redhat.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH v2 1/1] perf arm64: Send pointer auth masks to ring buffer
Date: Thu, 20 Oct 2022 19:00:56 +0200 [thread overview]
Message-ID: <Y1F+yAWy4VVaDb+5@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <Y1F8DUWaWhlh/phL@hirez.programming.kicks-ass.net>
On Thu, Oct 20, 2022 at 06:49:17PM +0200, Peter Zijlstra wrote:
> On Thu, Oct 20, 2022 at 11:19:20AM +0100, James Clark wrote:
> > From: Andrew Kilroy <andrew.kilroy@arm.com>
> >
> > Perf report cannot produce callgraphs using dwarf on arm64 where pointer
> > authentication is enabled. This is because libunwind and libdw cannot
> > unmangle instruction pointers that have a pointer authentication code
> > (PAC) embedded in them.
> >
> > libunwind and libdw need to be given an instruction mask which they can
> > use to arrive at the correct return address that does not contain the
> > PAC.
> >
> > The bits in the return address that contain the PAC can differ by
> > process, so this patch adds a new sample field PERF_SAMPLE_ARCH_1
> > to allow the kernel to send the masks up to userspace perf.
> >
> > This field can be used in a architecture specific fashion, but on
> > arm64, it contains the ptrauth mask information. The event will
> > currently fail to open on architectures other than arm64 if
> > PERF_SAMPLE_ARCH_1 is set. It will also fail to open on arm64 if
> > CONFIG_ARM64_PTR_AUTH isn't set, as the data would always be zeros.
>
> A little more information please; wth is pointer authentication? Are we
Mark got me: https://events.static.linuxfound.org/sites/events/files/slides/slides_23.pdf
> going to be having the same thing with x86 LAM where only a subset of
> the available bits have meaning to the hardware?
>
> Why do we want the same mask repeated over and over with each sample;
> should this not be part of the address space (side-band) data?
next prev parent reply other threads:[~2022-10-20 17:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 10:19 [PATCH v2 0/1] Perf stack unwinding with pointer authentication James Clark
2022-10-20 10:19 ` [PATCH v2 1/1] perf arm64: Send pointer auth masks to ring buffer James Clark
2022-10-20 16:49 ` Peter Zijlstra
2022-10-20 17:00 ` Peter Zijlstra [this message]
2022-10-25 15:28 ` James Clark
2022-10-27 14:11 ` James Clark
2022-10-27 17:25 ` Peter Zijlstra
2022-10-27 17:20 ` Peter Zijlstra
2022-10-31 13:48 ` James Clark
2026-03-02 16:33 ` Jakub Brnak
2026-03-03 10:38 ` James Clark
2026-03-03 15:26 ` Jakub Brnak
2026-03-04 9:10 ` James Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1F+yAWy4VVaDb+5@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrew.kilroy@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=vincent.weaver@maine.edu \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox