Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85c7cbd

Browse files
sigsegv7Andy-Python-Programmer
authored andcommitted
misc(kernel): use load fence before swapgs
Avoid potential speculative execution issues with swapgs, such as swapgsbeing speculatively missed.Signed-off-by: Ian Moffett <ian@osmora.org>
1 parent6874ab3 commit85c7cbd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/aero_kernel/src/arch/x86_64/interrupts/handlers.asm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ interrupt_handler_%1:
3939
test qword[rsp+16],0x3
4040
; skip the SWAPGS instruction if CS & 0b11 == 0b00.
4141
jz .dont_swapgs
42+
lfence
4243
swapgs
4344
.dont_swapgs:
4445

@@ -70,6 +71,7 @@ interrupt_handler_%1:
7071
test qword[rsp+8],0x3
7172
; skip the SWAPGS instruction if CS & 0b11 == 0b00.
7273
jz .dont_swapgs_again
74+
lfence
7375
swapgs
7476
.dont_swapgs_again:
7577

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp