gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/tools/bazeldefs/platforms.bzl (about) 1 """List of platforms.""" 2 3 # Platform to associated tags. 4 platforms = { 5 "ptrace": [], 6 "kvm": [], 7 "systrap": [], 8 } 9 10 # Capabilities that platforms may or may not support. 11 # Used by platform_util.cc to determine which syscall tests are appropriate. 12 _CAPABILITY_32BIT = "32BIT" 13 _CAPABILITY_ALIGNMENT_CHECK = "ALIGNMENT_CHECK" 14 _CAPABILITY_MULTIPROCESS = "MULTIPROCESS" 15 _CAPABILITY_INT3 = "INT3" 16 _CAPABILITY_VSYSCALL = "VSYSCALL" 17 18 # platform_capabilities maps platform names to a dictionary of capabilities mapped to 19 # True (supported) or False (unsupported). 20 platform_capabilities = { 21 "ptrace": { 22 _CAPABILITY_32BIT: False, 23 _CAPABILITY_ALIGNMENT_CHECK: True, 24 _CAPABILITY_MULTIPROCESS: True, 25 _CAPABILITY_INT3: True, 26 _CAPABILITY_VSYSCALL: True, 27 }, 28 "systrap": { 29 _CAPABILITY_32BIT: False, 30 _CAPABILITY_ALIGNMENT_CHECK: True, 31 _CAPABILITY_MULTIPROCESS: True, 32 _CAPABILITY_INT3: True, 33 _CAPABILITY_VSYSCALL: True, 34 }, 35 "kvm": { 36 _CAPABILITY_32BIT: False, 37 _CAPABILITY_ALIGNMENT_CHECK: True, 38 _CAPABILITY_MULTIPROCESS: True, 39 _CAPABILITY_INT3: False, 40 _CAPABILITY_VSYSCALL: True, 41 }, 42 } 43 44 default_platform = "systrap" 45 save_restore_platforms = ["systrap"]