aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/fs_ioctl_ext4.txt
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2020-06-11 00:13:09 +0200
committerAndrey Konovalov <andreyknvl@gmail.com>2020-06-12 18:42:12 +0200
commitea75f0e93ebc379bc7dce0cc526ea4b26573b0d1 (patch)
treefd3128f1e4c4d08f9c76f997374e4c62983353d8 /sys/linux/fs_ioctl_ext4.txt
parenta47f57a9517c1928ae3324eeb13388ab3bfd2e18 (diff)
sys/linux: rename fs_ext4.txt to fs_ioctl_ext4.txt
Diffstat (limited to 'sys/linux/fs_ioctl_ext4.txt')
-rw-r--r--sys/linux/fs_ioctl_ext4.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/sys/linux/fs_ioctl_ext4.txt b/sys/linux/fs_ioctl_ext4.txt
new file mode 100644
index 000000000..56d702bb9
--- /dev/null
+++ b/sys/linux/fs_ioctl_ext4.txt
@@ -0,0 +1,46 @@
+# Copyright 2018 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <uapi/linux/fs.h>
+include <uapi/linux/fsmap.h>
+include <fs/ext4/ext4.h>
+
+ioctl$EXT4_IOC_SETFLAGS(fd fd, cmd const[EXT4_IOC_SETFLAGS], arg ptr[in, flags[ext4_inode_flags, intptr]])
+ioctl$EXT4_IOC_GROUP_EXTEND(fd fd, cmd const[EXT4_IOC_GROUP_EXTEND], arg ptr[in, intptr])
+ioctl$EXT4_IOC_GROUP_ADD(fd fd, cmd const[EXT4_IOC_GROUP_ADD], arg ptr[in, ext4_new_group_input])
+ioctl$EXT4_IOC_MIGRATE(fd fd, cmd const[EXT4_IOC_MIGRATE])
+ioctl$EXT4_IOC_ALLOC_DA_BLKS(fd fd, cmd const[EXT4_IOC_ALLOC_DA_BLKS])
+ioctl$EXT4_IOC_MOVE_EXT(fd fd, cmd const[EXT4_IOC_MOVE_EXT], arg ptr[in, move_extent])
+ioctl$EXT4_IOC_SWAP_BOOT(fd fd, cmd const[EXT4_IOC_SWAP_BOOT])
+ioctl$EXT4_IOC_PRECACHE_EXTENTS(fd fd, cmd const[EXT4_IOC_PRECACHE_EXTENTS])
+
+ext4_inode_flags = EXT4_SECRM_FL, EXT4_UNRM_FL, EXT4_COMPR_FL, EXT4_SYNC_FL, EXT4_IMMUTABLE_FL, EXT4_APPEND_FL, EXT4_NODUMP_FL, EXT4_NOATIME_FL, EXT4_PROJINHERIT_FL, EXT4_JOURNAL_DATA_FL, EXT4_NOTAIL_FL, EXT4_DIRSYNC_FL, EXT4_TOPDIR_FL, EXT4_EXTENTS_FL
+
+# EXT4_IOC_SHUTDOWN on root fs effectively brings the machine down in weird ways.
+# Fortunately, the value does not conflict with any other ioctl commands for now.
+ioctl$EXT4_IOC_SHUTDOWN(fd fd, cmd const[EXT4_IOC_SHUTDOWN]) (disabled)
+
+# EXT4_IOC_RESIZE_FS on root fs can shrink it to 0 (or whatever is the minimum size)
+# and then creation of new temp dirs for tests will fail.
+# TODO: not necessary for sandbox=namespace as it tests in a tmpfs
+# and/or if we mount tmpfs for sandbox=none (#971).
+ioctl$EXT4_IOC_RESIZE_FS(fd fd, cmd const[EXT4_IOC_RESIZE_FS]) (disabled)
+
+ext4_new_group_input {
+ group int32
+ block_bitmap int64
+ inode_bitmap int64
+ inode_table int64
+ blocks_count int32
+ reserved_blocks int16
+ unused const[0, int16]
+}
+
+move_extent {
+ reserved const[0, int32]
+ donor_fd fd
+ orig_start int64
+ donor_start int64
+ len int64
+ moved_len int64
+}