From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Torsten Duwe <duwe@lst.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Jiri Kosina <jkosina@suse.cz>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Nicholas Piggin <npiggin@gmail.com>,
live-patching@vger.kernel.org
Subject: Re: [PATCH v3] On ppc64le we HAVE_RELIABLE_STACKTRACE
Date: Mon, 7 May 2018 10:42:08 -0500 [thread overview]
Message-ID: <20180507154208.jo4s43olrf5a3hw4@treble> (raw)
In-Reply-To: <20180504123834.GA16581@lst.de>
On Fri, May 04, 2018 at 02:38:34PM +0200, Torsten Duwe wrote:
>
> The "Power Architecture 64-Bit ELF V2 ABI" says in section 2.3.2.3:
>
> [...] There are several rules that must be adhered to in order to ensure
> reliable and consistent call chain backtracing:
>
> * Before a function calls any other function, it shall establish its
> own stack frame, whose size shall be a multiple of 16 bytes.
>
> – In instances where a function’s prologue creates a stack frame, the
> back-chain word of the stack frame shall be updated atomically with
> the value of the stack pointer (r1) when a back chain is implemented.
> (This must be supported as default by all ELF V2 ABI-compliant
> environments.)
> [...]
> – The function shall save the link register that contains its return
> address in the LR save doubleword of its caller’s stack frame before
> calling another function.
>
> To me this sounds like the equivalent of HAVE_RELIABLE_STACKTRACE.
> This patch may be unneccessarily limited to ppc64le, but OTOH the only
> user of this flag so far is livepatching, which is only implemented on
> PPCs with 64-LE, a.k.a. ELF ABI v2.
>
> Feel free to add other ppc variants, but so far only ppc64le got tested.
>
> This change also implements save_stack_trace_tsk_reliable() for ppc64le
> that checks for the above conditions, where possible.
>
> Signed-off-by: Torsten Duwe <duwe@suse.de>
> Signed-off-by: Nicolai Stange <nstange@suse.de>
The subject doesn't actively describe what the patch does, maybe change
it to something like:
powerpc: Add support for HAVE_RELIABLE_STACKTRACE
or maybe
powerpc: Add support for livepatch consistency model
Otherwise it looks great to me.
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
--
Josh
next prev parent reply other threads:[~2018-05-07 15:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-05 16:49 [PATCH v2] On ppc64le we HAVE_RELIABLE_STACKTRACE Torsten Duwe
2018-03-05 17:09 ` Segher Boessenkool
2018-03-08 16:26 ` Josh Poimboeuf
2018-03-09 16:47 ` Torsten Duwe
2018-03-12 15:35 ` Josh Poimboeuf
2018-05-04 12:38 ` [PATCH v3] " Torsten Duwe
2018-05-07 15:42 ` Josh Poimboeuf [this message]
2018-05-08 8:38 ` [PATCH v3] ppc64le livepatch: implement reliable stacktrace for newer consistency models Torsten Duwe
2018-05-09 0:14 ` Josh Poimboeuf
2018-05-09 1:41 ` Michael Ellerman
2018-05-09 10:35 ` Torsten Duwe
2018-05-10 14:06 ` [v3] On ppc64le we HAVE_RELIABLE_STACKTRACE Michael Ellerman
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=20180507154208.jo4s43olrf5a3hw4@treble \
--to=jpoimboe@redhat.com \
--cc=duwe@lst.de \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=live-patching@vger.kernel.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
/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