mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
x86: Add external retpoline thunk
This allows use of -mindirect-branch=thunk-extern, and is only a few bytes of dead code if not used. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D60524
This commit is contained in:
1 parent
81b5b2265d
commit
74d971fe15
2 files changed
+20
No files matched your search
@@ -1996,4 +1996,14 @@ ENTRY(cpu_sync_core)
|
||||
iretq
|
||||
END(cpu_sync_core)
|
||||
|
||||
/* External Retpoline thunk */
|
||||
ENTRY(__x86_indirect_thunk_r11)
|
||||
callq 2f
|
||||
1: pause
|
||||
lfence
|
||||
jmp 1b
|
||||
2: movq %r11, (%rsp)
|
||||
retq
|
||||
END(__x86_indirect_thunk_r11)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
@@ -587,4 +587,14 @@ ENTRY(cpu_sync_core)
|
||||
iretl
|
||||
END(cpu_sync_core)
|
||||
|
||||
/* External retpoline thunk */
|
||||
ENTRY(__x86_indirect_thunk_eax)
|
||||
calll 2f
|
||||
1: pause
|
||||
lfence
|
||||
jmp 1b
|
||||
2: movl %eax, (%esp)
|
||||
retl
|
||||
END(__x86_indirect_thunk_eax)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
Reference in new issue
Block a user