[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20180529133628.27055-1-nixiaoming@huawei.com>
Date: Tue, 29 May 2018 21:36:28 +0800
From: nixiaoming <nixiaoming@...wei.com>
To: <catalin.marinas@....com>, <will.deacon@....com>,
<ard.biesheuvel@...aro.org>, <marc.zyngier@....com>,
<james.morse@....com>, <kristina.martsenko@....com>,
<steve.capper@....com>, <tglx@...utronix.de>, <mingo@...hat.com>,
<hpa@...or.com>, <akpm@...ux-foundation.org>, <vbabka@...e.cz>,
<mhocko@...e.com>, <dave.hansen@...ux.intel.com>,
<dan.j.williams@...el.com>, <kirill.shutemov@...ux.intel.com>,
<zhang.jia@...ux.alibaba.com>, <schwidefsky@...ibm.com>,
<heiko.carstens@...ibm.com>, <gregkh@...uxfoundation.org>
CC: <nixiaoming@...wei.com>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <x86@...nel.org>,
<linux-s390@...r.kernel.org>
Subject: [PATCH 3/3] s390:add missing CONFIG_STRICT_KERNEL_RWX for mark_rodata_ro
mark_rodata_ro is only called by the function mark_readonly
when CONFIG_STRICT_KERNEL_RWX=y
if CONFIG_STRICT_KERNEL_RWX is not set
a compile warning may be triggered: unused function
Signed-off-by: nixiaoming <nixiaoming@...wei.com>
---
arch/s390/mm/init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 3fa3e53..a96fc3f 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -116,6 +116,7 @@ void __init paging_init(void)
free_area_init_nodes(max_zone_pfns);
}
+#ifdef CONFIG_STRICT_KERNEL_RWX
void mark_rodata_ro(void)
{
unsigned long size = __end_ro_after_init - __start_ro_after_init;
@@ -123,6 +124,7 @@ void mark_rodata_ro(void)
set_memory_ro((unsigned long)__start_ro_after_init, size >> PAGE_SHIFT);
pr_info("Write protected read-only-after-init data: %luk\n", size >> 10);
}
+#endif
void __init mem_init(void)
{
--
2.10.1
Powered by blists - more mailing lists