Re: [PATCH v7 1/4] x86/insn-eval: Add support for 64-bit kernel mode

From: Borislav Petkov
Date: Thu Jan 02 2020 - 04:27:42 EST


On Thu, Jan 02, 2020 at 04:55:22PM +0900, Andy Lutomirski wrote:
> > In most cases you have struct insn around (or can easily pass it down to
> > the place). Why not use insn->x86_64?
>
> What populates that?

insn_init() AFAICT.

However, you have cases where you don't have struct insn:
fixup_umip_exception() uses it and it calls insn_get_seg_base() which
does use it too.

> FWIW, this code is a bit buggy: it gets EFI mixed mode wrong. Iâm
> not entirely sure we care.

We'll cross that bridge when we get there, I'd say.

Thx.

--
Regards/Gruss,
Boris.

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