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

From: Andy Lutomirski
Date: Thu May 14 2020 - 00:45:18 EST


On Tue, May 5, 2020 at 7:15 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxx>