Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-22 Thread Jun Yao
Hi Ard, On Thu, Jun 21, 2018 at 07:27:01PM +0200, Ard Biesheuvel wrote: > On 21 June 2018 at 19:04, James Morse wrote: > > On 21/06/18 10:29, Ard Biesheuvel wrote: > >> On 21 June 2018 at 10:59, James Morse wrote: > >>> On 21/06/18 07:39, Ard Biesheuvel wrote: > On 21 June 2018 at 04:51,

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-22 Thread Jun Yao
Hi Ard, On Thu, Jun 21, 2018 at 07:27:01PM +0200, Ard Biesheuvel wrote: > On 21 June 2018 at 19:04, James Morse wrote: > > On 21/06/18 10:29, Ard Biesheuvel wrote: > >> On 21 June 2018 at 10:59, James Morse wrote: > >>> On 21/06/18 07:39, Ard Biesheuvel wrote: > On 21 June 2018 at 04:51,

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread Ard Biesheuvel
On 21 June 2018 at 19:04, James Morse wrote: > Hi Ard, > > On 21/06/18 10:29, Ard Biesheuvel wrote: >> On 21 June 2018 at 10:59, James Morse wrote: >>> On 21/06/18 07:39, Ard Biesheuvel wrote: On 21 June 2018 at 04:51, Jun Yao wrote: > On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread Ard Biesheuvel
On 21 June 2018 at 19:04, James Morse wrote: > Hi Ard, > > On 21/06/18 10:29, Ard Biesheuvel wrote: >> On 21 June 2018 at 10:59, James Morse wrote: >>> On 21/06/18 07:39, Ard Biesheuvel wrote: On 21 June 2018 at 04:51, Jun Yao wrote: > On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread James Morse
Hi Ard, On 21/06/18 10:29, Ard Biesheuvel wrote: > On 21 June 2018 at 10:59, James Morse wrote: >> On 21/06/18 07:39, Ard Biesheuvel wrote: >>> On 21 June 2018 at 04:51, Jun Yao wrote: On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: > On 20 June 2018 at 10:57, Jun Yao

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread James Morse
Hi Ard, On 21/06/18 10:29, Ard Biesheuvel wrote: > On 21 June 2018 at 10:59, James Morse wrote: >> On 21/06/18 07:39, Ard Biesheuvel wrote: >>> On 21 June 2018 at 04:51, Jun Yao wrote: On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: > On 20 June 2018 at 10:57, Jun Yao

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread Jun Yao
On Thu, Jun 21, 2018 at 11:29:52AM +0200, Ard Biesheuvel wrote: > On 21 June 2018 at 10:59, James Morse wrote: > > On 21/06/18 07:39, Ard Biesheuvel wrote: > >> On 21 June 2018 at 04:51, Jun Yao wrote: > >>> On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: > On 20 June 2018

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread Jun Yao
On Thu, Jun 21, 2018 at 11:29:52AM +0200, Ard Biesheuvel wrote: > On 21 June 2018 at 10:59, James Morse wrote: > > On 21/06/18 07:39, Ard Biesheuvel wrote: > >> On 21 June 2018 at 04:51, Jun Yao wrote: > >>> On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: > On 20 June 2018

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread Ard Biesheuvel
On 21 June 2018 at 10:59, James Morse wrote: > Hi guys, > > On 21/06/18 07:39, Ard Biesheuvel wrote: >> On 21 June 2018 at 04:51, Jun Yao wrote: >>> On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: On 20 June 2018 at 10:57, Jun Yao wrote: > Move

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread Ard Biesheuvel
On 21 June 2018 at 10:59, James Morse wrote: > Hi guys, > > On 21/06/18 07:39, Ard Biesheuvel wrote: >> On 21 June 2018 at 04:51, Jun Yao wrote: >>> On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: On 20 June 2018 at 10:57, Jun Yao wrote: > Move

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread James Morse
Hi guys, On 21/06/18 07:39, Ard Biesheuvel wrote: > On 21 June 2018 at 04:51, Jun Yao wrote: >> On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: >>> On 20 June 2018 at 10:57, Jun Yao wrote: Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section. And update

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread James Morse
Hi guys, On 21/06/18 07:39, Ard Biesheuvel wrote: > On 21 June 2018 at 04:51, Jun Yao wrote: >> On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: >>> On 20 June 2018 at 10:57, Jun Yao wrote: Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section. And update

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread Ard Biesheuvel
On 21 June 2018 at 04:51, Jun Yao wrote: > Hi Ard, > > On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: >> On 20 June 2018 at 10:57, Jun Yao wrote: >> > Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata >> > section. And update the swapper_pg_dir by fixmap. >> > >> >> I

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-21 Thread Ard Biesheuvel
On 21 June 2018 at 04:51, Jun Yao wrote: > Hi Ard, > > On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: >> On 20 June 2018 at 10:57, Jun Yao wrote: >> > Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata >> > section. And update the swapper_pg_dir by fixmap. >> > >> >> I

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-20 Thread Jun Yao
Hi Ard, On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: > On 20 June 2018 at 10:57, Jun Yao wrote: > > Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata > > section. And update the swapper_pg_dir by fixmap. > > > > I think we may be able to get away with not mapping

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-20 Thread Jun Yao
Hi Ard, On Wed, Jun 20, 2018 at 12:09:49PM +0200, Ard Biesheuvel wrote: > On 20 June 2018 at 10:57, Jun Yao wrote: > > Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata > > section. And update the swapper_pg_dir by fixmap. > > > > I think we may be able to get away with not mapping

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-20 Thread Ard Biesheuvel
On 20 June 2018 at 10:57, Jun Yao wrote: > Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata > section. And update the swapper_pg_dir by fixmap. > I think we may be able to get away with not mapping idmap_pg_dir and tramp_pg_dir at all. As for swapper_pg_dir, it would indeed be nice if

Re: [PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-20 Thread Ard Biesheuvel
On 20 June 2018 at 10:57, Jun Yao wrote: > Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata > section. And update the swapper_pg_dir by fixmap. > I think we may be able to get away with not mapping idmap_pg_dir and tramp_pg_dir at all. As for swapper_pg_dir, it would indeed be nice if

[PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-20 Thread Jun Yao
Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section. And update the swapper_pg_dir by fixmap. Signed-off-by: Jun Yao --- arch/arm64/include/asm/pgalloc.h | 19 +++ arch/arm64/kernel/vmlinux.lds.S | 32 ++-- arch/arm64/mm/mmu.c

[PATCH 1/1] arm64/mm: move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section

2018-06-20 Thread Jun Yao
Move {idmap_pg_dir,tramp_pg_dir,swapper_pg_dir} to .rodata section. And update the swapper_pg_dir by fixmap. Signed-off-by: Jun Yao --- arch/arm64/include/asm/pgalloc.h | 19 +++ arch/arm64/kernel/vmlinux.lds.S | 32 ++-- arch/arm64/mm/mmu.c