All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: kernel-hardening@lists.openwall.com
Cc: keescook@chromium.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, labbott@redhat.com
Subject: [RFC PATCH 4/4] bpf: Use linux/set_memory.h
Date: Thu, 29 Jun 2017 16:29:41 +1000	[thread overview]
Message-ID: <1498717781-29151-4-git-send-email-mpe@ellerman.id.au> (raw)
In-Reply-To: <1498717781-29151-1-git-send-email-mpe@ellerman.id.au>

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.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 include/linux/filter.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/linux/filter.h b/include/linux/filter.h
index 1fa26dc562ce..54f26e9c6472 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -16,13 +16,10 @@
 #include <linux/sched.h>
 #include <linux/capability.h>
 #include <linux/cryptohash.h>
+#include <linux/set_memory.h>
 
 #include <net/sch_generic.h>
 
-#ifdef CONFIG_ARCH_HAS_SET_MEMORY
-#include <asm/set_memory.h>
-#endif
-
 #include <uapi/linux/filter.h>
 #include <uapi/linux/bpf.h>
 
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <mpe@ellerman.id.au>
To: kernel-hardening@lists.openwall.com
Cc: keescook@chromium.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, labbott@redhat.com
Subject: [kernel-hardening] [RFC PATCH 4/4] bpf: Use linux/set_memory.h
Date: Thu, 29 Jun 2017 16:29:41 +1000	[thread overview]
Message-ID: <1498717781-29151-4-git-send-email-mpe@ellerman.id.au> (raw)
In-Reply-To: <1498717781-29151-1-git-send-email-mpe@ellerman.id.au>

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.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 include/linux/filter.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/linux/filter.h b/include/linux/filter.h
index 1fa26dc562ce..54f26e9c6472 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -16,13 +16,10 @@
 #include <linux/sched.h>
 #include <linux/capability.h>
 #include <linux/cryptohash.h>
+#include <linux/set_memory.h>
 
 #include <net/sch_generic.h>
 
-#ifdef CONFIG_ARCH_HAS_SET_MEMORY
-#include <asm/set_memory.h>
-#endif
-
 #include <uapi/linux/filter.h>
 #include <uapi/linux/bpf.h>
 
-- 
2.7.4

  parent reply	other threads:[~2017-06-29  6:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29  6:29 [RFC PATCH 1/4] Provide linux/set_memory.h Michael Ellerman
2017-06-29  6:29 ` [kernel-hardening] " Michael Ellerman
2017-06-29  6:29 ` [RFC PATCH 2/4] PM / hibernate: Use linux/set_memory.h Michael Ellerman
2017-06-29  6:29   ` [kernel-hardening] " Michael Ellerman
2017-06-29  6:29 ` [RFC PATCH 3/4] module: " Michael Ellerman
2017-06-29  6:29   ` [kernel-hardening] " Michael Ellerman
2017-06-29  6:29 ` Michael Ellerman [this message]
2017-06-29  6:29   ` [kernel-hardening] [RFC PATCH 4/4] bpf: " Michael Ellerman
2017-06-29  8:57   ` Daniel Borkmann
2017-06-29  9:03 ` [kernel-hardening] [RFC PATCH 1/4] Provide linux/set_memory.h Daniel Borkmann
2017-06-29 16:11   ` Kees Cook
2017-06-29 16:11     ` Kees Cook
2017-06-30  1:43     ` Michael Ellerman
2017-06-30  1:43       ` Michael Ellerman
2017-06-29 16:45 ` Laura Abbott
2017-06-29 16:45   ` [kernel-hardening] " Laura Abbott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498717781-29151-4-git-send-email-mpe@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.