linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: nixiaoming <nixiaoming@huawei.com>
To: <schwidefsky@de.ibm.com>, <heiko.carstens@de.ibm.com>,
	<akpm@linux-foundation.org>, <vbabka@suse.cz>, <mhocko@suse.com>,
	<gregkh@linuxfoundation.org>
Cc: <nixiaoming@huawei.com>, <linux-kernel@vger.kernel.org>,
	<linux-s390@vger.kernel.org>
Subject: [PATCH 3/3] s390:add missing CONFIG_STRICT_KERNEL_RWX for mark_rodata_ro
Date: Mon, 28 May 2018 11:33:55 +0800	[thread overview]
Message-ID: <20180528033355.54815-1-nixiaoming@huawei.com> (raw)

Signed-off-by: nixiaoming <nixiaoming@huawei.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

             reply	other threads:[~2018-05-28  3:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-28  3:33 nixiaoming [this message]
2018-05-28  5:22 ` [PATCH 3/3] s390:add missing CONFIG_STRICT_KERNEL_RWX for mark_rodata_ro Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2018-05-29 13:36 nixiaoming

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=20180528033355.54815-1-nixiaoming@huawei.com \
    --to=nixiaoming@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=vbabka@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).