Re: [PATCH v3 11/20] arm64: mm: Map entry trampoline into trampoline and kernel page tables

2018-01-23 Thread Yisheng Xie
Hi Will, On 2018/1/23 18:04, Will Deacon wrote: > On Tue, Jan 23, 2018 at 04:28:45PM +0800, Yisheng Xie wrote: >> On 2017/12/6 20:35, Will Deacon wrote: >>> +#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 >>> +static int __init map_entry_trampoline(void) >>> +{ >>> + extern char __entry_tramp_text_start[];

Re: [PATCH v3 11/20] arm64: mm: Map entry trampoline into trampoline and kernel page tables

2018-01-23 Thread Yisheng Xie
Hi Will, On 2018/1/23 18:04, Will Deacon wrote: > On Tue, Jan 23, 2018 at 04:28:45PM +0800, Yisheng Xie wrote: >> On 2017/12/6 20:35, Will Deacon wrote: >>> +#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 >>> +static int __init map_entry_trampoline(void) >>> +{ >>> + extern char __entry_tramp_text_start[];

Re: [PATCH v3 11/20] arm64: mm: Map entry trampoline into trampoline and kernel page tables

2018-01-23 Thread Will Deacon
On Tue, Jan 23, 2018 at 04:28:45PM +0800, Yisheng Xie wrote: > On 2017/12/6 20:35, Will Deacon wrote: > > +#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 > > +static int __init map_entry_trampoline(void) > > +{ > > + extern char __entry_tramp_text_start[]; > > + > > + pgprot_t prot = rodata_enabled ?

Re: [PATCH v3 11/20] arm64: mm: Map entry trampoline into trampoline and kernel page tables

2018-01-23 Thread Will Deacon
On Tue, Jan 23, 2018 at 04:28:45PM +0800, Yisheng Xie wrote: > On 2017/12/6 20:35, Will Deacon wrote: > > +#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 > > +static int __init map_entry_trampoline(void) > > +{ > > + extern char __entry_tramp_text_start[]; > > + > > + pgprot_t prot = rodata_enabled ?

Re: [PATCH v3 11/20] arm64: mm: Map entry trampoline into trampoline and kernel page tables

2018-01-23 Thread Yisheng Xie
Hi Will, On 2017/12/6 20:35, Will Deacon wrote: > +#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 > +static int __init map_entry_trampoline(void) > +{ > + extern char __entry_tramp_text_start[]; > + > + pgprot_t prot = rodata_enabled ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC; > + phys_addr_t pa_start =

Re: [PATCH v3 11/20] arm64: mm: Map entry trampoline into trampoline and kernel page tables

2018-01-23 Thread Yisheng Xie
Hi Will, On 2017/12/6 20:35, Will Deacon wrote: > +#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 > +static int __init map_entry_trampoline(void) > +{ > + extern char __entry_tramp_text_start[]; > + > + pgprot_t prot = rodata_enabled ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC; > + phys_addr_t pa_start =

Re: [PATCH v3 11/20] arm64: mm: Map entry trampoline into trampoline and kernel page tables

2017-12-06 Thread Mark Rutland
On Wed, Dec 06, 2017 at 12:35:30PM +, Will Deacon wrote: > The exception entry trampoline needs to be mapped at the same virtual > address in both the trampoline page table (which maps nothing else) > and also the kernel page table, so that we can swizzle TTBR1_EL1 on > exceptions from and

Re: [PATCH v3 11/20] arm64: mm: Map entry trampoline into trampoline and kernel page tables

2017-12-06 Thread Mark Rutland
On Wed, Dec 06, 2017 at 12:35:30PM +, Will Deacon wrote: > The exception entry trampoline needs to be mapped at the same virtual > address in both the trampoline page table (which maps nothing else) > and also the kernel page table, so that we can swizzle TTBR1_EL1 on > exceptions from and