Re: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515]

2020-04-21 Thread Eric Botcazou
> i spoted failing execution tests that expected to pass, > it turns out change_cfi_row() needs something like > > - if (!old_row->window_save && new_row->window_save) > + if (old_row->window_save != new_row->window_save) > > to generate .cfi_window_save that correctly tracks the > toggled stat

Re: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515]

2020-04-21 Thread Szabolcs Nagy
ge- > > > > > From: Szabolcs Nagy > > > > > Sent: 09 April 2020 15:20 > > > > > To: gcc-patches@gcc.gnu.org > > > > > Cc: Richard Earnshaw ; Richard Sandiford > > > > > ; Kyrylo Tkachov > > > > >

Re: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515]

2020-04-17 Thread Jason Merrill via Gcc-patches
Tkachov Subject: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515] On aarch64 -mbranch-protection=pac-ret reuses the dwarf opcode for window_save to mean "toggle the return address mangle state", but in the dwarf2cfi internal logic the state was not properly recorded so th

Re: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515]

2020-04-17 Thread Szabolcs Nagy
> Cc: Richard Earnshaw ; Richard Sandiford > > > ; Kyrylo Tkachov > > > Subject: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515] > > > > > > On aarch64 -mbranch-protection=pac-ret reuses the dwarf > > > opcode for window_save to mean &q

Re: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515]

2020-04-17 Thread Jason Merrill via Gcc-patches
On 4/17/20 6:08 AM, Kyrylo Tkachov wrote: Hi Szabolcs, -Original Message- From: Szabolcs Nagy Sent: 09 April 2020 15:20 To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw ; Richard Sandiford ; Kyrylo Tkachov Subject: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515] On

RE: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515]

2020-04-17 Thread Kyrylo Tkachov
Hi Szabolcs, > -Original Message- > From: Szabolcs Nagy > Sent: 09 April 2020 15:20 > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Kyrylo Tkachov > Subject: [PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515] > > On aarc

[PATCH] aarch64: Fix .cfi_window_save with pac-ret [PR94515]

2020-04-09 Thread Szabolcs Nagy
On aarch64 -mbranch-protection=pac-ret reuses the dwarf opcode for window_save to mean "toggle the return address mangle state", but in the dwarf2cfi internal logic the state was not properly recorded so the remember/restore logic was broken. This can cause the unwinder not to authenticate return