aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-11-17 14:33:41 -0800
committerDmitry Vyukov <dvyukov@google.com>2018-11-17 15:46:37 -0800
commit993f4bbae0f61d6e2a8f8974bd68a005f3a8b895 (patch)
tree9fdbe223664b69bb753be9b64662ef0e3f394e5d
parent1d44216fcf67bcee7a7dd19118e42d29cf9c63a7 (diff)
sys/linux: modernize arch_prctl descriptions
-rw-r--r--executor/defs.h4
-rw-r--r--executor/syscalls.h18
-rw-r--r--sys/linux/gen/386.go40
-rw-r--r--sys/linux/gen/amd64.go40
-rw-r--r--sys/linux/prctl.txt10
-rw-r--r--sys/linux/prctl_386.const5
-rw-r--r--sys/linux/prctl_amd64.const5
-rw-r--r--sys/linux/prctl_arm.const5
-rw-r--r--sys/linux/prctl_arm64.const5
-rw-r--r--sys/linux/prctl_ppc64le.const5
10 files changed, 123 insertions, 14 deletions
diff --git a/executor/defs.h b/executor/defs.h
index e5c49a750..4e8389978 100644
--- a/executor/defs.h
+++ b/executor/defs.h
@@ -60,7 +60,7 @@
#if GOARCH_386
#define GOARCH "386"
-#define SYZ_REVISION "a5436331465262bc66482761d656cfabd67917d1"
+#define SYZ_REVISION "5be615680ac09c332170d9f080a0be530e160a4f"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@@ -70,7 +70,7 @@
#if GOARCH_amd64
#define GOARCH "amd64"
-#define SYZ_REVISION "112acfabe4e7b1b36f0fbc502605c5180d3bee7f"
+#define SYZ_REVISION "b7f4b3d01115f65eaf273efa57f7ae10400936dc"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
diff --git a/executor/syscalls.h b/executor/syscalls.h
index 2e5ce2149..0e72a1a64 100644
--- a/executor/syscalls.h
+++ b/executor/syscalls.h
@@ -1313,7 +1313,14 @@ const call_t syscalls[] = {
{"add_key$keyring", 286},
{"add_key$user", 286},
{"alarm", 27},
- {"arch_prctl", 384},
+ {"arch_prctl$ARCH_GET_CPUID", 384},
+ {"arch_prctl$ARCH_GET_FS", 384},
+ {"arch_prctl$ARCH_GET_GS", 384},
+ {"arch_prctl$ARCH_MAP_VDSO_32", 384},
+ {"arch_prctl$ARCH_MAP_VDSO_64", 384},
+ {"arch_prctl$ARCH_MAP_VDSO_X32", 384},
+ {"arch_prctl$ARCH_SET_CPUID", 384},
+ {"arch_prctl$ARCH_SET_GS", 384},
{"bind", 361},
{"bind$alg", 361},
{"bind$ax25", 361},
@@ -3629,7 +3636,14 @@ const call_t syscalls[] = {
{"add_key$keyring", 248},
{"add_key$user", 248},
{"alarm", 37},
- {"arch_prctl", 158},
+ {"arch_prctl$ARCH_GET_CPUID", 158},
+ {"arch_prctl$ARCH_GET_FS", 158},
+ {"arch_prctl$ARCH_GET_GS", 158},
+ {"arch_prctl$ARCH_MAP_VDSO_32", 158},
+ {"arch_prctl$ARCH_MAP_VDSO_64", 158},
+ {"arch_prctl$ARCH_MAP_VDSO_X32", 158},
+ {"arch_prctl$ARCH_SET_CPUID", 158},
+ {"arch_prctl$ARCH_SET_GS", 158},
{"bind", 49},
{"bind$alg", 49},
{"bind$ax25", 49},
diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go
index ae2458179..e817d8c39 100644
--- a/sys/linux/gen/386.go
+++ b/sys/linux/gen/386.go
@@ -22952,9 +22952,36 @@ var syscalls_386 = []*Syscall{
{NR: 27, Name: "alarm", CallName: "alarm", Args: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "seconds", TypeSize: 4}}},
}},
- {NR: 384, Name: "arch_prctl", CallName: "arch_prctl", Args: []Type{
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arch_prctl_code", FldName: "code", TypeSize: 4}}, Vals: []uint64{4099, 4097, 4100}},
- &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "addr", TypeSize: 4}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ {NR: 384, Name: "arch_prctl$ARCH_GET_CPUID", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 4113},
+ }},
+ {NR: 384, Name: "arch_prctl$ARCH_GET_FS", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 4099},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 8, ArgDir: 1}}}},
+ }},
+ {NR: 384, Name: "arch_prctl$ARCH_GET_GS", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 4100},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 8, ArgDir: 1}}}},
+ }},
+ {NR: 384, Name: "arch_prctl$ARCH_MAP_VDSO_32", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 8194},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "arg", TypeSize: 4}}},
+ }},
+ {NR: 384, Name: "arch_prctl$ARCH_MAP_VDSO_64", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 8195},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "arg", TypeSize: 4}}},
+ }},
+ {NR: 384, Name: "arch_prctl$ARCH_MAP_VDSO_X32", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 8193},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "arg", TypeSize: 4}}},
+ }},
+ {NR: 384, Name: "arch_prctl$ARCH_SET_CPUID", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 4114},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "arg", TypeSize: 4}}, Kind: 2, RangeEnd: 1},
+ }},
+ {NR: 384, Name: "arch_prctl$ARCH_SET_GS", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 4097},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "arg", TypeSize: 8}}},
}},
{NR: 361, Name: "bind", CallName: "bind", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
@@ -35458,8 +35485,13 @@ var consts_386 = []ConstValue{
{Name: "ALG_SET_IV", Value: 2},
{Name: "ALG_SET_KEY", Value: 1},
{Name: "ALG_SET_OP", Value: 3},
+ {Name: "ARCH_GET_CPUID", Value: 4113},
{Name: "ARCH_GET_FS", Value: 4099},
{Name: "ARCH_GET_GS", Value: 4100},
+ {Name: "ARCH_MAP_VDSO_32", Value: 8194},
+ {Name: "ARCH_MAP_VDSO_64", Value: 8195},
+ {Name: "ARCH_MAP_VDSO_X32", Value: 8193},
+ {Name: "ARCH_SET_CPUID", Value: 4114},
{Name: "ARCH_SET_FS", Value: 4098},
{Name: "ARCH_SET_GS", Value: 4097},
{Name: "ARPHRD_6LOWPAN", Value: 825},
@@ -42271,4 +42303,4 @@ var consts_386 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_386 = "a5436331465262bc66482761d656cfabd67917d1"
+const revision_386 = "5be615680ac09c332170d9f080a0be530e160a4f"
diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go
index 2b64c1833..7b44df637 100644
--- a/sys/linux/gen/amd64.go
+++ b/sys/linux/gen/amd64.go
@@ -23411,9 +23411,36 @@ var syscalls_amd64 = []*Syscall{
{NR: 37, Name: "alarm", CallName: "alarm", Args: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "seconds", TypeSize: 8}}},
}},
- {NR: 158, Name: "arch_prctl", CallName: "arch_prctl", Args: []Type{
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arch_prctl_code", FldName: "code", TypeSize: 8}}, Vals: []uint64{4099, 4097, 4100}},
- &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "addr", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ {NR: 158, Name: "arch_prctl$ARCH_GET_CPUID", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 4113},
+ }},
+ {NR: 158, Name: "arch_prctl$ARCH_GET_FS", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 4099},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 8, ArgDir: 1}}}},
+ }},
+ {NR: 158, Name: "arch_prctl$ARCH_GET_GS", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 4100},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 8, ArgDir: 1}}}},
+ }},
+ {NR: 158, Name: "arch_prctl$ARCH_MAP_VDSO_32", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 8194},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "arg", TypeSize: 8}}},
+ }},
+ {NR: 158, Name: "arch_prctl$ARCH_MAP_VDSO_64", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 8195},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "arg", TypeSize: 8}}},
+ }},
+ {NR: 158, Name: "arch_prctl$ARCH_MAP_VDSO_X32", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 8193},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "arg", TypeSize: 8}}},
+ }},
+ {NR: 158, Name: "arch_prctl$ARCH_SET_CPUID", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 4114},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "arg", TypeSize: 8}}, Kind: 2, RangeEnd: 1},
+ }},
+ {NR: 158, Name: "arch_prctl$ARCH_SET_GS", CallName: "arch_prctl", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 4097},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "arg", TypeSize: 8}}},
}},
{NR: 49, Name: "bind", CallName: "bind", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
@@ -36136,8 +36163,13 @@ var consts_amd64 = []ConstValue{
{Name: "ALG_SET_IV", Value: 2},
{Name: "ALG_SET_KEY", Value: 1},
{Name: "ALG_SET_OP", Value: 3},
+ {Name: "ARCH_GET_CPUID", Value: 4113},
{Name: "ARCH_GET_FS", Value: 4099},
{Name: "ARCH_GET_GS", Value: 4100},
+ {Name: "ARCH_MAP_VDSO_32", Value: 8194},
+ {Name: "ARCH_MAP_VDSO_64", Value: 8195},
+ {Name: "ARCH_MAP_VDSO_X32", Value: 8193},
+ {Name: "ARCH_SET_CPUID", Value: 4114},
{Name: "ARCH_SET_FS", Value: 4098},
{Name: "ARCH_SET_GS", Value: 4097},
{Name: "ARPHRD_6LOWPAN", Value: 825},
@@ -42974,4 +43006,4 @@ var consts_amd64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_amd64 = "112acfabe4e7b1b36f0fbc502605c5180d3bee7f"
+const revision_amd64 = "b7f4b3d01115f65eaf273efa57f7ae10400936dc"
diff --git a/sys/linux/prctl.txt b/sys/linux/prctl.txt
index 4333cd5d3..20147e427 100644
--- a/sys/linux/prctl.txt
+++ b/sys/linux/prctl.txt
@@ -113,7 +113,13 @@ prctl$PR_SET_SPECULATION_CTRL(option const[PR_SET_SPECULATION_CTRL], arg2 const[
pr_spec_mode = PR_SPEC_ENABLE, PR_SPEC_DISABLE, PR_SPEC_FORCE_DISABLE
-arch_prctl(code flags[arch_prctl_code], addr buffer[in])
+arch_prctl$ARCH_GET_FS(code const[ARCH_GET_FS], arg ptr[out, int64])
+arch_prctl$ARCH_GET_GS(code const[ARCH_GET_GS], arg ptr[out, int64])
+arch_prctl$ARCH_SET_GS(code const[ARCH_SET_GS], arg int64)
+arch_prctl$ARCH_GET_CPUID(code const[ARCH_GET_CPUID])
+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_code = ARCH_GET_FS, ARCH_SET_GS, ARCH_GET_GS
_ = ARCH_SET_FS
diff --git a/sys/linux/prctl_386.const b/sys/linux/prctl_386.const
index c54083162..ea3d2e1e9 100644
--- a/sys/linux/prctl_386.const
+++ b/sys/linux/prctl_386.const
@@ -1,6 +1,11 @@
# AUTOGENERATED FILE
+ARCH_GET_CPUID = 4113
ARCH_GET_FS = 4099
ARCH_GET_GS = 4100
+ARCH_MAP_VDSO_32 = 8194
+ARCH_MAP_VDSO_64 = 8195
+ARCH_MAP_VDSO_X32 = 8193
+ARCH_SET_CPUID = 4114
ARCH_SET_FS = 4098
ARCH_SET_GS = 4097
CAP_LAST_CAP = 37
diff --git a/sys/linux/prctl_amd64.const b/sys/linux/prctl_amd64.const
index 3c10268e5..e0c1f3ad2 100644
--- a/sys/linux/prctl_amd64.const
+++ b/sys/linux/prctl_amd64.const
@@ -1,6 +1,11 @@
# AUTOGENERATED FILE
+ARCH_GET_CPUID = 4113
ARCH_GET_FS = 4099
ARCH_GET_GS = 4100
+ARCH_MAP_VDSO_32 = 8194
+ARCH_MAP_VDSO_64 = 8195
+ARCH_MAP_VDSO_X32 = 8193
+ARCH_SET_CPUID = 4114
ARCH_SET_FS = 4098
ARCH_SET_GS = 4097
CAP_LAST_CAP = 37
diff --git a/sys/linux/prctl_arm.const b/sys/linux/prctl_arm.const
index 79163e917..933fb9abe 100644
--- a/sys/linux/prctl_arm.const
+++ b/sys/linux/prctl_arm.const
@@ -1,6 +1,11 @@
# AUTOGENERATED FILE
+# ARCH_GET_CPUID is not set
# ARCH_GET_FS is not set
# ARCH_GET_GS is not set
+# ARCH_MAP_VDSO_32 is not set
+# ARCH_MAP_VDSO_64 is not set
+# ARCH_MAP_VDSO_X32 is not set
+# ARCH_SET_CPUID is not set
# ARCH_SET_FS is not set
# ARCH_SET_GS is not set
CAP_LAST_CAP = 37
diff --git a/sys/linux/prctl_arm64.const b/sys/linux/prctl_arm64.const
index cdffee4de..ade4c7fcf 100644
--- a/sys/linux/prctl_arm64.const
+++ b/sys/linux/prctl_arm64.const
@@ -1,6 +1,11 @@
# AUTOGENERATED FILE
+# ARCH_GET_CPUID is not set
# ARCH_GET_FS is not set
# ARCH_GET_GS is not set
+# ARCH_MAP_VDSO_32 is not set
+# ARCH_MAP_VDSO_64 is not set
+# ARCH_MAP_VDSO_X32 is not set
+# ARCH_SET_CPUID is not set
# ARCH_SET_FS is not set
# ARCH_SET_GS is not set
CAP_LAST_CAP = 37
diff --git a/sys/linux/prctl_ppc64le.const b/sys/linux/prctl_ppc64le.const
index a025bcf42..ba41c856e 100644
--- a/sys/linux/prctl_ppc64le.const
+++ b/sys/linux/prctl_ppc64le.const
@@ -1,6 +1,11 @@
# AUTOGENERATED FILE
+# ARCH_GET_CPUID is not set
# ARCH_GET_FS is not set
# ARCH_GET_GS is not set
+# ARCH_MAP_VDSO_32 is not set
+# ARCH_MAP_VDSO_64 is not set
+# ARCH_MAP_VDSO_X32 is not set
+# ARCH_SET_CPUID is not set
# ARCH_SET_FS is not set
# ARCH_SET_GS is not set
CAP_LAST_CAP = 37