linux-stable/tools/objtool/arch/x86
Fenghua Yu 227a06553f tools/objtool: Check for use of the ENQCMD instruction in the kernel
The ENQCMD instruction implicitly accesses the PASID_MSR to fill in the
pasid field of the descriptor being submitted to an accelerator. But
there is no precise (and stable across kernel changes) point at which
the PASID_MSR is updated from the value for one task to the next.

Kernel code that uses accelerators must always use the ENQCMDS instruction
which does not access the PASID_MSR.

Check for use of the ENQCMD instruction in the kernel and warn on its
usage.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20220207230254.3342514-11-fenghua.yu@intel.com
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
2022-03-15 10:32:30 +01:00
..
include/arch objtool: Decode jump_entry::key addend 2021-05-12 14:54:55 +02:00
Build objtool: Abstract alternative special case handling 2020-09-10 10:43:13 -05:00
decode.c tools/objtool: Check for use of the ENQCMD instruction in the kernel 2022-03-15 10:32:30 +01:00
special.c objtool: Fix retpoline detection in asm code 2021-01-26 11:11:59 -06:00