[PATCH v3 6/6] arm64: kernel: Add support for Privileged Access Never

Will Deacon will.deacon at arm.com
Wed Jul 22 10:01:40 PDT 2015


Hi James,

On Tue, Jul 21, 2015 at 01:38:31PM +0100, Catalin Marinas wrote:
> On Tue, Jul 21, 2015 at 01:23:31PM +0100, James Morse wrote:
> > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
> > index 94d98cd1aad8..149a36ea9673 100644
> > --- a/arch/arm64/mm/fault.c
> > +++ b/arch/arm64/mm/fault.c
> > @@ -30,9 +30,11 @@
> >  #include <linux/highmem.h>
> >  #include <linux/perf_event.h>
> >  
> > +#include <asm/cpufeature.h>
> >  #include <asm/exception.h>
> >  #include <asm/debug-monitors.h>
> >  #include <asm/esr.h>
> > +#include <asm/sysreg.h>
> >  #include <asm/system_misc.h>
> >  #include <asm/pgtable.h>
> >  #include <asm/tlbflush.h>
> > @@ -147,6 +149,13 @@ static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *re
> >  		__do_kernel_fault(mm, addr, esr, regs);
> >  }
> >  
> > +static bool pan_enabled(struct pt_regs *regs)
> > +{
> > +	if (IS_ENABLED(CONFIG_ARM64_PAN))
> > +		return ((regs->pstate & PSR_PAN_BIT) != 0);
> 
> Nitpick: no brackets needed for return.
> 
> Otherwise the patch looks fine to me:
> 
> Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>

I've applied your series with the exception of this last one, as it
conflicts with some other patches I have queued for 4.3. Please can you
rebase this against the arm64 "devel" branch? (usually it would be
for-next/core, but I'm holding off stabilising until -rc4 since allmodconfig
build is broken atm).

Thanks,

Will



More information about the linux-arm-kernel mailing list