Re: [kernel-hardening] [RFC PATCH 1/4] Provide linux/set_memory.h

2017-06-29 Thread Michael Ellerman
Kees Cook writes: > On Thu, Jun 29, 2017 at 2:03 AM, Daniel Borkmann wrote: >> On 06/29/2017 08:29 AM, Michael Ellerman wrote: >>> >>> Currently code that wants to use set_memory_ro() etc, needs to include >>> asm/set_memory.h, which doesn't exist on all arches. Some code knows >>> it only build

Re: [RFC PATCH 1/4] Provide linux/set_memory.h

2017-06-29 Thread Laura Abbott
On 06/28/2017 11:29 PM, Michael Ellerman wrote: > Currently code that wants to use set_memory_ro() etc, needs to include > asm/set_memory.h, which doesn't exist on all arches. Some code knows > it only builds on arches which have the header, other code guards the > inclusion with an #ifdef, neither

Re: [kernel-hardening] [RFC PATCH 1/4] Provide linux/set_memory.h

2017-06-29 Thread Kees Cook
On Thu, Jun 29, 2017 at 2:03 AM, Daniel Borkmann wrote: > On 06/29/2017 08:29 AM, Michael Ellerman wrote: >> >> Currently code that wants to use set_memory_ro() etc, needs to include >> asm/set_memory.h, which doesn't exist on all arches. Some code knows >> it only builds on arches which have the

Re: [kernel-hardening] [RFC PATCH 1/4] Provide linux/set_memory.h

2017-06-29 Thread Daniel Borkmann
On 06/29/2017 08:29 AM, Michael Ellerman wrote: Currently code that wants to use set_memory_ro() etc, needs to include asm/set_memory.h, which doesn't exist on all arches. Some code knows it only builds on arches which have the header, other code guards the inclusion with an #ifdef, neither is id

[RFC PATCH 1/4] Provide linux/set_memory.h

2017-06-28 Thread Michael Ellerman
Currently code that wants to use set_memory_ro() etc, needs to include asm/set_memory.h, which doesn't exist on all arches. Some code knows it only builds on arches which have the header, other code guards the inclusion with an #ifdef, neither is ideal. So create linux/set_memory.h. This always ex