mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Mark enableCpuidFault nosplit
This is called after fork, so it must be nosplit. Updates #1408 PiperOrigin-RevId: 286053054
This commit is contained in:
committed by
gVisor bot
parent
3ab90ecf25
commit
91f1ac7319
@@ -167,8 +167,14 @@ func patchSignalInfo(regs *syscall.PtraceRegs, signalInfo *arch.SignalInfo) {
|
||||
}
|
||||
}
|
||||
|
||||
// enableCpuidFault enable cpuid-faulting; this may fail on older kernels or hardware,
|
||||
// so we just disregard the result. Host CPUID will be enabled.
|
||||
// enableCpuidFault enables cpuid-faulting.
|
||||
//
|
||||
// This may fail on older kernels or hardware, so we just disregard the result.
|
||||
// Host CPUID will be enabled.
|
||||
//
|
||||
// This is safe to call in an afterFork context.
|
||||
//
|
||||
//go:nosplit
|
||||
func enableCpuidFault() {
|
||||
syscall.RawSyscall6(syscall.SYS_ARCH_PRCTL, linux.ARCH_SET_CPUID, 0, 0, 0, 0, 0)
|
||||
}
|
||||
|
||||
@@ -151,6 +151,8 @@ func patchSignalInfo(regs *syscall.PtraceRegs, signalInfo *arch.SignalInfo) {
|
||||
}
|
||||
|
||||
// Noop on arm64.
|
||||
//
|
||||
//go:nosplit
|
||||
func enableCpuidFault() {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user