Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static analysis to CI to determine redundant seccomp rules #4924

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions resources/seccomp/aarch64-unknown-linux-musl.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
{
"syscall": "close"
},
{
"syscall": "uname",
"comment": "Used for getting the kernel version, for validating io_uring support"
},
{
"syscall": "eventfd2",
"comment": "Used for creating io_uring completion event, on drive patch"
Expand Down Expand Up @@ -970,42 +966,6 @@
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1074048665,
"comment": "KVM_SET_MP_STATE"
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 2151722655,
"comment": "KVM_GET_VCPU_EVENTS"
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1077980832,
"comment": "KVM_SET_VCPU_EVENTS"
}
]
},
{
"syscall": "ioctl",
"args": [
Expand All @@ -1018,18 +978,6 @@
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1074835116,
"comment": "KVM_SET_ONE_REG"
}
]
},
{
"syscall": "ioctl",
"args": [
Expand Down
154 changes: 3 additions & 151 deletions resources/seccomp/x86_64-unknown-linux-musl.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
{
"syscall": "close"
},
{
"syscall": "uname",
"comment": "Used for getting the kernel version, for validating io_uring support"
},
{
"syscall": "eventfd2",
"comment": "Used for creating io_uring completion event, on drive patch"
Expand Down Expand Up @@ -111,8 +107,8 @@
"comment": "sigaltstack is used by Rust stdlib to remove alternative signal stack during thread teardown."
},
{
"syscall": "getrandom",
"comment": "getrandom is used by aws-lc library which we consume in virtio-rng"
"syscall": "getrandom",
"comment": "getrandom is used by aws-lc library which we consume in virtio-rng"
},
{
"syscall": "accept4",
Expand Down Expand Up @@ -214,7 +210,7 @@
},
{
"syscall": "madvise",
"comment": "Used by the VirtIO balloon device and by musl for some customer workloads. It is also used by aws-lc during random number generation. They setup a memory page that mark with MADV_WIPEONFORK to be able to detect forks. They also call it with -1 to see if madvise is supported in certain platforms."
"comment": "Used by the VirtIO balloon device and by musl for some customer workloads. It is also used by aws-lc during random number generation. They setup a memory page that mark with MADV_WIPEONFORK to be able to detect forks. They also call it with -1 to see if madvise is supported in certain platforms."
},
{
"syscall": "mmap",
Expand Down Expand Up @@ -978,18 +974,6 @@
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1074048665,
"comment": "KVM_SET_MP_STATE"
}
]
},
{
"syscall": "ioctl",
"args": [
Expand All @@ -1002,18 +986,6 @@
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1077980832,
"comment": "KVM_SET_VCPU_EVENTS"
}
]
},
{
"syscall": "ioctl",
"args": [
Expand All @@ -1038,78 +1010,6 @@
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1074310800,
"comment": "KVM_SET_CPUID2"
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1140895375,
"comment": "KVM_SET_LAPIC"
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1074310793,
"comment": "KVM_SET_MSRS"
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1083223682,
"comment": "KVM_SET_REGS"
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1094233732,
"comment": "KVM_SET_SREGS"
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 2154868383,
"comment": "KVM_GET_PIT2"
}
]
},
{
"syscall": "ioctl",
"args": [
Expand Down Expand Up @@ -1158,18 +1058,6 @@
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1082175138,
"comment": "KVM_SET_DEBUGREGS"
}
]
},
{
"syscall": "ioctl",
"args": [
Expand All @@ -1182,18 +1070,6 @@
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1342221989,
"comment": "KVM_SET_XSAVE"
}
]
},
{
"syscall": "ioctl",
"args": [
Expand All @@ -1206,30 +1082,6 @@
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 1099476647,
"comment": "KVM_SET_XCRS"
}
]
},
{
"syscall": "ioctl",
"args": [
{
"index": 1,
"type": "dword",
"op": "eq",
"val": 44706,
"comment": "KVM_SET_TSC_KHZ"
}
]
},
{
"syscall": "ioctl",
"args": [
Expand Down
Loading
Loading