Re: [PATCH v3] init: Fix false positives in W+X checking

2018-04-30 Thread Jeffrey Hugo
On 4/30/2018 12:40 PM, Kees Cook wrote: On Mon, Apr 30, 2018 at 10:19 AM, Laura Abbott wrote: On 04/30/2018 08:59 AM, Jeffrey Hugo wrote: load_module() creates W+X mappings via __vmalloc_node_range() (from layout_and_allocate()->move_module()->module_alloc()) by using PAGE_KERNEL_EXEC. These

Re: [PATCH v3] init: Fix false positives in W+X checking

2018-04-30 Thread Kees Cook
On Mon, Apr 30, 2018 at 10:19 AM, Laura Abbott wrote: > On 04/30/2018 08:59 AM, Jeffrey Hugo wrote: >> >> load_module() creates W+X mappings via __vmalloc_node_range() (from >> layout_and_allocate()->move_module()->module_alloc()) by using >> PAGE_KERNEL_EXEC. These mappings are later cleaned up

Re: [PATCH v3] init: Fix false positives in W+X checking

2018-04-30 Thread Laura Abbott
On 04/30/2018 08:59 AM, Jeffrey Hugo wrote: load_module() creates W+X mappings via __vmalloc_node_range() (from layout_and_allocate()->move_module()->module_alloc()) by using PAGE_KERNEL_EXEC. These mappings are later cleaned up via "call_rcu_sched(&freeinit->rcu, do_free_init)" from do_init_mod

[PATCH v3] init: Fix false positives in W+X checking

2018-04-30 Thread Jeffrey Hugo
load_module() creates W+X mappings via __vmalloc_node_range() (from layout_and_allocate()->move_module()->module_alloc()) by using PAGE_KERNEL_EXEC. These mappings are later cleaned up via "call_rcu_sched(&freeinit->rcu, do_free_init)" from do_init_module(). This is a problem because call_rcu_sch