diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-09-13 12:00:58 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-09-13 12:02:45 +0200 |
| commit | 61ed43a86a3721708aeeee72b23bfa1eacd921b2 (patch) | |
| tree | 1eed00dae3f4e2881650f53f34362b33960a0caf /sys/linux/gen | |
| parent | 0e29942f77715486995d996f80f82742812d75a2 (diff) | |
sys/linux: prohibit EXT4_IOC_SHUTDOWN
EXT4_IOC_SHUTDOWN EXT4_IOC_SHUTDOWN on root fs effectively brings the machine down in weird ways.
Diffstat (limited to 'sys/linux/gen')
| -rw-r--r-- | sys/linux/gen/386.go | 12 | ||||
| -rw-r--r-- | sys/linux/gen/amd64.go | 12 | ||||
| -rw-r--r-- | sys/linux/gen/arm.go | 12 | ||||
| -rw-r--r-- | sys/linux/gen/arm64.go | 12 | ||||
| -rw-r--r-- | sys/linux/gen/ppc64le.go | 12 |
5 files changed, 10 insertions, 50 deletions
diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index a674011cd..cb6e610e5 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -25581,11 +25581,6 @@ var syscalls_386 = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 1074030082}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_inode_flags", TypeSize: 4}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 64, 128, 536870912, 4194304, 16384, 32768, 65536, 131072, 524288}, BitMask: true}}, }}, - {NR: 54, Name: "ioctl$EXT4_IOC_SHUTDOWN", CallName: "ioctl", Args: []Type{ - &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 2147768445}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_shutdown_flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true}}, - }}, {NR: 54, Name: "ioctl$EXT4_IOC_SWAP_BOOT", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 26129}, @@ -28931,7 +28926,7 @@ var syscalls_386 = []*Syscall{ }}, {NR: 54, Name: "ioctl$void", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 4}}, Vals: []uint64{21585, 21584, 3221510263, 3221510264}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 4}}, Vals: []uint64{21585, 21584, 3221510264}}, }}, {NR: 101, Name: "ioperm", CallName: "ioperm", Args: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "from", TypeSize: 4}}}, @@ -35274,9 +35269,6 @@ var consts_386 = []ConstValue{ {Name: "EXT4_DIRSYNC_FL", Value: 65536}, {Name: "EXT4_EOFBLOCKS_FL", Value: 4194304}, {Name: "EXT4_EXTENTS_FL", Value: 524288}, - {Name: "EXT4_GOING_FLAGS_DEFAULT"}, - {Name: "EXT4_GOING_FLAGS_LOGFLUSH", Value: 1}, - {Name: "EXT4_GOING_FLAGS_NOLOGFLUSH", Value: 2}, {Name: "EXT4_IMMUTABLE_FL", Value: 16}, {Name: "EXT4_IOC_ALLOC_DA_BLKS", Value: 26124}, {Name: "EXT4_IOC_GROUP_ADD", Value: 1076127240}, @@ -40761,4 +40753,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "c1d0b0e8e27df332e1faf02379d003ad46332382" +const revision_386 = "c3e9f866fbd9c9b5fbd17cf3307b4fe3b2f75348" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index 8685fb837..e7b43a890 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -26031,11 +26031,6 @@ var syscalls_amd64 = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074292226}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_inode_flags", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 64, 128, 536870912, 4194304, 16384, 32768, 65536, 131072, 524288}, BitMask: true}}, }}, - {NR: 16, Name: "ioctl$EXT4_IOC_SHUTDOWN", CallName: "ioctl", Args: []Type{ - &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147768445}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_shutdown_flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true}}, - }}, {NR: 16, Name: "ioctl$EXT4_IOC_SWAP_BOOT", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 26129}, @@ -29401,7 +29396,7 @@ var syscalls_amd64 = []*Syscall{ }}, {NR: 16, Name: "ioctl$void", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{21585, 21584, 3221510263, 3221510264}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{21585, 21584, 3221510264}}, }}, {NR: 173, Name: "ioperm", CallName: "ioperm", Args: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "from", TypeSize: 8}}}, @@ -35943,9 +35938,6 @@ var consts_amd64 = []ConstValue{ {Name: "EXT4_DIRSYNC_FL", Value: 65536}, {Name: "EXT4_EOFBLOCKS_FL", Value: 4194304}, {Name: "EXT4_EXTENTS_FL", Value: 524288}, - {Name: "EXT4_GOING_FLAGS_DEFAULT"}, - {Name: "EXT4_GOING_FLAGS_LOGFLUSH", Value: 1}, - {Name: "EXT4_GOING_FLAGS_NOLOGFLUSH", Value: 2}, {Name: "EXT4_IMMUTABLE_FL", Value: 16}, {Name: "EXT4_IOC_ALLOC_DA_BLKS", Value: 26124}, {Name: "EXT4_IOC_GROUP_ADD", Value: 1076389384}, @@ -41455,4 +41447,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "11225337e750e35b0a5e061fc783471b4dea4779" +const revision_amd64 = "6bdfbb95f32c22baa7aa2c0ecbcc8a46c076d4b8" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index 839c8984b..a6051eac5 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -25468,11 +25468,6 @@ var syscalls_arm = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 1074030082}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_inode_flags", TypeSize: 4}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 64, 128, 536870912, 4194304, 16384, 32768, 65536, 131072, 524288}, BitMask: true}}, }}, - {NR: 54, Name: "ioctl$EXT4_IOC_SHUTDOWN", CallName: "ioctl", Args: []Type{ - &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 2147768445}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_shutdown_flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true}}, - }}, {NR: 54, Name: "ioctl$EXT4_IOC_SWAP_BOOT", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 4}}, Val: 26129}, @@ -28703,7 +28698,7 @@ var syscalls_arm = []*Syscall{ }}, {NR: 54, Name: "ioctl$void", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 4}}, Vals: []uint64{21585, 21584, 3221510263, 3221510264}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 4}}, Vals: []uint64{21585, 21584, 3221510264}}, }}, {NR: 315, Name: "ioprio_get$pid", CallName: "ioprio_get", Args: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioprio_which_pid", FldName: "which", TypeSize: 4}}, Vals: []uint64{1, 2}, BitMask: true}, @@ -35194,9 +35189,6 @@ var consts_arm = []ConstValue{ {Name: "EXT4_DIRSYNC_FL", Value: 65536}, {Name: "EXT4_EOFBLOCKS_FL", Value: 4194304}, {Name: "EXT4_EXTENTS_FL", Value: 524288}, - {Name: "EXT4_GOING_FLAGS_DEFAULT"}, - {Name: "EXT4_GOING_FLAGS_LOGFLUSH", Value: 1}, - {Name: "EXT4_GOING_FLAGS_NOLOGFLUSH", Value: 2}, {Name: "EXT4_IMMUTABLE_FL", Value: 16}, {Name: "EXT4_IOC_ALLOC_DA_BLKS", Value: 26124}, {Name: "EXT4_IOC_GROUP_ADD", Value: 1076127240}, @@ -40627,4 +40619,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "224cd53e69a2ef1e33f00bef661712cb661a295b" +const revision_arm = "b2c939941af575f3420311809187e09e1a8d3550" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 8255a43de..fffb05010 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -25770,11 +25770,6 @@ var syscalls_arm64 = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074292226}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_inode_flags", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 64, 128, 536870912, 4194304, 16384, 32768, 65536, 131072, 524288}, BitMask: true}}, }}, - {NR: 29, Name: "ioctl$EXT4_IOC_SHUTDOWN", CallName: "ioctl", Args: []Type{ - &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147768445}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_shutdown_flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true}}, - }}, {NR: 29, Name: "ioctl$EXT4_IOC_SWAP_BOOT", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 26129}, @@ -29025,7 +29020,7 @@ var syscalls_arm64 = []*Syscall{ }}, {NR: 29, Name: "ioctl$void", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{21585, 21584, 3221510263, 3221510264}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{21585, 21584, 3221510264}}, }}, {NR: 31, Name: "ioprio_get$pid", CallName: "ioprio_get", Args: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioprio_which_pid", FldName: "which", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true}, @@ -35425,9 +35420,6 @@ var consts_arm64 = []ConstValue{ {Name: "EXT4_DIRSYNC_FL", Value: 65536}, {Name: "EXT4_EOFBLOCKS_FL", Value: 4194304}, {Name: "EXT4_EXTENTS_FL", Value: 524288}, - {Name: "EXT4_GOING_FLAGS_DEFAULT"}, - {Name: "EXT4_GOING_FLAGS_LOGFLUSH", Value: 1}, - {Name: "EXT4_GOING_FLAGS_NOLOGFLUSH", Value: 2}, {Name: "EXT4_IMMUTABLE_FL", Value: 16}, {Name: "EXT4_IOC_ALLOC_DA_BLKS", Value: 26124}, {Name: "EXT4_IOC_GROUP_ADD", Value: 1076389384}, @@ -40849,4 +40841,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "2b84cd26632dbdfebc2b6fdbe68f7aafc24a7e7d" +const revision_arm64 = "adab252c69694890737ac9c5f3599bbb4530607c" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index 4a88ae8d7..4ab29f921 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -24827,11 +24827,6 @@ var syscalls_ppc64le = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2148034050}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_inode_flags", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 64, 128, 536870912, 4194304, 16384, 32768, 65536, 131072, 524288}, BitMask: true}}, }}, - {NR: 54, Name: "ioctl$EXT4_IOC_SHUTDOWN", CallName: "ioctl", Args: []Type{ - &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074026621}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ext4_shutdown_flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true}}, - }}, {NR: 54, Name: "ioctl$EXT4_IOC_SWAP_BOOT", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536897041}, @@ -27492,7 +27487,7 @@ var syscalls_ppc64le = []*Syscall{ }}, {NR: 54, Name: "ioctl$void", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{536897025, 536897026, 3221510263, 3221510264}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ioctl_void", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{536897025, 536897026, 3221510264}}, }}, {NR: 101, Name: "ioperm", CallName: "ioperm", Args: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "from", TypeSize: 8}}}, @@ -33820,9 +33815,6 @@ var consts_ppc64le = []ConstValue{ {Name: "EXT4_DIRSYNC_FL", Value: 65536}, {Name: "EXT4_EOFBLOCKS_FL", Value: 4194304}, {Name: "EXT4_EXTENTS_FL", Value: 524288}, - {Name: "EXT4_GOING_FLAGS_DEFAULT"}, - {Name: "EXT4_GOING_FLAGS_LOGFLUSH", Value: 1}, - {Name: "EXT4_GOING_FLAGS_NOLOGFLUSH", Value: 2}, {Name: "EXT4_IMMUTABLE_FL", Value: 16}, {Name: "EXT4_IOC_ALLOC_DA_BLKS", Value: 536897036}, {Name: "EXT4_IOC_GROUP_ADD", Value: 2150131208}, @@ -38205,4 +38197,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "213dc6a138b8d764010affcd2c64413208c5f03e" +const revision_ppc64le = "f06554787eb7d7767b620998d731246565f6b0b8" |
