linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: fix pti Section Mismatch warning/error
@ 2018-09-02  4:01 Randy Dunlap
  2018-09-02  9:27 ` [tip:x86/urgent] x86/pti: Fix section mismatch warning/error tip-bot for Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2018-09-02  4:01 UTC (permalink / raw)
  To: LKML, X86 ML, Andy Lutomirski; +Cc: kbuild test robot

From: Randy Dunlap <rdunlap@infradead.org>

Fix the section mismatch warning in arch/x86/mm/pti.c:

WARNING: vmlinux.o(.text+0x6972a): Section mismatch in reference from the function pti_clone_pgtable() to the function .init.text:pti_user_pagetable_walk_pte()
The function pti_clone_pgtable() references
the function __init pti_user_pagetable_walk_pte().
This is often because pti_clone_pgtable lacks a __init
annotation or the annotation of pti_user_pagetable_walk_pte is wrong.
FATAL: modpost: Section mismatches detected.

Fixes: 85900ea51577 ("x86/pti: Map the vsyscall page if needed")

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: x86@kernel.org
---
Applies to mainline.

 arch/x86/mm/pti.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20180830.orig/arch/x86/mm/pti.c
+++ linux-next-20180830/arch/x86/mm/pti.c
@@ -248,7 +248,7 @@ static pmd_t *pti_user_pagetable_walk_pm
  *
  * Returns a pointer to a PTE on success, or NULL on failure.
  */
-static __init pte_t *pti_user_pagetable_walk_pte(unsigned long address)
+static pte_t *pti_user_pagetable_walk_pte(unsigned long address)
 {
 	gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO);
 	pmd_t *pmd;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:x86/urgent] x86/pti: Fix section mismatch warning/error
  2018-09-02  4:01 [PATCH] x86: fix pti Section Mismatch warning/error Randy Dunlap
@ 2018-09-02  9:27 ` tip-bot for Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Randy Dunlap @ 2018-09-02  9:27 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: hpa, lkp, rdunlap, tglx, linux-kernel, mingo, luto

Commit-ID:  ff924c5a1ec7548825cc2d07980b03be4224ffac
Gitweb:     https://git.kernel.org/tip/ff924c5a1ec7548825cc2d07980b03be4224ffac
Author:     Randy Dunlap <rdunlap@infradead.org>
AuthorDate: Sat, 1 Sep 2018 21:01:28 -0700
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sun, 2 Sep 2018 11:24:41 +0200

x86/pti: Fix section mismatch warning/error

Fix the section mismatch warning in arch/x86/mm/pti.c:

WARNING: vmlinux.o(.text+0x6972a): Section mismatch in reference from the function pti_clone_pgtable() to the function .init.text:pti_user_pagetable_walk_pte()
The function pti_clone_pgtable() references
the function __init pti_user_pagetable_walk_pte().
This is often because pti_clone_pgtable lacks a __init
annotation or the annotation of pti_user_pagetable_walk_pte is wrong.
FATAL: modpost: Section mismatches detected.

Fixes: 85900ea51577 ("x86/pti: Map the vsyscall page if needed")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/43a6d6a3-d69d-5eda-da09-0b1c88215a2a@infradead.org


---
 arch/x86/mm/pti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index 31341ae7309f..c1fc1ae6b429 100644
--- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c
@@ -248,7 +248,7 @@ static pmd_t *pti_user_pagetable_walk_pmd(unsigned long address)
  *
  * Returns a pointer to a PTE on success, or NULL on failure.
  */
-static __init pte_t *pti_user_pagetable_walk_pte(unsigned long address)
+static pte_t *pti_user_pagetable_walk_pte(unsigned long address)
 {
 	gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO);
 	pmd_t *pmd;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-02  9:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-02  4:01 [PATCH] x86: fix pti Section Mismatch warning/error Randy Dunlap
2018-09-02  9:27 ` [tip:x86/urgent] x86/pti: Fix section mismatch warning/error tip-bot for Randy Dunlap

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).