summaryrefslogtreecommitdiff
path: root/experimental/firefox-esr/fix-sandbox-membarrier.patch
blob: 841b17a91ac7ec36f45f85663a420dd9fc0e06dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
allow usage of SYS_membarrier, needed since musl-1.1.22

--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -283,6 +283,8 @@
       case __NR_set_tid_address:
         return Allow();
 #endif
+      case __NR_membarrier:
+        return Allow();
 
         // prctl
       case __NR_prctl: {

--- a/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
+++ b/security/sandbox/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
@@ -1385,6 +1385,10 @@
 #define __NR_memfd_create (__NR_SYSCALL_BASE+385)
 #endif
 
+#if !defined(__NR_membarrier)
+#define __NR_membarrier (__NR_SYSCALL_BASE+389)
+#endif
+
 // ARM private syscalls.
 #if !defined(__ARM_NR_BASE)
 #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)

--- a/security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h
+++ b/security/sandbox/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h
@@ -1290,5 +1290,9 @@
 #define __NR_memfd_create 319
 #endif
 
+#if !defined(__NR_membarrier)
+#define __NR_membarrier 324
+#endif
+
 #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_
 
--- a/security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h
+++ b/security/sandbox/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h
@@ -1490,5 +1490,9 @@
 #define __NR_shutdown 373
 #endif
 
+#if !defined(__NR_membarrier)
+#define __NR_membarrier 375
+#endif
+
 #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_