Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Jeremy Linton
Hi, On 10/6/20 7:33 AM, Catalin Marinas wrote: On Tue, Oct 06, 2020 at 11:43:14AM +0100, Dave P Martin wrote: On Tue, Oct 06, 2020 at 11:25:11AM +0100, Catalin Marinas wrote: On Tue, Oct 06, 2020 at 11:01:21AM +0100, Dave P Martin wrote: On Tue, Oct 06, 2020 at 09:27:48AM +0100, Will Deacon w

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Ard Biesheuvel
On Tue, 6 Oct 2020 at 14:33, Catalin Marinas wrote: > > On Tue, Oct 06, 2020 at 11:43:14AM +0100, Dave P Martin wrote: > > On Tue, Oct 06, 2020 at 11:25:11AM +0100, Catalin Marinas wrote: > > > On Tue, Oct 06, 2020 at 11:01:21AM +0100, Dave P Martin wrote: > > > > On Tue, Oct 06, 2020 at 09:27:48A

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Catalin Marinas
On Tue, Oct 06, 2020 at 11:43:14AM +0100, Dave P Martin wrote: > On Tue, Oct 06, 2020 at 11:25:11AM +0100, Catalin Marinas wrote: > > On Tue, Oct 06, 2020 at 11:01:21AM +0100, Dave P Martin wrote: > > > On Tue, Oct 06, 2020 at 09:27:48AM +0100, Will Deacon wrote: > > > > On Mon, Oct 05, 2020 at 10:

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Dave Martin
On Tue, Oct 06, 2020 at 11:25:11AM +0100, Catalin Marinas wrote: > On Tue, Oct 06, 2020 at 11:01:21AM +0100, Dave P Martin wrote: > > On Tue, Oct 06, 2020 at 09:27:48AM +0100, Will Deacon wrote: > > > On Mon, Oct 05, 2020 at 10:48:54PM -0500, Jeremy Linton wrote: > > > > The AES code uses a 'br x7'

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Mark Brown
On Mon, Oct 05, 2020 at 10:48:54PM -0500, Jeremy Linton wrote: > The AES code uses a 'br x7' as part of a function called by > a macro. That branch needs a bti_j as a target. This results > in a panic as seen below. Instead of trying to replace the branch > target with a bti_jc, lets replace the in

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Catalin Marinas
On Tue, Oct 06, 2020 at 11:01:21AM +0100, Dave P Martin wrote: > On Tue, Oct 06, 2020 at 09:27:48AM +0100, Will Deacon wrote: > > On Mon, Oct 05, 2020 at 10:48:54PM -0500, Jeremy Linton wrote: > > > The AES code uses a 'br x7' as part of a function called by > > > a macro. That branch needs a bti_j

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Will Deacon
On Tue, Oct 06, 2020 at 11:01:21AM +0100, Dave Martin wrote: > On Tue, Oct 06, 2020 at 09:27:48AM +0100, Will Deacon wrote: > > On Mon, Oct 05, 2020 at 10:48:54PM -0500, Jeremy Linton wrote: > > > The AES code uses a 'br x7' as part of a function called by > > > a macro. That branch needs a bti_j a

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Dave Martin
On Tue, Oct 06, 2020 at 09:27:48AM +0100, Will Deacon wrote: > On Mon, Oct 05, 2020 at 10:48:54PM -0500, Jeremy Linton wrote: > > The AES code uses a 'br x7' as part of a function called by > > a macro. That branch needs a bti_j as a target. This results > > in a panic as seen below. Instead of try

Re: [BUG][PATCH] crypto: arm64: Avoid indirect branch to bti_c

2020-10-06 Thread Will Deacon
On Mon, Oct 05, 2020 at 10:48:54PM -0500, Jeremy Linton wrote: > The AES code uses a 'br x7' as part of a function called by > a macro. That branch needs a bti_j as a target. This results > in a panic as seen below. Instead of trying to replace the branch > target with a bti_jc, lets replace the in