linux-toolchains.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Weinan Liu <wnliu@google.com>
To: ptsm@linux.microsoft.com
Cc: indu.bhagat@oracle.com, irogers@google.com,
	joe.lawrence@redhat.com,  jpoimboe@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, linux-toolchains@vger.kernel.org,
	 live-patching@vger.kernel.org, mark.rutland@arm.com,
	peterz@infradead.org,  roman.gushchin@linux.dev,
	rostedt@goodmis.org, will@kernel.org,  wnliu@google.com
Subject: Re: [PATCH 4/8] unwind: Implement generic sframe unwinder library
Date: Sun,  2 Feb 2025 06:27:26 +0000	[thread overview]
Message-ID: <20250202062728.753686-1-wnliu@google.com> (raw)
In-Reply-To: <c034b597-e128-4356-bcc9-79fb5e39a844@linux.microsoft.com>

On Thu, Jan 30, 2025 at 2:22 AM Prasanna Kumar T S M <ptsm@linux.microsoft.com> wrote:
> On 28-01-2025 03:03, Weinan Liu wrote:
> > diff --git a/include/linux/sframe_lookup.h b/include/linux/sframe_lookup.h
> > new file mode 100644
> > index 000000000000..1c26cf1f38d4
> > --- /dev/null
> > +++ b/include/linux/sframe_lookup.h
> > @@ -0,0 +1,43 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +#ifndef _LINUX_SFRAME_LOOKUP_H
> > +#define _LINUX_SFRAME_LOOKUP_H
> > +
> > +/**
> > + * struct sframe_ip_entry - sframe unwind info for given ip
> > + * @cfa_offset: Offset for the Canonical Frame Address(CFA) from Frame
> > + *              Pointer(FP) or Stack Pointer(SP)
> > + * @ra_offset: Offset for the Return Address from CFA.
> > + * @fp_offset: Offset for the Frame Pointer (FP) from CFA.
> > + * @use_fp: Use FP to get next CFA or not
> > + */
> > +struct sframe_ip_entry {
> > +	int32_t cfa_offset;
> > +	int32_t ra_offset;
> 
> The ra_offset is not present for x86_64 in SFrame FRE as per the spec. I 
> am wondering whether this struct should change based on the architecture 
> or just set ra_offset calculated from cfa_offset for x86_64.

According to the https://sourceware.org/binutils/docs/sframe-spec.html#AMD64
For x86_64, RA will be stored at a fixed offset from the CFA upon function entry. 
The ra_offset will set to sfhdr_p->cfa_fixed_ra_offset during the initialization
of the sframe_ip_entry within the function sframe_find_pc()

  parent reply	other threads:[~2025-02-02  6:27 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 21:33 [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel Weinan Liu
2025-01-27 21:33 ` [PATCH 1/8] unwind: build kernel with sframe info Weinan Liu
2025-01-30  9:45   ` Prasanna Kumar T S M
2025-02-05  0:22   ` Indu Bhagat
2025-02-07 18:01     ` Josh Poimboeuf
2025-01-27 21:33 ` [PATCH 2/8] arm64: entry: add unwind info for various kernel entries Weinan Liu
2025-01-27 21:33 ` [PATCH 3/8] unwind: add sframe v2 header Weinan Liu
2025-01-30  9:53   ` Prasanna Kumar T S M
2025-02-07 18:05   ` Josh Poimboeuf
2025-01-27 21:33 ` [PATCH 4/8] unwind: Implement generic sframe unwinder library Weinan Liu
2025-01-30 10:22   ` Prasanna Kumar T S M
2025-01-30 10:29     ` Prasanna Kumar T S M
2025-02-02  6:27     ` Weinan Liu [this message]
2025-02-02  6:37       ` Weinan Liu
2025-01-27 21:33 ` [PATCH 5/8] unwind: arm64: Add sframe unwinder on arm64 Weinan Liu
2025-01-30 10:34   ` Prasanna Kumar T S M
2025-01-27 21:33 ` [PATCH 6/8] unwind: arm64: add reliable stacktrace support for arm64 Weinan Liu
2025-01-30 10:36   ` Prasanna Kumar T S M
2025-01-27 21:33 ` [PATCH 7/8] arm64: Define TIF_PATCH_PENDING for livepatch Weinan Liu
2025-01-30  9:54   ` Prasanna Kumar T S M
2025-02-27 12:10   ` Miroslav Benes
2025-01-27 21:33 ` [PATCH 8/8] arm64: Enable livepatch for ARM64 Weinan Liu
2025-01-30  9:55   ` Prasanna Kumar T S M
2025-01-31 16:08   ` Prasanna Kumar T S M
2025-02-03 15:16     ` Steven Rostedt
2025-01-28 15:35 ` [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel Indu Bhagat
2025-01-29  7:23   ` Weinan Liu
2025-01-30 17:59 ` Song Liu
2025-01-30 18:34   ` Song Liu
2025-01-30 19:01     ` Roman Gushchin
2025-01-30 19:18       ` Song Liu
2025-02-04 14:49 ` Puranjay Mohan
2025-02-04 23:52   ` Puranjay Mohan
2025-02-06 15:02     ` Weinan Liu
2025-02-07 12:16       ` Puranjay Mohan
2025-02-07 17:52         ` Josh Poimboeuf
2025-02-10  8:30         ` Weinan Liu
2025-02-25  1:02           ` Weinan Liu
2025-02-25 18:13             ` Josh Poimboeuf
2025-02-25 23:01               ` Weinan Liu
2025-02-25 19:38             ` Indu Bhagat
2025-02-25 23:54               ` Weinan Liu
2025-02-26  0:22                 ` Indu Bhagat
2025-02-26 10:23                   ` Puranjay Mohan
2025-02-26 17:40                     ` Indu Bhagat
2025-02-27  9:38                       ` Puranjay Mohan
2025-02-28  6:47                         ` Indu Bhagat
2025-03-09 14:43                           ` Indu Bhagat
2025-02-12 23:32 ` Song Liu
2025-02-12 23:49   ` Josh Poimboeuf
2025-02-13  2:36     ` Song Liu
2025-02-13  2:45       ` Josh Poimboeuf
2025-02-13  7:25         ` Song Liu
2025-02-13  7:46           ` Puranjay Mohan
2025-02-13 19:40             ` Song Liu
2025-02-14  8:08               ` Josh Poimboeuf
2025-02-14 17:51                 ` Song Liu
2025-02-14 19:34                   ` Josh Poimboeuf
2025-02-14 22:04                     ` Song Liu
2025-02-14 22:33                       ` Josh Poimboeuf
2025-02-14 23:23                       ` Josh Poimboeuf
2025-02-18  4:38                         ` Song Liu
2025-02-18  6:37                           ` Josh Poimboeuf
2025-02-18 18:20                             ` Song Liu
2025-02-18 18:40                               ` Josh Poimboeuf
2025-02-19 17:44                                 ` Song Liu
2025-02-20  4:50                                   ` Song Liu
2025-02-20 18:22                                     ` Josh Poimboeuf
     [not found]                                       ` <CAPhsuW53DK2vFH-BZeUYN-eythX3NQEbcxrYf6jvBDtDmctRgw@mail.gmail.com>
2025-02-25  0:13                                         ` Song Liu
2025-02-13 23:22           ` Indu Bhagat
2025-02-13 23:47             ` Song Liu
2025-02-14  7:57             ` Puranjay Mohan
2025-02-14 17:39               ` Indu Bhagat
2025-02-14 18:41                 ` Indu Bhagat
2025-02-14 18:58                   ` Puranjay Mohan
2025-02-14 19:38                     ` Josh Poimboeuf
2025-02-14 19:42                       ` Josh Poimboeuf
2025-02-13  0:09   ` Indu Bhagat
2025-02-13  2:40     ` Song Liu
2025-02-13  2:52       ` Josh Poimboeuf
2025-02-13  7:26       ` Puranjay Mohan
2025-02-13  7:37         ` Song Liu
2025-02-13  7:53           ` Puranjay Mohan
2025-02-13 19:42             ` Song Liu
2025-02-13  8:37           ` Puranjay Mohan
2025-02-13 20:46             ` Song Liu
2025-02-13 22:21               ` Puranjay Mohan
2025-02-13 23:34                 ` Song Liu
2025-02-14  1:58                 ` Song Liu
2025-02-14  8:56                   ` Puranjay Mohan
2025-02-14 18:10                     ` Song Liu
2025-02-14 18:24                     ` Josh Poimboeuf

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=20250202062728.753686-1-wnliu@google.com \
    --to=wnliu@google.com \
    --cc=indu.bhagat@oracle.com \
    --cc=irogers@google.com \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-toolchains@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peterz@infradead.org \
    --cc=ptsm@linux.microsoft.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rostedt@goodmis.org \
    --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;
as well as URLs for NNTP newsgroup(s).