Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-18 Thread Jon Masters
On 01/09/2018 05:00 AM, Will Deacon wrote: > On Mon, Jan 08, 2018 at 08:06:27PM -0800, Jayachandran C wrote: >> On Mon, Jan 08, 2018 at 05:51:00PM +, Will Deacon wrote: >>> On Mon, Jan 08, 2018 at 09:40:17AM -0800, Jayachandran C wrote: On Mon, Jan 08, 2018 at 09:20:09AM +, Marc

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-18 Thread Jon Masters
On 01/09/2018 05:00 AM, Will Deacon wrote: > On Mon, Jan 08, 2018 at 08:06:27PM -0800, Jayachandran C wrote: >> On Mon, Jan 08, 2018 at 05:51:00PM +, Will Deacon wrote: >>> On Mon, Jan 08, 2018 at 09:40:17AM -0800, Jayachandran C wrote: On Mon, Jan 08, 2018 at 09:20:09AM +, Marc

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-09 Thread Will Deacon
On Mon, Jan 08, 2018 at 08:06:27PM -0800, Jayachandran C wrote: > On Mon, Jan 08, 2018 at 05:51:00PM +, Will Deacon wrote: > > On Mon, Jan 08, 2018 at 09:40:17AM -0800, Jayachandran C wrote: > > > On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: > > > > On 08/01/18 07:24,

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-09 Thread Will Deacon
On Mon, Jan 08, 2018 at 08:06:27PM -0800, Jayachandran C wrote: > On Mon, Jan 08, 2018 at 05:51:00PM +, Will Deacon wrote: > > On Mon, Jan 08, 2018 at 09:40:17AM -0800, Jayachandran C wrote: > > > On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: > > > > On 08/01/18 07:24,

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Jayachandran C
On Mon, Jan 08, 2018 at 05:51:00PM +, Will Deacon wrote: > On Mon, Jan 08, 2018 at 09:40:17AM -0800, Jayachandran C wrote: > > On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: > > > On 08/01/18 07:24, Jayachandran C wrote: > > > > diff --git a/arch/arm64/kernel/cpufeature.c > > >

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Jayachandran C
On Mon, Jan 08, 2018 at 05:51:00PM +, Will Deacon wrote: > On Mon, Jan 08, 2018 at 09:40:17AM -0800, Jayachandran C wrote: > > On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: > > > On 08/01/18 07:24, Jayachandran C wrote: > > > > diff --git a/arch/arm64/kernel/cpufeature.c > > >

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Alan Cox
> > On systems that are not vulnerable to variant 3, this is an unnecessary > > overhead. > > KASLR can be bypassed on CPUs that are not vulnerable to variant 3 simply > by timing how long accesses to kernel addresses from EL0 take -- please read > the original KAISER paper for details about

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Alan Cox
> > On systems that are not vulnerable to variant 3, this is an unnecessary > > overhead. > > KASLR can be bypassed on CPUs that are not vulnerable to variant 3 simply > by timing how long accesses to kernel addresses from EL0 take -- please read > the original KAISER paper for details about

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Marc Zyngier
On 08/01/18 17:40, Jayachandran C wrote: > On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: >> On 08/01/18 07:24, Jayachandran C wrote: >>> On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: For non-KASLR kernels where the KPTI behaviour has not been overridden on

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Marc Zyngier
On 08/01/18 17:40, Jayachandran C wrote: > On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: >> On 08/01/18 07:24, Jayachandran C wrote: >>> On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: For non-KASLR kernels where the KPTI behaviour has not been overridden on

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Will Deacon
On Mon, Jan 08, 2018 at 09:40:17AM -0800, Jayachandran C wrote: > On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: > > On 08/01/18 07:24, Jayachandran C wrote: > > > diff --git a/arch/arm64/kernel/cpufeature.c > > > b/arch/arm64/kernel/cpufeature.c > > > index 19ed09b..202b037 100644

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Will Deacon
On Mon, Jan 08, 2018 at 09:40:17AM -0800, Jayachandran C wrote: > On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: > > On 08/01/18 07:24, Jayachandran C wrote: > > > diff --git a/arch/arm64/kernel/cpufeature.c > > > b/arch/arm64/kernel/cpufeature.c > > > index 19ed09b..202b037 100644

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Jayachandran C
On Mon, Jan 08, 2018 at 05:06:24PM +, Will Deacon wrote: > On Sun, Jan 07, 2018 at 11:24:02PM -0800, Jayachandran C wrote: > > On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: > > > For non-KASLR kernels where the KPTI behaviour has not been overridden > > > on the command line we

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Jayachandran C
On Mon, Jan 08, 2018 at 05:06:24PM +, Will Deacon wrote: > On Sun, Jan 07, 2018 at 11:24:02PM -0800, Jayachandran C wrote: > > On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: > > > For non-KASLR kernels where the KPTI behaviour has not been overridden > > > on the command line we

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Jayachandran C
On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: > On 08/01/18 07:24, Jayachandran C wrote: > > On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: > >> For non-KASLR kernels where the KPTI behaviour has not been overridden > >> on the command line we can use

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Jayachandran C
On Mon, Jan 08, 2018 at 09:20:09AM +, Marc Zyngier wrote: > On 08/01/18 07:24, Jayachandran C wrote: > > On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: > >> For non-KASLR kernels where the KPTI behaviour has not been overridden > >> on the command line we can use

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Will Deacon
On Sun, Jan 07, 2018 at 11:24:02PM -0800, Jayachandran C wrote: > On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: > > For non-KASLR kernels where the KPTI behaviour has not been overridden > > on the command line we can use ID_AA64PFR0_EL1.CSV3 to determine whether > > or not we

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Will Deacon
On Sun, Jan 07, 2018 at 11:24:02PM -0800, Jayachandran C wrote: > On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: > > For non-KASLR kernels where the KPTI behaviour has not been overridden > > on the command line we can use ID_AA64PFR0_EL1.CSV3 to determine whether > > or not we

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Marc Zyngier
On 08/01/18 07:24, Jayachandran C wrote: > On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: >> For non-KASLR kernels where the KPTI behaviour has not been overridden >> on the command line we can use ID_AA64PFR0_EL1.CSV3 to determine whether >> or not we should unmap the kernel whilst

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-08 Thread Marc Zyngier
On 08/01/18 07:24, Jayachandran C wrote: > On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: >> For non-KASLR kernels where the KPTI behaviour has not been overridden >> on the command line we can use ID_AA64PFR0_EL1.CSV3 to determine whether >> or not we should unmap the kernel whilst

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-07 Thread Jayachandran C
On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: > For non-KASLR kernels where the KPTI behaviour has not been overridden > on the command line we can use ID_AA64PFR0_EL1.CSV3 to determine whether > or not we should unmap the kernel whilst running at EL0. > > Reviewed-by: Suzuki K

Re: [v2,03/11] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-01-07 Thread Jayachandran C
On Fri, Jan 05, 2018 at 01:12:33PM +, Will Deacon wrote: > For non-KASLR kernels where the KPTI behaviour has not been overridden > on the command line we can use ID_AA64PFR0_EL1.CSV3 to determine whether > or not we should unmap the kernel whilst running at EL0. > > Reviewed-by: Suzuki K