From patchwork Thu Jun 29 06:29:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 9816077 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE4C2602B1 for ; Thu, 29 Jun 2017 06:30:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6C7228604 for ; Thu, 29 Jun 2017 06:30:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B0FC2860D; Thu, 29 Jun 2017 06:30:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id DEE0E28604 for ; Thu, 29 Jun 2017 06:30:17 +0000 (UTC) Received: (qmail 32498 invoked by uid 550); 29 Jun 2017 06:30:01 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 32319 invoked from network); 29 Jun 2017 06:29:59 -0000 From: Michael Ellerman To: kernel-hardening@lists.openwall.com Cc: keescook@chromium.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, labbott@redhat.com Date: Thu, 29 Jun 2017 16:29:40 +1000 Message-Id: <1498717781-29151-3-git-send-email-mpe@ellerman.id.au> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498717781-29151-1-git-send-email-mpe@ellerman.id.au> References: <1498717781-29151-1-git-send-email-mpe@ellerman.id.au> Subject: [kernel-hardening] [RFC PATCH 3/4] module: Use linux/set_memory.h X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 #include #include -#ifdef CONFIG_STRICT_MODULE_RWX -#include -#endif +#include #include #include #include