lkml.org 
[lkml]   [2020]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/8] x86/mce: Provide method to find out the type of exception handle
On Tue, Sep 08, 2020 at 10:55:14AM -0700, Tony Luck wrote:
> Avoid a proliferation of ex_has_*_handler() functions by having just
> one function that returns the type of the handler (if any).
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
> arch/x86/include/asm/extable.h | 9 ++++++++-
> arch/x86/kernel/cpu/mce/severity.c | 5 ++++-
> arch/x86/mm/extable.c | 12 ++++++++----
> 3 files changed, 20 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/include/asm/extable.h b/arch/x86/include/asm/extable.h
> index d8c2198d543b..56ec02e024ad 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 {
> + HANDLER_NONE,
> + HANDLER_FAULT,
> + HANDLER_UACCESS,
> + HANDLER_OTHER

EX_HANDLER_* I guess - HANDLER is too generic.

> @@ -125,17 +125,21 @@ __visible bool ex_handler_clear_fs(const struct exception_table_entry *fixup,
> }
> EXPORT_SYMBOL(ex_handler_clear_fs);
>
> -__visible bool ex_has_fault_handler(unsigned long ip)
> +__visible enum handler_type ex_fault_handler_type(unsigned long ip)

Why __visible?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2020-09-15 11:12    [W:0.037 / U:1.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site