Re: [PATCH v26 9/9] x86/vdso: Add ENDBR to __vdso_sgx_enter_enclave

From
Kees Cook <hidden>
Date
2021-04-28 20:39:35
Also in
linux-arch, linux-doc, linux-mm, lkml
Reply to
Yu-cheng Yu, 2021-04-27
On Tue, Apr 27, 2021 at 01:47:20PM -0700, Yu-cheng Yu wrote:
ENDBR is a special new instruction for the Indirect Branch Tracking (IBT)
component of CET.  IBT prevents attacks by ensuring that (most) indirect
branches and function calls may only land at ENDBR instructions.  Branches
that don't follow the rules will result in control flow (#CF) exceptions.

ENDBR is a noop when IBT is unsupported or disabled.  Most ENDBR
instructions are inserted automatically by the compiler, but branch
targets written in assembly must have ENDBR added manually.

Add ENDBR to __vdso_sgx_enter_enclave() branch targets.

Signed-off-by: Yu-cheng Yu <redacted>
Reviewed-by: Kees Cook <redacted>

-- 
Kees Cook
Thread (29 messages) 29 messages, 5 authors, last reply 2021-04-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help