diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-11-14 18:56:34 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-16 09:58:54 +0100 |
| commit | 690740b4a4e1ce9c661ca07fdd14cb2486f04e00 (patch) | |
| tree | 5ce0ababf2c64b623115a0fbd33edfd11ec9b47e /pkg/host | |
| parent | a6e3054436b5cc7f8c4acbce9841ecb17f699fb1 (diff) | |
executor: refactor sandbox flags
In preparation for future changes.
Diffstat (limited to 'pkg/host')
| -rw-r--r-- | pkg/host/features.go | 26 | ||||
| -rw-r--r-- | pkg/host/features_linux.go | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/pkg/host/features.go b/pkg/host/features.go index 8c3945a98..53af77241 100644 --- a/pkg/host/features.go +++ b/pkg/host/features.go @@ -18,7 +18,7 @@ const ( FeatureExtraCoverage FeatureSandboxSetuid FeatureSandboxNamespace - FeatureSandboxAndroidUntrustedApp + FeatureSandboxAndroid FeatureFaultInjection FeatureLeakChecking FeatureNetworkInjection @@ -46,18 +46,18 @@ func unconditionallyEnabled() string { return "" } func Check(target *prog.Target) (*Features, error) { const unsupported = "support is not implemented in syzkaller" res := &Features{ - FeatureCoverage: {Name: "code coverage", Reason: unsupported}, - FeatureComparisons: {Name: "comparison tracing", Reason: unsupported}, - FeatureExtraCoverage: {Name: "extra coverage", Reason: unsupported}, - FeatureSandboxSetuid: {Name: "setuid sandbox", Reason: unsupported}, - FeatureSandboxNamespace: {Name: "namespace sandbox", Reason: unsupported}, - FeatureSandboxAndroidUntrustedApp: {Name: "Android sandbox", Reason: unsupported}, - FeatureFaultInjection: {Name: "fault injection", Reason: unsupported}, - FeatureLeakChecking: {Name: "leak checking", Reason: unsupported}, - FeatureNetworkInjection: {Name: "net packet injection", Reason: unsupported}, - FeatureNetworkDevices: {Name: "net device setup", Reason: unsupported}, - FeatureKCSAN: {Name: "concurrency sanitizer", Reason: unsupported}, - FeatureDevlinkPCI: {Name: "devlink PCI setup", Reason: unsupported}, + FeatureCoverage: {Name: "code coverage", Reason: unsupported}, + FeatureComparisons: {Name: "comparison tracing", Reason: unsupported}, + FeatureExtraCoverage: {Name: "extra coverage", Reason: unsupported}, + FeatureSandboxSetuid: {Name: "setuid sandbox", Reason: unsupported}, + FeatureSandboxNamespace: {Name: "namespace sandbox", Reason: unsupported}, + FeatureSandboxAndroid: {Name: "Android sandbox", Reason: unsupported}, + FeatureFaultInjection: {Name: "fault injection", Reason: unsupported}, + FeatureLeakChecking: {Name: "leak checking", Reason: unsupported}, + FeatureNetworkInjection: {Name: "net packet injection", Reason: unsupported}, + FeatureNetworkDevices: {Name: "net device setup", Reason: unsupported}, + FeatureKCSAN: {Name: "concurrency sanitizer", Reason: unsupported}, + FeatureDevlinkPCI: {Name: "devlink PCI setup", Reason: unsupported}, } if targets.Get(target.OS, target.Arch).HostFuzzer { return res, nil diff --git a/pkg/host/features_linux.go b/pkg/host/features_linux.go index 780c938a1..a1586e8ac 100644 --- a/pkg/host/features_linux.go +++ b/pkg/host/features_linux.go @@ -20,7 +20,7 @@ func init() { checkFeature[FeatureExtraCoverage] = checkExtraCoverage checkFeature[FeatureSandboxSetuid] = unconditionallyEnabled checkFeature[FeatureSandboxNamespace] = checkSandboxNamespace - checkFeature[FeatureSandboxAndroidUntrustedApp] = checkSandboxAndroidUntrustedApp + checkFeature[FeatureSandboxAndroid] = checkSandboxAndroid checkFeature[FeatureFaultInjection] = checkFaultInjection checkFeature[FeatureLeakChecking] = checkLeakChecking checkFeature[FeatureNetworkInjection] = checkNetworkInjection @@ -169,7 +169,7 @@ func checkSandboxNamespace() string { return "" } -func checkSandboxAndroidUntrustedApp() string { +func checkSandboxAndroid() string { if err := osutil.IsAccessible("/sys/fs/selinux/policy"); err != nil { return err.Error() } |
