mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 21:33:00 +00:00
x86/entry/64: Correct the comment over SAVE_AND_SET_GSBASE
Add the proper explanation why an LFENCE is not needed in the FSGSBASE
case.
Fixes: c82965f9e5
("x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit")
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200821090710.GE12181@zn.tnic
This commit is contained in:
parent
d012a7190f
commit
0b2c605fa4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user