[PATCH] aarch64, libgcc: Fix unwinding from pac-ret to normal frames [PR94514]

Szabolcs Nagy Szabolcs.Nagy@arm.com
Tue Apr 21 16:52:19 GMT 2020


The 04/17/2020 11:05, Kyrylo Tkachov wrote:
> Hi Szabolcs,
> 
> > -----Original Message-----
> > From: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
> > Sent: 09 April 2020 15:20
> > To: gcc-patches@gcc.gnu.org
> > Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Richard Sandiford
> > <Richard.Sandiford@arm.com>; Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
> > Subject: [PATCH] aarch64, libgcc: Fix unwinding from pac-ret to normal
> > frames [PR94514]
> >
> > With -mbranch-protection=pac-ret the debug info toggles the
> > signedness state of the return address so the unwinder knows when
> > the return address needs pointer authentication.
> >
> > The unwind context flags were not updated according to the dwarf
> > frame info.
> >
> > This causes unwinding across frames that were built without pac-ret
> > to incorrectly authenticate the return address wich corrupts the
> > return address on a system where PAuth is enabled.
> >
> > Note: This even affects systems where all code use pac-ret because
> > unwinding across a signal frame the return address is not signed.
> >
> 
> Ok, I'm guessing this needs backporting?

committed now,

yes i think it has to go back to gcc-9 and gcc-8,
i will do that later. thanks.


More information about the Gcc-patches mailing list