You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove some redundant seccomp entries from allow lists
These have been determined by static analysis of a Firecracker binary
(see also follow up commits): The removed seccomp rules here trigger
syscalls that are either not present at all in the entire Firecracker
binary, or are not reachable from the entry point of a specific
Firecracker thread (this analysis has only been done for the vcpu thread
for now, due to being fairly tricky).
Some explanations for why some of these entries are no longer needed can
be found below
- The `uname` syscall was used back when we supported 4.14, to query the
host kernel version and disable specific Firecracker features that
were not supported pre-5.10 (io_uring and hugepages for memfd). With
4.14 support dropped, there are no such checks anymore.
- Various KVM_SET_* ioctls do not need to be allowed on the vcpu thread,
because they are all called _before_ the vcpu seccomp filters are
installed (as they are only used during snapshot restore / when
preparing KVM state for boot).
- on aarch64, we can additionally remove KVM_{SET,GET}VCPU_EVENTS, as we
never call this ioctl on arm (only on x86)
Signed-off-by: Patrick Roy <[email protected]>
Copy file name to clipboardExpand all lines: resources/seccomp/x86_64-unknown-linux-musl.json
+3-151Lines changed: 3 additions & 151 deletions
Original file line number
Diff line number
Diff line change
@@ -42,10 +42,6 @@
42
42
{
43
43
"syscall": "close"
44
44
},
45
-
{
46
-
"syscall": "uname",
47
-
"comment": "Used for getting the kernel version, for validating io_uring support"
48
-
},
49
45
{
50
46
"syscall": "eventfd2",
51
47
"comment": "Used for creating io_uring completion event, on drive patch"
@@ -111,8 +107,8 @@
111
107
"comment": "sigaltstack is used by Rust stdlib to remove alternative signal stack during thread teardown."
112
108
},
113
109
{
114
-
"syscall": "getrandom",
115
-
"comment": "getrandom is used by aws-lc library which we consume in virtio-rng"
110
+
"syscall": "getrandom",
111
+
"comment": "getrandom is used by aws-lc library which we consume in virtio-rng"
116
112
},
117
113
{
118
114
"syscall": "accept4",
@@ -214,7 +210,7 @@
214
210
},
215
211
{
216
212
"syscall": "madvise",
217
-
"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."
213
+
"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."
0 commit comments