Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677436

[RFC PATCH 3/4] module: Use linux/set_memory.h

From Michael Ellerman <mpe@ellerman.id.au>
Newsgroups linux.kernel
Subject [RFC PATCH 3/4] module: Use linux/set_memory.h
Date 2017-06-29 08:40 +0200
Message-ID <tXBhn-47z-7@gated-at.bofh.it> (permalink)
References <tXBhn-47z-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 kernel/module.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index d0a723ebe75c..e7696b25db30 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -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>
-- 
2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 1/4] Provide linux/set_memory.h Michael Ellerman <mpe@ellerman.id.au> - 2017-06-29 08:40 +0200
  [RFC PATCH 3/4] module: Use linux/set_memory.h Michael Ellerman <mpe@ellerman.id.au> - 2017-06-29 08:40 +0200
  [RFC PATCH 4/4] bpf: Use linux/set_memory.h Michael Ellerman <mpe@ellerman.id.au> - 2017-06-29 08:40 +0200
    Re: [kernel-hardening] [RFC PATCH 4/4] bpf: Use linux/set_memory.h Daniel Borkmann <daniel@iogearbox.net> - 2017-06-29 11:00 +0200
  Re: [kernel-hardening] [RFC PATCH 1/4] Provide linux/set_memory.h Daniel Borkmann <daniel@iogearbox.net> - 2017-06-29 11:10 +0200
    Re: [kernel-hardening] [RFC PATCH 1/4] Provide linux/set_memory.h Kees Cook <keescook@chromium.org> - 2017-06-29 18:20 +0200
      Re: [kernel-hardening] [RFC PATCH 1/4] Provide linux/set_memory.h Michael Ellerman <mpe@ellerman.id.au> - 2017-06-30 03:50 +0200
  Re: [RFC PATCH 1/4] Provide linux/set_memory.h Laura Abbott <labbott@redhat.com> - 2017-06-29 18:50 +0200

csiph-web