Re: [PATCH v2 4/5] arm64: mmu: map .text as read-only from the outset

2017-02-14 Thread Ard Biesheuvel
> On 14 Feb 2017, at 17:40, Mark Rutland wrote: > >> On Tue, Feb 14, 2017 at 04:15:11PM +, Ard Biesheuvel wrote: >> On 14 Feb 2017, at 15:57, Mark Rutland wrote: On Sat, Feb 11, 2017 at 08:23:05PM +, Ard Biesheuvel wrote:

Re: [PATCH v2 4/5] arm64: mmu: map .text as read-only from the outset

2017-02-14 Thread Mark Rutland
On Tue, Feb 14, 2017 at 05:49:19PM +, Ard Biesheuvel wrote: > > > On 14 Feb 2017, at 17:40, Mark Rutland wrote: > > > >> On Tue, Feb 14, 2017 at 04:15:11PM +, Ard Biesheuvel wrote: > >> Having trivial 'off' switches for security features makes me feel > >> uneasy

Re: [PATCH v2 4/5] arm64: mmu: map .text as read-only from the outset

2017-02-14 Thread Ard Biesheuvel
> On 14 Feb 2017, at 15:57, Mark Rutland wrote: > >> On Sat, Feb 11, 2017 at 08:23:05PM +, Ard Biesheuvel wrote: >> Now that alternatives patching code no longer relies on the primary >> mapping of .text being writable, we can remove the code that removes >> the

Re: [PATCH v2 4/5] arm64: mmu: map .text as read-only from the outset

2017-02-14 Thread Mark Rutland
On Sat, Feb 11, 2017 at 08:23:05PM +, Ard Biesheuvel wrote: > Now that alternatives patching code no longer relies on the primary > mapping of .text being writable, we can remove the code that removes > the writable permissions post-init time, and map it read-only from > the outset. > >

[PATCH v2 4/5] arm64: mmu: map .text as read-only from the outset

2017-02-11 Thread Ard Biesheuvel
Now that alternatives patching code no longer relies on the primary mapping of .text being writable, we can remove the code that removes the writable permissions post-init time, and map it read-only from the outset. Reviewed-by: Laura Abbott Reviewed-by: Kees Cook