Re: [patch V4 part 3 17/29] x86/entry: Convert Invalid Opcode exception to IDTENTRY

Andy Lutomirski
2020-05-14T04:45:17Z

On Tue, May 5, 2020 at 7:15 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> From: Thomas Gleixner <tglx@linutronix.de>
>
> Convert #UD to IDTENTRY:
> - Implement the C entry point with DEFINE_IDTENTRY
> - Emit the ASM stub with DECLARE_IDTENTRY
> - Remove the ASM idtentry in 64bit
> - Remove the open coded ASM entry code in 32bit
> - Fixup the XEN/PV code
> - Fixup the FOOF bug call in fault.c
> - Remove the old prototyoes
>
> No functional change.

I think there *is* a functional change:

> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -567,7 +567,7 @@ static int is_f00f_bug(struct pt_regs *r
> nr = (address - idt_descr.address) >> 3;
>
> if (nr == 6) {
> - do_invalid_op(regs, 0);
> + handle_invalid_op(regs);

I suspect the old code was wrong and no one noticed because no one has
a F00F-buggy machine any more.

So maybe document that you fixed up the F00F bug, too. Otherwise:

Acked-by: Andy Lutomirski <luto@kernel.org>