Re: [PATCH v7 1/4] x86/insn-eval: Add support for 64-bit kernel mode
From: Kirill A. Shutemov
Date: Thu Jan 02 2020 - 04:49:50 EST
On Thu, Jan 02, 2020 at 10:27:33AM +0100, Borislav Petkov wrote:
> 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.
Caller can indicate the bitness directly. It's always 32-bit for UMIP and
get_seg_base_limit() can use insn->x86_64.
Kirill A. Shutemov