gcc/libgcc/config/aarch64
Szabolcs Nagy fb22faf48f 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.

gcc/testsuite/ChangeLog:

	PR target/94514
	* g++.target/aarch64/pr94514.C: New test.
	* gcc.target/aarch64/pr94514.c: New test.

libgcc/ChangeLog:

	PR target/94514
	* config/aarch64/aarch64-unwind.h (aarch64_frob_update_context):
	Update context->flags accroding to the frame state.
2020-04-21 17:49:01 +01:00
..
aarch64-unwind.h aarch64, libgcc: Fix unwinding from pac-ret to normal frames [PR94514] 2020-04-21 17:49:01 +01:00
crtfastmath.c Update copyright years. 2020-01-01 12:51:42 +01:00
crti.S Update copyright years. 2020-01-01 12:51:42 +01:00
crtn.S Update copyright years. 2020-01-01 12:51:42 +01:00
freebsd-unwind.h Update copyright years. 2020-01-01 12:51:42 +01:00
linux-unwind.h Update copyright years. 2020-01-01 12:51:42 +01:00
lse-init.c Update copyright years. 2020-01-01 12:51:42 +01:00
lse.S aarch64: Fix bootstrap with old binutils [PR93053] 2020-04-15 11:01:19 +02:00
sfp-exceptions.c Update copyright years. 2020-01-01 12:51:42 +01:00
sfp-machine.h Update copyright years. 2020-01-01 12:51:42 +01:00
sync-cache.c Update copyright years. 2020-01-01 12:51:42 +01:00
t-aarch64 Update copyright years. 2020-01-01 12:51:42 +01:00
t-lse Update copyright years. 2020-01-01 12:51:42 +01:00
t-softfp [Patch libgcc AArch64 12/17] Enable hfmode soft-float conversions and truncations 2016-11-24 18:16:55 +00:00
value-unwind.h Update copyright years. 2020-01-01 12:51:42 +01:00