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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120419092544.GC29542@aftab>
Date:	Thu, 19 Apr 2012 11:25:44 +0200
From:	Borislav Petkov <bp@...64.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Glauber de Oliveira Costa <gcosta@...hat.com>
Subject: [PATCH 2/3] x86, extable: Carve out the main extable searching
 routine

From: Borislav Petkov <bp@...en8.de>
Date: Mon, 26 Mar 2012 23:11:11 +0200
Subject: [PATCH 2/3] x86, extable: Carve out the main extable searching
 routine

For early exception handling and fixup we don't need the modules extable
so fork out the routine that searches the kernel's main extable.

Signed-off-by: Borislav Petkov <bp@...en8.de>
---
 arch/x86/include/asm/uaccess.h |    1 +
 kernel/extable.c               |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 8be5f54d9360..66ef1c1d4087 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -96,6 +96,7 @@ struct exception_table_entry {
 };
 
 extern int fixup_exception(struct pt_regs *regs);
+extern const struct exception_table_entry *search_main_extable(unsigned long);
 
 /*
  * These are the main single-value transfer routines.  They automatically
diff --git a/kernel/extable.c b/kernel/extable.c
index 5339705b8241..d95188c2f723 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -41,12 +41,17 @@ void __init sort_main_extable(void)
 	sort_extable(__start___ex_table, __stop___ex_table);
 }
 
+const struct exception_table_entry *search_main_extable(unsigned long addr)
+{
+	return search_extable(__start___ex_table, __stop___ex_table-1, addr);
+}
+
 /* Given an address, look for it in the exception tables. */
 const struct exception_table_entry *search_exception_tables(unsigned long addr)
 {
 	const struct exception_table_entry *e;
 
-	e = search_extable(__start___ex_table, __stop___ex_table-1, addr);
+	e = search_main_extable(addr);
 	if (!e)
 		e = search_module_extables(addr);
 	return e;
-- 
1.7.5.3.401.gfb674


-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ