mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: nixiaoming <nixiaoming@huawei.com>
To: <catalin.marinas@arm.com>, <will.deacon@arm.com>,
	<ard.biesheuvel@linaro.org>, <marc.zyngier@arm.com>,
	<james.morse@arm.com>, <kristina.martsenko@arm.com>,
	<steve.capper@arm.com>, <tglx@linutronix.de>, <mingo@redhat.com>,
	<hpa@zytor.com>, <akpm@linux-foundation.org>, <vbabka@suse.cz>,
	<mhocko@suse.com>, <dave.hansen@linux.intel.com>,
	<dan.j.williams@intel.com>, <kirill.shutemov@linux.intel.com>,
	<zhang.jia@linux.alibaba.com>, <schwidefsky@de.ibm.com>,
	<heiko.carstens@de.ibm.com>, <gregkh@linuxfoundation.org>
Cc: <nixiaoming@huawei.com>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <x86@kernel.org>,
	<linux-s390@vger.kernel.org>
Subject: [PATCH 1/3] arm64:add missing CONFIG_STRICT_KERNEL_RWX for mark_rodata_ro
Date: Tue, 29 May 2018 21:36:15 +0800	[thread overview]
Message-ID: <20180529133615.26889-1-nixiaoming@huawei.com> (raw)

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@huawei.com>
---
 arch/arm64/mm/mmu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 2dbb2c9..849f326 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -491,6 +491,7 @@ static void __init map_mem(pgd_t *pgdp)
 #endif
 }
 
+#ifdef CONFIG_STRICT_KERNEL_RWX
 void mark_rodata_ro(void)
 {
 	unsigned long section_size;
@@ -505,6 +506,7 @@ void mark_rodata_ro(void)
 
 	debug_checkwx();
 }
+#endif
 
 static void __init map_kernel_segment(pgd_t *pgdp, void *va_start, void *va_end,
 				      pgprot_t prot, struct vm_struct *vma,
-- 
2.10.1

             reply	other threads:[~2018-05-29 13:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 13:36 nixiaoming [this message]
2018-05-29 15:45 ` Will Deacon
2018-05-30  3:31   ` Nixiaoming
2018-05-30  8:08     ` Mark Rutland
2018-05-30  9:05       ` Nixiaoming
  -- strict thread matches above, loose matches on Subject: below --
2018-05-28  3:33 nixiaoming
2018-05-29  9:21 ` Will Deacon

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=20180529133615.26889-1-nixiaoming@huawei.com \
    --to=nixiaoming@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kristina.martsenko@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=steve.capper@arm.com \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.org \
    --cc=zhang.jia@linux.alibaba.com \
    /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

all inboxes | Powered by JetHome®