Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-20 Thread Christophe Lyon
On Fri, 20 Sep 2019 at 14:51, Matthew Malcomson wrote: > > On 19/09/19 16:14, Kyrill Tkachov wrote: > > > > On 9/19/19 4:13 PM, Christophe Lyon wrote: > >> On Tue, 17 Sep 2019 at 14:08, Christophe Lyon > >> wrote: > >> > > >> > On 17/09/2019 13:38, Wilco Dijkstra wrote: > >> > > Hi Christophe, >

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-20 Thread Matthew Malcomson
On 19/09/19 16:14, Kyrill Tkachov wrote: > > On 9/19/19 4:13 PM, Christophe Lyon wrote: >> On Tue, 17 Sep 2019 at 14:08, Christophe Lyon >> wrote: >> > >> > On 17/09/2019 13:38, Wilco Dijkstra wrote: >> > > Hi Christophe, >> > > >> > > Can you explain this in more detail - it doesn't make sense

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-19 Thread Kyrill Tkachov
On 9/19/19 4:13 PM, Christophe Lyon wrote: On Tue, 17 Sep 2019 at 14:08, Christophe Lyon wrote: > > On 17/09/2019 13:38, Wilco Dijkstra wrote: > > Hi Christophe, > > > > Can you explain this in more detail - it doesn't make sense to me to force the > > Thumb bit during unwinding since it sho

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-19 Thread Christophe Lyon
On Tue, 17 Sep 2019 at 14:08, Christophe Lyon wrote: > > On 17/09/2019 13:38, Wilco Dijkstra wrote: > > Hi Christophe, > > > > Can you explain this in more detail - it doesn't make sense to me to force > > the > > Thumb bit during unwinding since it should already be correct, even on a > > Thumb-

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-17 Thread Christophe Lyon
On 17/09/2019 13:38, Wilco Dijkstra wrote: Hi Christophe, Can you explain this in more detail - it doesn't make sense to me to force the Thumb bit during unwinding since it should already be correct, even on a Thumb-only CPU. Perhaps the kernel code that pushes an incorrect address on the stack

Re: [ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-17 Thread Wilco Dijkstra
Hi Christophe, Can you explain this in more detail - it doesn't make sense to me to force the Thumb bit during unwinding since it should already be correct, even on a Thumb-only CPU. Perhaps the kernel code that pushes an incorrect address on the stack could be fixed instead? > Without this, when

[ARM/FDPIC v6 13/24] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-09 Thread Christophe Lyon
From: Christophe Lyon Without this, when we are unwinding across a signal frame we can jump to an even address which leads to an exception. This is needed in __gnu_persnality_sigframe_fdpic() when restoring the PC from the signal frame since the PC saved by the kernel has the LSB bit set to zero