modules: add ro_after_init support
authorJessica Yu <jeyu@redhat.com>
Wed, 27 Jul 2016 02:36:21 +0000 (12:06 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 4 Aug 2016 00:46:55 +0000 (10:16 +0930)
commit444d13ff10fb13bc3e64859c3cf9ce43dcfeb075
treeab35e195fe3daeae0bd87f6f5bd7cc1cf07fd86a
parentbdc9f373551dd3f1e6fae1618f2394ee9bc7db2e
modules: add ro_after_init support

Add ro_after_init support for modules by adding a new page-aligned section
in the module layout (after rodata) for ro_after_init data and enabling RO
protection for that section after module init runs.

Signed-off-by: Jessica Yu <jeyu@redhat.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
include/linux/module.h
include/uapi/linux/elf.h
kernel/livepatch/core.c
kernel/module.c