RE: [PATCH 2/2] aarch64: add PAC-RET protection to libitm sjlj.S

2020-07-24 Thread Kyrylo Tkachov
Hi Szabolcs, > -Original Message- > From: Szabolcs Nagy > Sent: 23 July 2020 17:24 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov > Subject: [PATCH 2/2] aarch64: add PAC-RET protection to libitm sjlj.S > > _ITM_beginTransaction is a 'returns_twice'

[PATCH 2/2] aarch64: add PAC-RET protection to libitm sjlj.S

2020-07-23 Thread Szabolcs Nagy
_ITM_beginTransaction is a 'returns_twice' function that saves x30 on the stack as part of gtm_jmpbuf (that is passed down to GTM_begin_transaction), but the saved x30 is also used for return. The return path should be protected so we don't leave an ldp x29, x30, [sp] ret gadget in the code, s