lkml.org 
[lkml]   [2012]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/3] x86, extable: Carve out the main extable searching routine
From: Borislav Petkov <bp@alien8.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@alien8.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


\
 
 \ /
  Last update: 2012-04-19 11:29    [W:0.133 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site