On Thu, Apr 05, 2018 at 10:34:30AM -0700, Greg Hackmann wrote: > On 04/03/2018 04:08 AM, Mark Rutland wrote: > > Hi Greg, > > > > These patches backport KPTI to v4.9.y (based on v4.9.92), providing protection > > against meltdown on arm64 platforms. > > > > I picked up Alex Shi's backport for review and testing, and as I found a couple > > of issues to fix up, I'm sending this with my Signed-off-by in the chain, with > > those fixups applied and noted. > > > > To the best of my understanding the code is correct, in the context of the > > v4.9.y kernel, and I've tested the seires on arm64 hardware available to me. > > i.e. if this didn't have my Signed-off-by it would have my Reviewed-by and > > Tested-by tags. > > > > Are you happy to pick these up for v4.9.93? > > > > Thanks, > > Mark. > > > > AKASHI Takahiro (1): > > module: extend 'rodata=off' boot cmdline parameter to module mappings > > > > Jayachandran C (2): > > arm64: cputype: Add MIDR values for Cavium ThunderX2 CPUs > > arm64: Turn on KPTI only on CPUs that need it > > > > Marc Zyngier (2): > > arm64: Allow checking of a CPU-local erratum > > arm64: Force KPTI to be disabled on Cavium ThunderX > > > > Mark Rutland (1): > > arm64: factor out entry stack manipulation > > > > Suzuki K Poulose (1): > > arm64: capabilities: Handle duplicate entries for a capability > > > > Will Deacon (20): > > arm64: mm: Use non-global mappings for kernel space > > arm64: mm: Move ASID from TTBR0 to TTBR1 > > arm64: mm: Allocate ASIDs in pairs > > arm64: mm: Add arm64_kernel_unmapped_at_el0 helper > > arm64: mm: Invalidate both kernel and user ASIDs when performing TLBI > > arm64: entry: Add exception trampoline page for exceptions from EL0 > > arm64: mm: Map entry trampoline into trampoline and kernel page tables > > arm64: entry: Explicitly pass exception level to kernel_ventry macro > > arm64: entry: Hook up entry trampoline to exception vectors > > arm64: tls: Avoid unconditional zeroing of tpidrro_el0 for native > > tasks > > arm64: entry: Add fake CPU feature for unmapping the kernel at EL0 > > arm64: kaslr: Put kernel vectors address in separate data page > > arm64: use RET instruction for exiting the trampoline > > arm64: Kconfig: Add CONFIG_UNMAP_KERNEL_AT_EL0 > > arm64: Kconfig: Reword UNMAP_KERNEL_AT_EL0 kconfig entry > > arm64: Take into account ID_AA64PFR0_EL1.CSV3 > > arm64: kpti: Make use of nG dependent on > > arm64_kernel_unmapped_at_el0() > > arm64: kpti: Add ->enable callback to remap swapper using nG mappings > > arm64: entry: Reword comment about post_ttbr_update_workaround > > arm64: idmap: Use "awx" flags for .idmap.text .pushsection directives > > > > arch/arm64/Kconfig | 12 ++ > > arch/arm64/include/asm/assembler.h | 3 + > > arch/arm64/include/asm/cpucaps.h | 3 +- > > arch/arm64/include/asm/cputype.h | 3 + > > arch/arm64/include/asm/fixmap.h | 6 + > > arch/arm64/include/asm/mmu.h | 11 ++ > > arch/arm64/include/asm/mmu_context.h | 7 ++ > > arch/arm64/include/asm/pgtable-hwdef.h | 1 + > > arch/arm64/include/asm/pgtable-prot.h | 35 +++--- > > arch/arm64/include/asm/pgtable.h | 1 + > > arch/arm64/include/asm/proc-fns.h | 6 - > > arch/arm64/include/asm/sysreg.h | 1 + > > arch/arm64/include/asm/tlbflush.h | 16 ++- > > arch/arm64/kernel/asm-offsets.c | 6 +- > > arch/arm64/kernel/cpu-reset.S | 2 +- > > arch/arm64/kernel/cpufeature.c | 135 ++++++++++++++++++--- > > arch/arm64/kernel/entry.S | 188 ++++++++++++++++++++++++---- > > arch/arm64/kernel/head.S | 2 +- > > arch/arm64/kernel/process.c | 12 +- > > arch/arm64/kernel/sleep.S | 2 +- > > arch/arm64/kernel/vmlinux.lds.S | 22 +++- > > arch/arm64/mm/context.c | 25 ++-- > > arch/arm64/mm/mmu.c | 31 +++++ > > arch/arm64/mm/proc.S | 216 +++++++++++++++++++++++++++++++-- > > include/linux/init.h | 3 + > > init/main.c | 7 +- > > kernel/module.c | 20 ++- > > 27 files changed, 675 insertions(+), 101 deletions(-) > > > > I ran this series on the 1st gen hikey dev board and it works fine for me. > > On top of mainline v4.9.92, tip-of-tree AOSP userspace boots to a serial > shell. > > On top of the android-linaro-hikey-4.9 branch on AOSP, it boots to the > home screen without issues. (android-4.9 has an out-of-tree SW PAN > backport which I reverted locally for testing purposes.) > > So for the series: > > Tested-by: Greg Hackmann <ghackmann@xxxxxxxxxx> Great, thanks for testing this and letting me know. greg k-h