lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 18 Dec 2017 17:49:37 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>
Cc:     Arnd Bergmann <arnd@...db.de>, "H. Peter Anvin" <hpa@...or.com>,
        x86@...nel.org, Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Borislav Petkov <bp@...e.de>, linux-kernel@...r.kernel.org
Subject: [PATCH] x86/pti: hide unused pti_user_pagetable_walk_pte() function

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@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ