[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211104203933.jxuilpksf7rtbkve@treble>
Date: Thu, 4 Nov 2021 13:39:33 -0700
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, mark.rutland@....com,
dvyukov@...gle.com, seanjc@...gle.com, pbonzini@...hat.com,
mbenes@...e.cz
Subject: Re: [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
Powered by blists - more mailing lists