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

2018-04-30 Thread Jeffrey Hugo
On 4/28/2018 12:14 AM, Ingo Molnar wrote: * 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

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

2018-04-30 Thread Will Deacon
On Fri, Apr 27, 2018 at 03:55:45PM -0600, 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

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

2018-04-27 Thread Ingo Molnar
* 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_module(). > > T

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

2018-04-27 Thread Kees Cook
On Fri, Apr 27, 2018 at 2:55 PM, 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)"

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

2018-04-27 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