summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/extable.h
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2020-10-07 00:09:06 +0300
committerBorislav Petkov <bp@suse.de>2020-10-07 12:08:59 +0300
commita05d54c41ecfa1a322b229b4e5ce50c157284f74 (patch)
treec5c0852daccf221f05a801f167e3850f4efb7754 /arch/x86/include/asm/extable.h
parent41ce0564bfe2e129d56730418d8c0a9f9f2d31b5 (diff)
downloadlinux-a05d54c41ecfa1a322b229b4e5ce50c157284f74.tar.xz
x86/mce: Provide method to find out the type of an exception handler
Avoid a proliferation of ex_has_*_handler() functions by having just one function that returns the type of the handler (if any). Drop the __visible attribute for this function. It is not called from assembler so the attribute is not necessary. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20201006210910.21062-3-tony.luck@intel.com
Diffstat (limited to 'arch/x86/include/asm/extable.h')
-rw-r--r--arch/x86/include/asm/extable.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/include/asm/extable.h b/arch/x86/include/asm/extable.h
index d8c2198d543b..1f0cbc52937c 100644
--- a/arch/x86/include/asm/extable.h
+++ b/arch/x86/include/asm/extable.h
@@ -29,10 +29,17 @@ struct pt_regs;
(b)->handler = (tmp).handler - (delta); \
} while (0)
+enum handler_type {
+ EX_HANDLER_NONE,
+ EX_HANDLER_FAULT,
+ EX_HANDLER_UACCESS,
+ EX_HANDLER_OTHER
+};
+
extern int fixup_exception(struct pt_regs *regs, int trapnr,
unsigned long error_code, unsigned long fault_addr);
extern int fixup_bug(struct pt_regs *regs, int trapnr);
-extern bool ex_has_fault_handler(unsigned long ip);
+extern enum handler_type ex_get_fault_handler_type(unsigned long ip);
extern void early_fixup_exception(struct pt_regs *regs, int trapnr);
#endif