RE: [PATCH v4] ARM: Implement SLS mitigation

2021-03-03 Thread David Laight
From: Linus Walleij > Sent: 03 March 2021 15:19 > > On Tue, Feb 23, 2021 at 11:05 AM Will Deacon wrote: > > On Mon, Feb 22, 2021 at 01:50:06PM -0800, Jian Cai wrote: > > > I am not sure if there are any plans to protect assembly code and I > > > will leave it to the Arm folks since they know a wh

Re: [PATCH v4] ARM: Implement SLS mitigation

2021-03-03 Thread Linus Walleij
On Wed, Mar 3, 2021 at 4:29 PM David Laight wrote: > > On Tue, Feb 23, 2021 at 11:05 AM Will Deacon wrote: > > I wrote some suggestions on follow-ups in my reply, and I can > > help out doing some of the patches, I think. > > > > Since ARM32 RET is mov pc, <> > > git grep 'mov.*pc,' | wc -l give

Re: [PATCH v4] ARM: Implement SLS mitigation

2021-03-03 Thread Linus Walleij
On Tue, Feb 23, 2021 at 11:05 AM Will Deacon wrote: > On Mon, Feb 22, 2021 at 01:50:06PM -0800, Jian Cai wrote: > > I am not sure if there are any plans to protect assembly code and I > > will leave it to the Arm folks since they know a whole lot better. But > > even without that part, we should s

Re: [PATCH v4] ARM: Implement SLS mitigation

2021-02-23 Thread Will Deacon
On Mon, Feb 22, 2021 at 01:50:06PM -0800, Jian Cai wrote: > Please see my comments inlined below. > > Thanks, > Jian > > On Mon, Feb 22, 2021 at 3:58 AM Will Deacon wrote: > > > > On Fri, Feb 19, 2021 at 03:08:13PM -0800, Jian Cai wrote: > > > This patch adds CONFIG_HARDEN_SLS_ALL that can be us

Re: [PATCH v4] ARM: Implement SLS mitigation

2021-02-22 Thread Jian Cai
Please see my comments inlined below. Thanks, Jian On Mon, Feb 22, 2021 at 3:58 AM Will Deacon wrote: > > On Fri, Feb 19, 2021 at 03:08:13PM -0800, Jian Cai wrote: > > This patch adds CONFIG_HARDEN_SLS_ALL that can be used to turn on > > -mharden-sls=all, which mitigates the straight-line specul

Re: [PATCH v4] ARM: Implement SLS mitigation

2021-02-22 Thread Will Deacon
On Fri, Feb 19, 2021 at 03:08:13PM -0800, Jian Cai wrote: > This patch adds CONFIG_HARDEN_SLS_ALL that can be used to turn on > -mharden-sls=all, which mitigates the straight-line speculation > vulnerability, speculative execution of the instruction following some > unconditional jumps. Notice -mha

Re: [PATCH v4] ARM: Implement SLS mitigation

2021-02-21 Thread Russell King - ARM Linux admin
On Fri, Feb 19, 2021 at 03:08:13PM -0800, Jian Cai wrote: > diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening > index 269967c4fc1b..146b75a79d9e 100644 > --- a/security/Kconfig.hardening > +++ b/security/Kconfig.hardening > @@ -121,6 +121,16 @@ choice > > endchoice > > +conf