lkml.org 
[lkml]   [2021]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 06/22] x86,entry_32: Remove .fixup usage
On Thu, Nov 04, 2021 at 05:47:35PM +0100, Peter Zijlstra wrote:
> +++ b/arch/x86/include/asm/extable_fixup_types.h
> @@ -19,4 +19,6 @@
> #define EX_TYPE_DEFAULT_MCE_SAFE 12
> #define EX_TYPE_FAULT_MCE_SAFE 13
>
> +#define EX_TYPE_POP_SEG 14
> +

This looks funky in the patch (but not in the editor), those other ones
have a tab after '#define'.

> #endif
> --- a/arch/x86/mm/extable.c
> +++ b/arch/x86/mm/extable.c
> @@ -99,6 +99,13 @@ static bool ex_handler_clear_fs(const st
> return ex_handler_default(fixup, regs);
> }
>
> +static bool ex_handler_pop_seg(const struct exception_table_entry *fixup,
> + struct pt_regs *regs)
> +{
> + *((unsigned int *)regs->sp) = 0;
> + return ex_handler_default(fixup, regs);
> +}

Clever. Should be "unsigned long" in case this ever gets used by
64-bit? Also, I'd suggest a short comment.

--
Josh

\
 
 \ /
  Last update: 2021-11-04 21:40    [W:0.280 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site