From: Arnd Bergmann <arnd@arndb.de>
To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Andy Lutomirski <luto@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Borislav Petkov <bp@suse.de>,
linux-kernel@vger.kernel.org
Subject: [PATCH] x86/pti: hide unused pti_user_pagetable_walk_pte() function
Date: Mon, 18 Dec 2017 17:49:37 +0100 [thread overview]
Message-ID: <20171218165059.1401972-1-arnd@arndb.de> (raw)
The new pti_user_pagetable_walk_pte() function is not referenced when
CONFIG_X86_VSYSCALL_EMULATION is disabled, so we need to either hide
it or make the caller visible to gcc:
arch/x86/mm/pti.c:204:15: error: 'pti_user_pagetable_walk_pte' defined but not used [-Werror=unused-function]
Fixes: 9d2fdd3ff05d ("x86/pti: Map the vsyscall page if needed")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/x86/mm/pti.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index fa22fdc73172..f7c8913d4daa 100644
--- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c
@@ -192,6 +192,7 @@ static pmd_t *pti_user_pagetable_walk_pmd(unsigned long address)
return pmd_offset(pud, address);
}
+#ifdef CONFIG_X86_VSYSCALL_EMULATION
/*
* Walk the shadow copy of the page tables (optionally) trying to allocate
* page table pages on the way down. Does not support large pages.
@@ -233,6 +234,7 @@ static pte_t *pti_user_pagetable_walk_pte(unsigned long address)
}
return pte;
}
+#endif
static void __init
pti_clone_pmds(unsigned long start, unsigned long end, pmdval_t clear)
--
2.9.0
reply other threads:[~2017-12-18 16:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20171218165059.1401972-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=bp@suse.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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®