mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix logic around AMD/Intel cases.
If the support is Ignored, then the call is still executed. We simply rely on it to fall through to the int3. Therefore, we must also bail on the vendor check. PiperOrigin-RevId: 292620558
This commit is contained in:
committed by
gVisor bot
parent
6c3072243d
commit
04cccaaeee
@@ -102,7 +102,8 @@ TEST(Syscall32Bit, Int80) {
|
||||
}
|
||||
|
||||
TEST(Syscall32Bit, Sysenter) {
|
||||
if (PlatformSupport32Bit() == PlatformSupport::Allowed &&
|
||||
if ((PlatformSupport32Bit() == PlatformSupport::Allowed ||
|
||||
PlatformSupport32Bit() == PlatformSupport::Ignored) &&
|
||||
GetCPUVendor() == CPUVendor::kAMD) {
|
||||
// SYSENTER is an illegal instruction in compatibility mode on AMD.
|
||||
EXPECT_EXIT(ExitGroup32(kSysenter, kExitCode),
|
||||
@@ -133,7 +134,8 @@ TEST(Syscall32Bit, Sysenter) {
|
||||
}
|
||||
|
||||
TEST(Syscall32Bit, Syscall) {
|
||||
if (PlatformSupport32Bit() == PlatformSupport::Allowed &&
|
||||
if ((PlatformSupport32Bit() == PlatformSupport::Allowed ||
|
||||
PlatformSupport32Bit() == PlatformSupport::Ignored) &&
|
||||
GetCPUVendor() == CPUVendor::kIntel) {
|
||||
// SYSCALL is an illegal instruction in compatibility mode on Intel.
|
||||
EXPECT_EXIT(ExitGroup32(kSyscall, kExitCode),
|
||||
|
||||
Reference in New Issue
Block a user