lkml.org 
[lkml]   [2020]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/4] x86/insn-eval: Add support for 64-bit kernel mode
On Thu, Dec 19, 2019 at 12:11:47AM +0100, Jann Horn wrote:
> To support evaluating 64-bit kernel mode instructions:
>
> Replace existing checks for user_64bit_mode() with a new helper that
> checks whether code is being executed in either 64-bit kernel mode or
> 64-bit user mode.
>
> Select the GS base depending on whether the instruction is being
> evaluated in kernel mode.
>
> Signed-off-by: Jann Horn <jannh@google.com>

In most cases you have struct insn around (or can easily pass it down to
the place). Why not use insn->x86_64?

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2020-01-02 08:48    [W:0.104 / U:5.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site