seccomp: add cachestat syscall (kernel v6.5, libseccomp v2.5.5)

Add this syscall to match the profile in containerd

containerd: a6e52c74fa
libseccomp: 53267af3fb
kernel: cf264e1329

    NAME
        cachestat - query the page cache statistics of a file.

    SYNOPSIS
        #include <sys/mman.h>

        struct cachestat_range {
            __u64 off;
            __u64 len;
        };

        struct cachestat {
            __u64 nr_cache;
            __u64 nr_dirty;
            __u64 nr_writeback;
            __u64 nr_evicted;
            __u64 nr_recently_evicted;
        };

        int cachestat(unsigned int fd, struct cachestat_range *cstat_range,
            struct cachestat *cstat, unsigned int flags);

    DESCRIPTION
        cachestat() queries the number of cached pages, number of dirty
        pages, number of pages marked for writeback, number of evicted
        pages, number of recently evicted pages, in the bytes range given by
        `off` and `len`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4d0d5ee10d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2024-02-06 13:57:00 +01:00
parent 00f3d189e4
commit 4f26525b13
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 2 additions and 0 deletions

View file

@ -64,6 +64,7 @@
"alarm", "alarm",
"bind", "bind",
"brk", "brk",
"cachestat",
"capget", "capget",
"capset", "capset",
"chdir", "chdir",

View file

@ -56,6 +56,7 @@ func DefaultProfile() *Seccomp {
"alarm", "alarm",
"bind", "bind",
"brk", "brk",
"cachestat", // kernel v6.5, libseccomp v2.5.5
"capget", "capget",
"capset", "capset",
"chdir", "chdir",