linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: Daniel Kiss <Daniel.Kiss@arm.com>
Cc: "kernel-team@android.com" <kernel-team@android.com>,
	Szabolcs Nagy <Szabolcs.Nagy@arm.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tamas Zsoldos <Tamas.Zsoldos@arm.com>,
	Vincenzo Frascino <Vincenzo.Frascino@arm.com>,
	Will Deacon <will@kernel.org>, Ard Biesheuvel <ardb@kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 0/6] Fix unwinding through sigreturn trampolines
Date: Wed, 8 Jul 2020 17:57:32 +0100	[thread overview]
Message-ID: <20200708165731.GP10992@arm.com> (raw)
In-Reply-To: <EF5281FC-D14A-443F-9A28-08BD46C03FA9@arm.com>

On Mon, Jul 06, 2020 at 09:29:24AM +0000, Daniel Kiss wrote:
> Hi Ard,
> 
> I like your suggestions and tuned a bit and now it works with the LLVM’s unwinders.
> 
> Register 96 is out of the DWARF spec[1] and will collide with SVE registers[2] so 32 is better which is the reserved register for PC.
> 
> my version:
> 
> #define ARM64_SIGFRAME_REGS_OFFSET 312 /* offsetof (struct rt_sigframe, uc.uc_mcontext.regs) */
> 
>     .text
>     .cfi_startproc
>     .cfi_signal_frame
>     
>     .cfi_def_cfa    sp, ARM64_SIGFRAME_REGS_OFFSET
>     .irp x, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
>         13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,  \
>         24, 25, 26, 27, 28, 29, 30, 31
>     .cfi_offset \x, \x * 8
>     .endr
> 
>     .cfi_offset 32, 32 * 8 // regs->pc
>     .cfi_return_column 32

Have you verified that this works with the GNU unwinders?  I seem to
remember experimenting with .cfi_return_column in the past and hitting
problems when trying to use a fake register.

At the time I just assumed I was doing something wrong and didn't go
digging.  Maybe I _was_ doing something wrong...

Cheers
---Dave

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-07-08 16:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200623085436.3696-1-will@kernel.org>
     [not found] ` <20200623095417.GV25945@arm.com>
     [not found]   ` <CAMj1kXFhCC4coSQ+Q-d3rkXFtAes6mcqMrEZr-rbO1uj+OmLCA@mail.gmail.com>
     [not found]     ` <20200623105827.GA3954@willie-the-truck>
     [not found]       ` <CAMj1kXE9_HYpD=kzpPLOir0rGGf7jWTs+S3es_0Jo3ufPuA1eQ@mail.gmail.com>
     [not found]         ` <07001CCE-6AF8-4491-9B3A-4FC9C1E27FDB@arm.com>
2020-06-23 15:34           ` [PATCH 0/6] Fix unwinding through sigreturn trampolines Daniel Kiss
2020-06-23 15:43             ` Ard Biesheuvel
     [not found]               ` <51A5A3CB-B8D1-4BAD-BC7B-0337754AEB9D@arm.com>
2020-07-06  9:29                 ` Daniel Kiss
2020-07-06  9:41                   ` Ard Biesheuvel
2020-07-08 16:57                   ` Dave Martin [this message]
2020-07-10 17:08                     ` Daniel Kiss

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=20200708165731.GP10992@arm.com \
    --to=dave.martin@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Daniel.Kiss@arm.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=Tamas.Zsoldos@arm.com \
    --cc=Vincenzo.Frascino@arm.com \
    --cc=ardb@kernel.org \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=ndesaulniers@google.com \
    --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).