aboutsummaryrefslogtreecommitdiff
path: root/librewolf/musl-sandbox-sched.patch
diff options
context:
space:
mode:
authorWoodpecker CI <emmett1.2miligrams@protonmail.com>2026-03-02 00:19:43 +0000
committerWoodpecker CI <emmett1.2miligrams@protonmail.com>2026-03-02 00:19:43 +0000
commitba183bce192264f4578989337ef61e756b7e130d (patch)
tree755618486e31be1f5822cde6149ad806768dc241 /librewolf/musl-sandbox-sched.patch
parentddeed1d8c208089ab95d7c971487650dc3b1ddff (diff)
downloadalicelinux-ba183bce192264f4578989337ef61e756b7e130d.tar.gz
alicelinux-ba183bce192264f4578989337ef61e756b7e130d.zip
Woodpecker CI 8ca72161f4af1c51192f5878cfc0e39a0ee84a03 [SKIP CI]
Diffstat (limited to 'librewolf/musl-sandbox-sched.patch')
-rw-r--r--librewolf/musl-sandbox-sched.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/librewolf/musl-sandbox-sched.patch b/librewolf/musl-sandbox-sched.patch
new file mode 100644
index 00000000..87b6e660
--- /dev/null
+++ b/librewolf/musl-sandbox-sched.patch
@@ -0,0 +1,57 @@
+diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1759,16 +1759,24 @@
+ return Allow();
+ case __NR_sched_get_priority_min:
+ case __NR_sched_get_priority_max:
+ return Allow();
+ case __NR_sched_getparam:
+- case __NR_sched_getscheduler:
+- case __NR_sched_setscheduler: {
++#if defined(LIBC_GLIBC)
++ case __NR_sched_setscheduler:
++#endif
++ case __NR_sched_getscheduler: {
+ Arg<pid_t> pid(0);
+ return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
+ }
+
++#if !defined(LIBC_GLIBC)
++ // For pthread_create(3) on musl; bug 1657849.
++ case __NR_sched_setscheduler:
++ return Allow();
++#endif
++
+ // For clock(3) on older glibcs; bug 1304220.
+ case __NR_times:
+ return Allow();
+
+ // Bug 1372428
+@@ -1950,17 +1958,25 @@
+ case __NR_sched_getaffinity:
+ case __NR_sched_setaffinity:
+ case __NR_sched_getparam:
+ case __NR_sched_setparam:
+ case __NR_sched_getscheduler:
++#if defined(LIBC_GLIBC)
+ case __NR_sched_setscheduler:
++#endif
+ case __NR_sched_getattr:
+ case __NR_sched_setattr: {
+ Arg<pid_t> pid(0);
+ return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
+ }
+
++#if !defined(LIBC_GLIBC)
++ // For pthread_create(3) on musl; bug 1657849.
++ case __NR_sched_setscheduler:
++ return Allow();
++#endif
++
+ // The priority bounds are also used, sometimes (bug 1838675):
+ case __NR_sched_get_priority_min:
+ case __NR_sched_get_priority_max:
+ return Allow();
+
+