Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:55, Will Deacon wrote: > On Tue, Jun 19, 2018 at 05:51:46PM +0200, Ard Biesheuvel wrote: >> On 19 June 2018 at 17:50, Will Deacon wrote: >> > On Tue, Jun 19, 2018 at 05:40:26PM +0200, Ard Biesheuvel wrote: >> >> On 19 June 2018 at 17:37, Will Deacon wrote: >> >> > On Tue,

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:55, Will Deacon wrote: > On Tue, Jun 19, 2018 at 05:51:46PM +0200, Ard Biesheuvel wrote: >> On 19 June 2018 at 17:50, Will Deacon wrote: >> > On Tue, Jun 19, 2018 at 05:40:26PM +0200, Ard Biesheuvel wrote: >> >> On 19 June 2018 at 17:37, Will Deacon wrote: >> >> > On Tue,

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
On Tue, Jun 19, 2018 at 05:51:46PM +0200, Ard Biesheuvel wrote: > On 19 June 2018 at 17:50, Will Deacon wrote: > > On Tue, Jun 19, 2018 at 05:40:26PM +0200, Ard Biesheuvel wrote: > >> On 19 June 2018 at 17:37, Will Deacon wrote: > >> > On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
On Tue, Jun 19, 2018 at 05:51:46PM +0200, Ard Biesheuvel wrote: > On 19 June 2018 at 17:50, Will Deacon wrote: > > On Tue, Jun 19, 2018 at 05:40:26PM +0200, Ard Biesheuvel wrote: > >> On 19 June 2018 at 17:37, Will Deacon wrote: > >> > On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:50, Will Deacon wrote: > On Tue, Jun 19, 2018 at 05:40:26PM +0200, Ard Biesheuvel wrote: >> On 19 June 2018 at 17:37, Will Deacon wrote: >> > On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel wrote: >> >> On 19 June 2018 at 17:28, Will Deacon wrote: >> >> > On Tue,

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:50, Will Deacon wrote: > On Tue, Jun 19, 2018 at 05:40:26PM +0200, Ard Biesheuvel wrote: >> On 19 June 2018 at 17:37, Will Deacon wrote: >> > On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel wrote: >> >> On 19 June 2018 at 17:28, Will Deacon wrote: >> >> > On Tue,

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
On Tue, Jun 19, 2018 at 05:40:26PM +0200, Ard Biesheuvel wrote: > On 19 June 2018 at 17:37, Will Deacon wrote: > > On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel wrote: > >> On 19 June 2018 at 17:28, Will Deacon wrote: > >> > On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
On Tue, Jun 19, 2018 at 05:40:26PM +0200, Ard Biesheuvel wrote: > On 19 June 2018 at 17:37, Will Deacon wrote: > > On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel wrote: > >> On 19 June 2018 at 17:28, Will Deacon wrote: > >> > On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:37, Will Deacon wrote: > On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel wrote: >> On 19 June 2018 at 17:28, Will Deacon wrote: >> > On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel wrote: >> >> On 19 June 2018 at 17:20, Will Deacon wrote: >> >> > Hi Ard,

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:37, Will Deacon wrote: > On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel wrote: >> On 19 June 2018 at 17:28, Will Deacon wrote: >> > On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel wrote: >> >> On 19 June 2018 at 17:20, Will Deacon wrote: >> >> > Hi Ard,

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel wrote: > On 19 June 2018 at 17:28, Will Deacon wrote: > > On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel wrote: > >> On 19 June 2018 at 17:20, Will Deacon wrote: > >> > Hi Ard, > >> > > >> > Sorry, I forgot to reply to this. > >>

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
On Tue, Jun 19, 2018 at 05:29:03PM +0200, Ard Biesheuvel wrote: > On 19 June 2018 at 17:28, Will Deacon wrote: > > On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel wrote: > >> On 19 June 2018 at 17:20, Will Deacon wrote: > >> > Hi Ard, > >> > > >> > Sorry, I forgot to reply to this. > >>

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:28, Will Deacon wrote: > On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel wrote: >> On 19 June 2018 at 17:20, Will Deacon wrote: >> > Hi Ard, >> > >> > Sorry, I forgot to reply to this. >> > >> > On Wed, May 30, 2018 at 11:53:20AM +0200, Ard Biesheuvel wrote: >> >>

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:28, Will Deacon wrote: > On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel wrote: >> On 19 June 2018 at 17:20, Will Deacon wrote: >> > Hi Ard, >> > >> > Sorry, I forgot to reply to this. >> > >> > On Wed, May 30, 2018 at 11:53:20AM +0200, Ard Biesheuvel wrote: >> >>

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel wrote: > On 19 June 2018 at 17:20, Will Deacon wrote: > > Hi Ard, > > > > Sorry, I forgot to reply to this. > > > > On Wed, May 30, 2018 at 11:53:20AM +0200, Ard Biesheuvel wrote: > >> On 30 May 2018 at 11:14, Will Deacon wrote: > >> > On

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
On Tue, Jun 19, 2018 at 05:23:41PM +0200, Ard Biesheuvel wrote: > On 19 June 2018 at 17:20, Will Deacon wrote: > > Hi Ard, > > > > Sorry, I forgot to reply to this. > > > > On Wed, May 30, 2018 at 11:53:20AM +0200, Ard Biesheuvel wrote: > >> On 30 May 2018 at 11:14, Will Deacon wrote: > >> > On

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:20, Will Deacon wrote: > Hi Ard, > > Sorry, I forgot to reply to this. > > On Wed, May 30, 2018 at 11:53:20AM +0200, Ard Biesheuvel wrote: >> On 30 May 2018 at 11:14, Will Deacon wrote: >> > On Wed, May 30, 2018 at 12:48:06PM +0800, YaoJun wrote: >> >> To protect against

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Ard Biesheuvel
On 19 June 2018 at 17:20, Will Deacon wrote: > Hi Ard, > > Sorry, I forgot to reply to this. > > On Wed, May 30, 2018 at 11:53:20AM +0200, Ard Biesheuvel wrote: >> On 30 May 2018 at 11:14, Will Deacon wrote: >> > On Wed, May 30, 2018 at 12:48:06PM +0800, YaoJun wrote: >> >> To protect against

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
Hi Ard, Sorry, I forgot to reply to this. On Wed, May 30, 2018 at 11:53:20AM +0200, Ard Biesheuvel wrote: > On 30 May 2018 at 11:14, Will Deacon wrote: > > On Wed, May 30, 2018 at 12:48:06PM +0800, YaoJun wrote: > >> To protect against KSMA(Kernel Space Mirroring Attack), make > >> tramp_pg_dir

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-06-19 Thread Will Deacon
Hi Ard, Sorry, I forgot to reply to this. On Wed, May 30, 2018 at 11:53:20AM +0200, Ard Biesheuvel wrote: > On 30 May 2018 at 11:14, Will Deacon wrote: > > On Wed, May 30, 2018 at 12:48:06PM +0800, YaoJun wrote: > >> To protect against KSMA(Kernel Space Mirroring Attack), make > >> tramp_pg_dir

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-05-30 Thread Ard Biesheuvel
On 30 May 2018 at 11:14, Will Deacon wrote: > On Wed, May 30, 2018 at 12:48:06PM +0800, YaoJun wrote: >> To protect against KSMA(Kernel Space Mirroring Attack), make >> tramp_pg_dir read-only. The principle of KSMA is to insert a >> carefully constructed PGD entry into the translation table. >>

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-05-30 Thread Ard Biesheuvel
On 30 May 2018 at 11:14, Will Deacon wrote: > On Wed, May 30, 2018 at 12:48:06PM +0800, YaoJun wrote: >> To protect against KSMA(Kernel Space Mirroring Attack), make >> tramp_pg_dir read-only. The principle of KSMA is to insert a >> carefully constructed PGD entry into the translation table. >>

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-05-30 Thread Will Deacon
On Wed, May 30, 2018 at 12:48:06PM +0800, YaoJun wrote: > To protect against KSMA(Kernel Space Mirroring Attack), make > tramp_pg_dir read-only. The principle of KSMA is to insert a > carefully constructed PGD entry into the translation table. > The type of this entry is block, which maps the

Re: [PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-05-30 Thread Will Deacon
On Wed, May 30, 2018 at 12:48:06PM +0800, YaoJun wrote: > To protect against KSMA(Kernel Space Mirroring Attack), make > tramp_pg_dir read-only. The principle of KSMA is to insert a > carefully constructed PGD entry into the translation table. > The type of this entry is block, which maps the

[PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-05-29 Thread YaoJun
To protect against KSMA(Kernel Space Mirroring Attack), make tramp_pg_dir read-only. The principle of KSMA is to insert a carefully constructed PGD entry into the translation table. The type of this entry is block, which maps the kernel text and its access permissions bits are 01. The user process

[PATCH] arm64: mm: mark tramp_pg_dir read-only

2018-05-29 Thread YaoJun
To protect against KSMA(Kernel Space Mirroring Attack), make tramp_pg_dir read-only. The principle of KSMA is to insert a carefully constructed PGD entry into the translation table. The type of this entry is block, which maps the kernel text and its access permissions bits are 01. The user process