sys/linux: improve user_desc description

This commit is contained in:
Dmitry Vyukov 2017-09-20 14:01:19 +02:00
parent 0818340e80
commit 4e341009db
5 changed files with 49 additions and 25 deletions

View File

@ -7,7 +7,7 @@ struct call_t {
#if defined(__i386__) || 0
#define GOARCH "386"
#define SYZ_REVISION "817d5dcfa9dec456b49c7cc6ca36ba9b9d5c1446"
#define SYZ_REVISION "86d577076d75af98e3c800a3c65bf8e4869e3ea4"
#define __NR_syz_emit_ethernet 1000000
#define __NR_syz_extract_tcp_res 1000001
#define __NR_syz_fuse_mount 1000002
@ -1505,7 +1505,7 @@ static call_t syscalls[] = {
#if defined(__x86_64__) || 0
#define GOARCH "amd64"
#define SYZ_REVISION "2110332256642767b7334820437051cbaa3bdec8"
#define SYZ_REVISION "e482e82186ee2d78bed701630c062b7c5d5b23c6"
#define __NR_syz_emit_ethernet 1000000
#define __NR_syz_extract_tcp_res 1000001
#define __NR_syz_fuse_mount 1000002
@ -6063,7 +6063,7 @@ static call_t syscalls[] = {
#if defined(__ppc64__) || defined(__PPC64__) || defined(__powerpc64__) || 0
#define GOARCH "ppc64le"
#define SYZ_REVISION "97d1c4ad9a60234dd4a2125f5ef68755e795a6b2"
#define SYZ_REVISION "0af6f5872777fdaf20c06a1f982df39659c46b6a"
#define __NR_syz_emit_ethernet 1000000
#define __NR_syz_extract_tcp_res 1000001
#define __NR_syz_fuse_mount 1000002

View File

@ -5516,11 +5516,16 @@ var structDescs_386 = []*KeyedStruct{
&ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd1", TypeSize: 4, ArgDir: 1}},
}}},
{Key: StructKey{Name: "user_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "user_desc", TypeSize: 16}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "entry", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "base", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "limit", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "flags", TypeSize: 1}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "entry_number", TypeSize: 4}}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "user_desc_bases", FldName: "base_addr", TypeSize: 4}}, Vals: []uint64{0, 4096, 1048576, 536870912, 536872960, 536875008, 4294967295}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "user_desc_limits", FldName: "limit", TypeSize: 4}}, Vals: []uint64{0, 1024, 4096, 8192, 16384, 4294967295}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "seg_32bit", TypeSize: 4}, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "contents", TypeSize: 4}, BitfieldOff: 1, BitfieldLen: 2, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "read_exec_only", TypeSize: 4}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "limit_in_pages", TypeSize: 4}, BitfieldOff: 4, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "seg_not_present", TypeSize: 4}, BitfieldOff: 5, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "useable", TypeSize: 4}, BitfieldOff: 6, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "lm", TypeSize: 4}, BitfieldOff: 7, BitfieldLen: 1}},
}}},
{Key: StructKey{Name: "ustat", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ustat", TypeSize: 20, ArgDir: 1}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "free", TypeSize: 4, ArgDir: 1}}},
@ -16729,4 +16734,4 @@ var consts_386 = []ConstValue{
{Name: "__WNOTHREAD", Value: 536870912},
}
const revision_386 = "817d5dcfa9dec456b49c7cc6ca36ba9b9d5c1446"
const revision_386 = "86d577076d75af98e3c800a3c65bf8e4869e3ea4"

View File

@ -5696,11 +5696,16 @@ var structDescs_amd64 = []*KeyedStruct{
&ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd1", TypeSize: 4, ArgDir: 1}},
}}},
{Key: StructKey{Name: "user_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "user_desc", TypeSize: 16}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "entry", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "base", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "limit", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "flags", TypeSize: 1}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "entry_number", TypeSize: 4}}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "user_desc_bases", FldName: "base_addr", TypeSize: 4}}, Vals: []uint64{0, 4096, 1048576, 536870912, 536872960, 536875008, 4294967295}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "user_desc_limits", FldName: "limit", TypeSize: 4}}, Vals: []uint64{0, 1024, 4096, 8192, 16384, 4294967295}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "seg_32bit", TypeSize: 4}, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "contents", TypeSize: 4}, BitfieldOff: 1, BitfieldLen: 2, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "read_exec_only", TypeSize: 4}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "limit_in_pages", TypeSize: 4}, BitfieldOff: 4, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "seg_not_present", TypeSize: 4}, BitfieldOff: 5, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "useable", TypeSize: 4}, BitfieldOff: 6, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "lm", TypeSize: 4}, BitfieldOff: 7, BitfieldLen: 1}},
}}},
{Key: StructKey{Name: "ustat", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ustat", TypeSize: 32, ArgDir: 1}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "free", TypeSize: 4, ArgDir: 1}}},
@ -17259,4 +17264,4 @@ var consts_amd64 = []ConstValue{
{Name: "__WNOTHREAD", Value: 536870912},
}
const revision_amd64 = "2110332256642767b7334820437051cbaa3bdec8"
const revision_amd64 = "e482e82186ee2d78bed701630c062b7c5d5b23c6"

View File

@ -5329,11 +5329,16 @@ var structDescs_ppc64le = []*KeyedStruct{
&ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd1", TypeSize: 4, ArgDir: 1}},
}}},
{Key: StructKey{Name: "user_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "user_desc", TypeSize: 16}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "entry", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "base", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "limit", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "flags", TypeSize: 1}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "entry_number", TypeSize: 4}}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "user_desc_bases", FldName: "base_addr", TypeSize: 4}}, Vals: []uint64{0, 4096, 1048576, 536870912, 536872960, 536875008, 4294967295}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "user_desc_limits", FldName: "limit", TypeSize: 4}}, Vals: []uint64{0, 1024, 4096, 8192, 16384, 4294967295}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "seg_32bit", TypeSize: 4}, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "contents", TypeSize: 4}, BitfieldOff: 1, BitfieldLen: 2, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "read_exec_only", TypeSize: 4}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "limit_in_pages", TypeSize: 4}, BitfieldOff: 4, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "seg_not_present", TypeSize: 4}, BitfieldOff: 5, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "useable", TypeSize: 4}, BitfieldOff: 6, BitfieldLen: 1, BitfieldMdl: true}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "lm", TypeSize: 4}, BitfieldOff: 7, BitfieldLen: 1}},
}}},
{Key: StructKey{Name: "ustat", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ustat", TypeSize: 32, ArgDir: 1}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "free", TypeSize: 4, ArgDir: 1}}},
@ -16325,4 +16330,4 @@ var consts_ppc64le = []ConstValue{
{Name: "__WNOTHREAD", Value: 536870912},
}
const revision_ppc64le = "97d1c4ad9a60234dd4a2125f5ef68755e795a6b2"
const revision_ppc64le = "0af6f5872777fdaf20c06a1f982df39659c46b6a"

View File

@ -802,14 +802,23 @@ ustat {
}
user_desc {
entry int32
entry_number int32
# Base should be vma and limit should be len[base]
# But these fields are int32, so we can't use vma.
base int32
limit int32
flags int8
base_addr flags[user_desc_bases, int32]
limit flags[user_desc_limits, int32]
seg_32bit int32:1
contents int32:2
read_exec_only int32:1
limit_in_pages int32:1
seg_not_present int32:1
useable int32:1
lm int32:1
}
user_desc_bases = 0, 4096, 1048576, 536870912, 536872960, 536875008, 0xffffffff
user_desc_limits = 0, 1024, 4096, 8192, 16384, 0xffffffff
sched_attr {
size flags[sched_attr_size, int32]
policy flags[sched_policy, int32]