]> Git Repo - linux.git/commitdiff
x86/entry/64: Correct the comment over SAVE_AND_SET_GSBASE
authorBorislav Petkov <[email protected]>
Thu, 20 Aug 2020 09:10:15 +0000 (11:10 +0200)
committerBorislav Petkov <[email protected]>
Mon, 24 Aug 2020 08:23:40 +0000 (10:23 +0200)
Add the proper explanation why an LFENCE is not needed in the FSGSBASE
case.

Fixes: c82965f9e530 ("x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit")
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
arch/x86/entry/entry_64.S

index 70dea9337816272caf56675f1d5b900554cf3d8b..bf78de4de7f0be96829a636ead9aaae571a9b0b7 100644 (file)
@@ -840,8 +840,9 @@ SYM_CODE_START_LOCAL(paranoid_entry)
         * retrieve and set the current CPUs kernel GSBASE. The stored value
         * has to be restored in paranoid_exit unconditionally.
         *
-        * The MSR write ensures that no subsequent load is based on a
-        * mispredicted GSBASE. No extra FENCE required.
+        * The unconditional write to GS base below ensures that no subsequent
+        * loads based on a mispredicted GS base can happen, therefore no LFENCE
+        * is needed here.
         */
        SAVE_AND_SET_GSBASE scratch_reg=%rax save_reg=%rbx
        ret
This page took 0.060881 seconds and 4 git commands to generate.