aboutsummaryrefslogtreecommitdiff
path: root/src/util/syscall_sandbox.cpp
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-10-05 19:36:20 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-10-05 19:36:29 +0200
commitac402e749c91d40ce7066993f72f426b67196bd7 (patch)
treeca21f1a881d3ce86704c2707b027f788d8169614 /src/util/syscall_sandbox.cpp
parent64085b37f8d5c018372f013e925a725b67b527fc (diff)
downloadbitcoin-ac402e749c91d40ce7066993f72f426b67196bd7.tar.xz
util: Conditionalize some syscalls in syscall name table
Put these in `#ifdef` as they are newer syscalls that might not be defined on all kernels: __NR_pkey_alloc __NR_pkey_free __NR_pkey_mprotect __NR_preadv2 __NR_pwritev2 Thanks to jamesob for reporting.
Diffstat (limited to 'src/util/syscall_sandbox.cpp')
-rw-r--r--src/util/syscall_sandbox.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/syscall_sandbox.cpp b/src/util/syscall_sandbox.cpp
index 2b6a2dd14a..0380d39675 100644
--- a/src/util/syscall_sandbox.cpp
+++ b/src/util/syscall_sandbox.cpp
@@ -272,15 +272,23 @@ const std::map<uint32_t, std::string> LINUX_SYSCALLS{
{__NR_pipe, "pipe"},
{__NR_pipe2, "pipe2"},
{__NR_pivot_root, "pivot_root"},
+#ifdef __NR_pkey_alloc
{__NR_pkey_alloc, "pkey_alloc"},
+#endif
+#ifdef __NR_pkey_free
{__NR_pkey_free, "pkey_free"},
+#endif
+#ifdef __NR_pkey_mprotect
{__NR_pkey_mprotect, "pkey_mprotect"},
+#endif
{__NR_poll, "poll"},
{__NR_ppoll, "ppoll"},
{__NR_prctl, "prctl"},
{__NR_pread64, "pread64"},
{__NR_preadv, "preadv"},
+#ifdef __NR_preadv2
{__NR_preadv2, "preadv2"},
+#endif
{__NR_prlimit64, "prlimit64"},
{__NR_process_vm_readv, "process_vm_readv"},
{__NR_process_vm_writev, "process_vm_writev"},
@@ -289,7 +297,9 @@ const std::map<uint32_t, std::string> LINUX_SYSCALLS{
{__NR_putpmsg, "putpmsg"},
{__NR_pwrite64, "pwrite64"},
{__NR_pwritev, "pwritev"},
+#ifdef __NR_pwritev2
{__NR_pwritev2, "pwritev2"},
+#endif
{__NR_query_module, "query_module"},
{__NR_quotactl, "quotactl"},
{__NR_read, "read"},