aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2023-04-03 07:45:07 +0200
committerDmitry Vyukov <dvyukov@google.com>2023-04-03 10:29:09 +0200
commit11d0e932eb82ef70289fd831f1196b9594ff50fb (patch)
tree44e22e61c333480ecb0f371e62e5e1fbae21c914 /sys/linux
parent77a7129ed4d2c502bc861e910db7c9ad61796460 (diff)
sys/linux: add map_shadow_stack syscall descriptions
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/prctl.txt6
-rw-r--r--sys/linux/prctl.txt.const7
-rw-r--r--sys/linux/sys.txt2
-rw-r--r--sys/linux/sys.txt.const1
4 files changed, 16 insertions, 0 deletions
diff --git a/sys/linux/prctl.txt b/sys/linux/prctl.txt
index ea4273fd7..1cec25ab2 100644
--- a/sys/linux/prctl.txt
+++ b/sys/linux/prctl.txt
@@ -173,5 +173,11 @@ arch_prctl$ARCH_SET_CPUID(code const[ARCH_SET_CPUID], arg boolptr)
arch_prctl$ARCH_MAP_VDSO_X32(code const[ARCH_MAP_VDSO_X32], arg intptr)
arch_prctl$ARCH_MAP_VDSO_32(code const[ARCH_MAP_VDSO_32], arg intptr)
arch_prctl$ARCH_MAP_VDSO_64(code const[ARCH_MAP_VDSO_64], arg intptr)
+arch_prctl$ARCH_SHSTK_STATUS(cmd const[ARCH_SHSTK_STATUS], res ptr[out, intptr])
+arch_prctl$ARCH_SHSTK_LOCK(cmd const[ARCH_SHSTK_LOCK], features flags[shadow_stack_features])
+arch_prctl$ARCH_SHSTK_UNLOCK(cmd const[ARCH_SHSTK_UNLOCK], features flags[shadow_stack_features])
+arch_prctl$ARCH_SHSTK_ENABLE(cmd const[ARCH_SHSTK_ENABLE], features flags[shadow_stack_features])
+arch_prctl$ARCH_SHSTK_DISABLE(cmd const[ARCH_SHSTK_DISABLE], features flags[shadow_stack_features])
_ = ARCH_SET_FS
+shadow_stack_features = ARCH_SHSTK_SHSTK, ARCH_SHSTK_WRSS
diff --git a/sys/linux/prctl.txt.const b/sys/linux/prctl.txt.const
index 15a2838c5..eedbd7a5b 100644
--- a/sys/linux/prctl.txt.const
+++ b/sys/linux/prctl.txt.const
@@ -9,6 +9,13 @@ ARCH_MAP_VDSO_X32 = 8193, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
ARCH_SET_CPUID = 4114, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
ARCH_SET_FS = 4098, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
ARCH_SET_GS = 4097, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
+ARCH_SHSTK_DISABLE = 20482, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
+ARCH_SHSTK_ENABLE = 20481, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
+ARCH_SHSTK_LOCK = 20483, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
+ARCH_SHSTK_SHSTK = 1, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
+ARCH_SHSTK_STATUS = 20485, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
+ARCH_SHSTK_UNLOCK = 20484, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
+ARCH_SHSTK_WRSS = 2, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
CAP_LAST_CAP = 40
PIDTYPE_PGID = 2
PIDTYPE_PID = 0
diff --git a/sys/linux/sys.txt b/sys/linux/sys.txt
index 02bd2b9ff..425e09b57 100644
--- a/sys/linux/sys.txt
+++ b/sys/linux/sys.txt
@@ -265,6 +265,8 @@ ptrace$cont(req flags[ptrace_req_cont], pid pid, ignored intptr, data intptr) (b
ptrace$PTRACE_SECCOMP_GET_FILTER(req const[PTRACE_SECCOMP_GET_FILTER], pid pid, addr intptr, data ptr[out, array[int8]]) (breaks_returns)
ptrace$PTRACE_SECCOMP_GET_METADATA(req const[PTRACE_SECCOMP_GET_METADATA], pid pid, addr len[data], data ptr[in, seccomp_metadata]) (breaks_returns)
+map_shadow_stack(addr vma, size bytesize[addr], flags boolptr)
+
seccomp_metadata {
filter_off int64
flags const[0, int64]
diff --git a/sys/linux/sys.txt.const b/sys/linux/sys.txt.const
index a979d9938..8ac271930 100644
--- a/sys/linux/sys.txt.const
+++ b/sys/linux/sys.txt.const
@@ -685,6 +685,7 @@ __NR_lseek = 19, amd64:8, arm64:riscv64:62, mips64le:5008
__NR_lstat = 107, amd64:6, arm64:riscv64:???, mips64le:5006
__NR_lstat64 = 196, amd64:arm64:mips64le:ppc64le:riscv64:s390x:???
__NR_madvise = 219, amd64:28, arm:220, arm64:riscv64:233, mips64le:5027, ppc64le:205
+__NR_map_shadow_stack = 386:arm:arm64:mips64le:ppc64le:riscv64:s390x:???, amd64:451
__NR_mbind = 235, 386:274, amd64:237, arm:319, mips64le:5227, ppc64le:259, s390x:268
__NR_membarrier = 283, 386:375, amd64:324, arm:389, mips64le:5318, ppc64le:365, s390x:356
__NR_memfd_create = 279, 386:356, amd64:319, arm:385, mips64le:5314, ppc64le:360, s390x:350