diff options
| author | Christian Brauner <christian.brauner@ubuntu.com> | 2019-11-26 11:43:01 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-26 13:07:43 +0100 |
| commit | bc992c0ee464a9136203433aa7d282255616ca6e (patch) | |
| tree | c5f5e5a48104e43a7856e268c030f1b93e266530 /sys/linux | |
| parent | f72ffd024df9098b2d787d0107295a9669481cc9 (diff) | |
sys/linux: add new arguments to struct clone_args for clone3()
Linux v5.5 extends struct clone_args for clone3() by two additional
parameters:
@set_tid: Pointer to an array of type *pid_t. The size
of the array is defined using @set_tid_size.
This array is used to select PIDs/TIDs for
newly created processes. The first element in
this defines the PID in the most nested PID
namespace. Each additional element in the array
defines the PID in the parent PID namespace of
the original PID namespace. If the array has
less entries than the number of currently
nested PID namespaces only the PIDs in the
corresponding namespaces are set.
@set_tid_size: This defines the size of the array referenced
in @set_tid. This cannot be larger than the
kernel's limit of nested PID namespaces.
Cc: Adrian Reber <areber@redhat.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/gen/386.go | 6 | ||||
| -rw-r--r-- | sys/linux/gen/amd64.go | 6 | ||||
| -rw-r--r-- | sys/linux/gen/arm.go | 6 | ||||
| -rw-r--r-- | sys/linux/gen/arm64.go | 6 | ||||
| -rw-r--r-- | sys/linux/gen/ppc64le.go | 6 | ||||
| -rw-r--r-- | sys/linux/sys.txt | 2 |
6 files changed, 22 insertions, 10 deletions
diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index 5dd8f7ddd..2f7633afa 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -1985,7 +1985,7 @@ var structDescs_386 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "val", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "timeout", TypeSize: 4}}}, }}}, - {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 64}, Fields: []Type{ + {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 80}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clone_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{256, 512, 1024, 2048, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4096}, BitMask: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "pidfd", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pidfd", TypeSize: 4, ArgDir: 1}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "child_tid", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4, ArgDir: 1}}}, @@ -1995,6 +1995,8 @@ var structDescs_386 = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "stack", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "stack_size", TypeSize: 8}}, BitSize: 8, Path: []string{"stack"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "tls", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "set_tid", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4}}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "set_tid_size", TypeSize: 8}}, Path: []string{"set_tid"}}, }}}, {Key: StructKey{Name: "close_xrcd_cmd", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "close_xrcd_cmd", TypeSize: 12, ArgDir: 2}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "command", TypeSize: 4, ArgDir: 2}}, Val: 38}, @@ -55909,4 +55911,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "b1293dbe2ee6665ac7b881658eafc706d1c60bd6" +const revision_386 = "b8df8694a669e9d5d47f80861ca802fed57ed6c4" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index 863fbcd10..7b350bf93 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -1990,7 +1990,7 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "val", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "timeout", TypeSize: 4}}}, }}}, - {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 64}, Fields: []Type{ + {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 80}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clone_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{256, 512, 1024, 2048, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4096}, BitMask: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "pidfd", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pidfd", TypeSize: 4, ArgDir: 1}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "child_tid", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4, ArgDir: 1}}}, @@ -2000,6 +2000,8 @@ var structDescs_amd64 = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "stack", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "stack_size", TypeSize: 8}}, BitSize: 8, Path: []string{"stack"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "tls", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "set_tid", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4}}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "set_tid_size", TypeSize: 8}}, Path: []string{"set_tid"}}, }}}, {Key: StructKey{Name: "close_xrcd_cmd", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "close_xrcd_cmd", TypeSize: 12, ArgDir: 2}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "command", TypeSize: 4, ArgDir: 2}}, Val: 38}, @@ -56464,4 +56466,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "d39d2d5ebff24446c5c0967745361523f7bf74d5" +const revision_amd64 = "77be4d61dfdd899c8fd951eb88591e37a4af9c3b" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index 8f03fc3ef..dd2c865f2 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -1985,7 +1985,7 @@ var structDescs_arm = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "val", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "timeout", TypeSize: 4}}}, }}}, - {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 64}, Fields: []Type{ + {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 80}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clone_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{256, 512, 1024, 2048, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4096}, BitMask: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "pidfd", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pidfd", TypeSize: 4, ArgDir: 1}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "child_tid", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4, ArgDir: 1}}}, @@ -1995,6 +1995,8 @@ var structDescs_arm = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "stack", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "stack_size", TypeSize: 8}}, BitSize: 8, Path: []string{"stack"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "tls", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "set_tid", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4}}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "set_tid_size", TypeSize: 8}}, Path: []string{"set_tid"}}, }}}, {Key: StructKey{Name: "close_xrcd_cmd", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "close_xrcd_cmd", TypeSize: 12, ArgDir: 2}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "command", TypeSize: 4, ArgDir: 2}}, Val: 38}, @@ -55486,4 +55488,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "3faab3bd75e32594236822b84e777a660b8f44f1" +const revision_arm = "30fe6f6f30052aa0cb4f2faf14684a9daf096cca" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 4f74c00d1..389bad45d 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -1990,7 +1990,7 @@ var structDescs_arm64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "val", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "timeout", TypeSize: 4}}}, }}}, - {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 64}, Fields: []Type{ + {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 80}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clone_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{256, 512, 1024, 2048, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4096}, BitMask: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "pidfd", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pidfd", TypeSize: 4, ArgDir: 1}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "child_tid", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4, ArgDir: 1}}}, @@ -2000,6 +2000,8 @@ var structDescs_arm64 = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "stack", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "stack_size", TypeSize: 8}}, BitSize: 8, Path: []string{"stack"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "tls", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "set_tid", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4}}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "set_tid_size", TypeSize: 8}}, Path: []string{"set_tid"}}, }}}, {Key: StructKey{Name: "close_xrcd_cmd", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "close_xrcd_cmd", TypeSize: 12, ArgDir: 2}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "command", TypeSize: 4, ArgDir: 2}}, Val: 38}, @@ -55816,4 +55818,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "9309bbd8f2c02c715084efa8cdff142679b4e179" +const revision_arm64 = "e1c4269d6bf4622bd4db07d95b43e9f98a17c27a" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index 34bc7f302..cedf0777b 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -1989,7 +1989,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "val", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "timeout", TypeSize: 4}}}, }}}, - {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 64}, Fields: []Type{ + {Key: StructKey{Name: "clone_args"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "clone_args", TypeSize: 80}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clone_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{256, 512, 1024, 2048, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4096}, BitMask: true}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "pidfd", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_pidfd", TypeSize: 4, ArgDir: 1}}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "child_tid", TypeSize: 8}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4, ArgDir: 1}}}, @@ -1999,6 +1999,8 @@ var structDescs_ppc64le = []*KeyedStruct{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "stack", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "stack_size", TypeSize: 8}}, BitSize: 8, Path: []string{"stack"}}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "tls", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "set_tid", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", TypeSize: 4}}}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "set_tid_size", TypeSize: 8}}, Path: []string{"set_tid"}}, }}}, {Key: StructKey{Name: "close_xrcd_cmd", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "close_xrcd_cmd", TypeSize: 12, ArgDir: 2}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "command", TypeSize: 4, ArgDir: 2}}, Val: 38}, @@ -55781,4 +55783,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "fe19530420a5ffe4da19879e46a4ca674ee11f98" +const revision_ppc64le = "8d0319e849ff9f777be9f81414561fe16870344d" diff --git a/sys/linux/sys.txt b/sys/linux/sys.txt index 092bde54a..758814413 100644 --- a/sys/linux/sys.txt +++ b/sys/linux/sys.txt @@ -251,6 +251,8 @@ clone_args { stack ptr64[out, array[int8]] stack_size bytesize[stack, int64] tls ptr64[out, array[int8]] + set_tid ptr64[in, array[pid]] + set_tid_size len[set_tid, int64] } resource pid[int32]: 0, -1 |
