fix(verify): gate JIT verification to amd64 until trampolines are hardened
This commit is contained in:
@@ -32,6 +32,7 @@ TEXT ·enterJITChecked(SB), NOSPLIT, $0-16
|
||||
MOVQ fn+0(FP), AX // target (before SP switch)
|
||||
MOVQ SP, ·savedSP(SB) // preserve Go stack
|
||||
MOVQ BP, ·savedBP(SB) // preserve frame pointer (vet requires save before clobber)
|
||||
MOVQ R14, ·savedR14(SB) // preserve the goroutine pointer
|
||||
MOVQ $SENTINEL_BP, BP // sentinel in BP
|
||||
MOVQ $SENTINEL_R14, R14 // sentinel in R14
|
||||
MOVQ stack+8(FP), SP // switch to prepared stack
|
||||
@@ -57,5 +58,10 @@ bp_ok:
|
||||
ORQ $2, ·abiResult(SB)
|
||||
|
||||
r14_ok:
|
||||
MOVQ ·savedR14(SB), R14 // restore the goroutine pointer: the runtime
|
||||
// needs it the moment Go code resumes, whether
|
||||
// or not the kernel violated it (the violation
|
||||
// is already recorded in abiResult)
|
||||
MOVQ ·savedBP(SB), BP // restore the frame pointer
|
||||
MOVQ ·savedSP(SB), SP
|
||||
RET
|
||||
|
||||
Reference in New Issue
Block a user