Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbdF2G3z (ORCPT ); Thu, 29 Jun 2017 02:29:55 -0400 Received: from ozlabs.org ([103.22.144.67]:43173 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751669AbdF2G3r (ORCPT ); Thu, 29 Jun 2017 02:29:47 -0400 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 Subject: [RFC PATCH 3/4] module: Use linux/set_memory.h 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> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 850 Lines: 28 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 -- 2.7.4