From 97831496736b2b05802aa614fef7beaa304771e7 Mon Sep 17 00:00:00 2001 From: Tao Su Date: Thu, 4 Dec 2025 10:17:59 +0000 Subject: [PATCH] Mark `getrlimit` and `setrlimit` as fully supported --- book/src/kernel/linux-compatibility/README.md | 4 ++-- .../process-and-thread-management/fully_covered.scml | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/book/src/kernel/linux-compatibility/README.md b/book/src/kernel/linux-compatibility/README.md index 4ba8b3ec4..0087f29c9 100644 --- a/book/src/kernel/linux-compatibility/README.md +++ b/book/src/kernel/linux-compatibility/README.md @@ -117,7 +117,7 @@ which are summarized in the table below. | 94 | lchown | ✅ | 💯 | | 95 | umask | ✅ | 💯 | | 96 | gettimeofday | ✅ | 💯 | -| 97 | getrlimit | ✅ | ❓ | +| 97 | getrlimit | ✅ | 💯 | | 98 | getrusage | ✅ | [⚠️](syscall-flag-coverage/system-information-and-misc/#getrusage) | | 99 | sysinfo | ✅ | 💯 | | 100 | times | ❌ | N/A | @@ -180,7 +180,7 @@ which are summarized in the table below. | 157 | prctl | ✅ | [⚠️](syscall-flag-coverage/namespaces-cgroups-and-security/#prctl) | | 158 | arch_prctl | ✅ | [⚠️](syscall-flag-coverage/system-information-and-misc/#arch_prctl) | | 159 | adjtimex | ❌ | N/A | -| 160 | setrlimit | ✅ | ❓ | +| 160 | setrlimit | ✅ | 💯 | | 161 | chroot | ✅ | 💯 | | 162 | sync | ✅ | 💯 | | 163 | acct | ❌ | N/A | diff --git a/book/src/kernel/linux-compatibility/syscall-flag-coverage/process-and-thread-management/fully_covered.scml b/book/src/kernel/linux-compatibility/syscall-flag-coverage/process-and-thread-management/fully_covered.scml index 3a429a61d..fa6dfcbb4 100644 --- a/book/src/kernel/linux-compatibility/syscall-flag-coverage/process-and-thread-management/fully_covered.scml +++ b/book/src/kernel/linux-compatibility/syscall-flag-coverage/process-and-thread-management/fully_covered.scml @@ -38,8 +38,15 @@ getppid(); sched_setaffinity(pid, cpusetsize, mask); sched_getaffinity(pid, cpusetsize, mask); +limit_resources = RLIMIT_AS | RLIMIT_CORE | RLIMIT_CPU | RLIMIT_DATA | RLIMIT_FSIZE | + RLIMIT_LOCKS | RLIMIT_MEMLOCK | RLIMIT_MSGQUEUE | RLIMIT_NICE | + RLIMIT_NOFILE | RLIMIT_NPROC | RLIMIT_RSS | RLIMIT_RTPRIO | + RLIMIT_RTTIME | RLIMIT_SIGPENDING | RLIMIT_STACK; + // Get or set resource limits -prlimit64(pid, resource, new_limit, old_limit); +prlimit64(pid, resource = , new_limit, old_limit); +getrlimit(resource = , rlim); +setrlimit(resource = , rlim); // Yield the processor sched_yield();