Skip to content

Commit

Permalink
kernel/module.c: use linux/set_memory.h
Browse files Browse the repository at this point in the history
This header always exists, so doesn't require an ifdef around its
inclusion.  When CONFIG_ARCH_HAS_SET_MEMORY=y it includes the asm
header, otherwise it provides empty versions of the set_memory_xx()
routines.

The usages of set_memory_xx() are still guarded by
CONFIG_STRICT_MODULE_RWX.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Michael Ellerman <[email protected]>
Acked-by: Kees Cook <[email protected]>
Acked-by: Laura Abbott <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mpe authored and torvalds committed Jul 6, 2017
1 parent 61f6d09 commit 563ec5c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@
#include <linux/rculist.h>
#include <linux/uaccess.h>
#include <asm/cacheflush.h>
#ifdef CONFIG_STRICT_MODULE_RWX
#include <asm/set_memory.h>
#endif
#include <linux/set_memory.h>
#include <asm/mmu_context.h>
#include <linux/license.h>
#include <asm/sections.h>
Expand Down

0 comments on commit 563ec5c

Please sign in to comment.