From: akpm@linux-foundation.org Subject: [patch 012/108] kernel/module.c: use linux/set_memory.h Date: Thu, 06 Jul 2017 15:35:58 -0700 Message-ID: <20170706223558.kfQ-x0tw6%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:34438 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752658AbdGFWf7 (ORCPT ); Thu, 6 Jul 2017 18:35:59 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: akpm@linux-foundation.org, daniel@iogearbox.net, keescook@chromium.org, labbott@redhat.com, mm-commits@vger.kernel.org, mpe@ellerman.id.au, torvalds@linux-foundation.org From: Michael Ellerman Subject: kernel/module.c: use linux/set_memory.h 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/1498717781-29151-3-git-send-email-mpe@ellerman.id.au Signed-off-by: Michael Ellerman Acked-by: Kees Cook Acked-by: Laura Abbott Cc: Daniel Borkmann Signed-off-by: Andrew Morton --- kernel/module.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff -puN kernel/module.c~module-use-linux-set_memoryh kernel/module.c --- a/kernel/module.c~module-use-linux-set_memoryh +++ a/kernel/module.c @@ -49,9 +49,7 @@ #include #include #include -#ifdef CONFIG_STRICT_MODULE_RWX -#include -#endif +#include #include #include #include _