Skip to content

Commit 23069b3

Browse files
author
Sablin Viacheslav
committed
sys/linux: updated fuse fs specifications
1 parent 6b85651 commit 23069b3

File tree

7 files changed

+236
-125
lines changed

7 files changed

+236
-125
lines changed

executor/common_linux.h

Lines changed: 122 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,26 +1506,26 @@ static void initialize_netdevices(void)
15061506
const char* type;
15071507
const char* dev;
15081508
} devtypes[] = {
1509-
// Note: ip6erspan device can't be added if ip6gretap exists in the same namespace.
1510-
{"ip6gretap", "ip6gretap0"},
1511-
{"bridge", "bridge0"},
1512-
{"vcan", "vcan0"},
1513-
{"bond", "bond0"},
1514-
{"team", "team0"},
1515-
{"dummy", "dummy0"},
1509+
// Note: ip6erspan device can't be added if ip6gretap exists in the same namespace.
1510+
{"ip6gretap", "ip6gretap0"},
1511+
{"bridge", "bridge0"},
1512+
{"vcan", "vcan0"},
1513+
{"bond", "bond0"},
1514+
{"team", "team0"},
1515+
{"dummy", "dummy0"},
15161516
#if SYZ_EXECUTOR || SYZ_NIC_VF
1517-
{"nicvf", "nicvf0"},
1518-
#endif
1519-
{"nlmon", "nlmon0"},
1520-
{"caif", "caif0"},
1521-
{"batadv", "batadv0"},
1522-
// Note: this adds vxcan0/vxcan1 pair, similar to veth (creating vxcan0 would fail).
1523-
{"vxcan", "vxcan1"},
1524-
// This adds connected veth0 and veth1 devices.
1525-
{"veth", 0},
1526-
{"wireguard", "wg0"},
1527-
{"wireguard", "wg1"},
1528-
{"wireguard", "wg2"},
1517+
{"nicvf", "nicvf0"},
1518+
#endif
1519+
{"nlmon", "nlmon0"},
1520+
{"caif", "caif0"},
1521+
{"batadv", "batadv0"},
1522+
// Note: this adds vxcan0/vxcan1 pair, similar to veth (creating vxcan0 would fail).
1523+
{"vxcan", "vxcan1"},
1524+
// This adds connected veth0 and veth1 devices.
1525+
{"veth", 0},
1526+
{"wireguard", "wg0"},
1527+
{"wireguard", "wg1"},
1528+
{"wireguard", "wg2"},
15291529
};
15301530
const char* devmasters[] = {"bridge", "bond", "team", "batadv"};
15311531
// If you extend this array, also update netdev_addr_id in vnet.txt
@@ -1535,67 +1535,67 @@ static void initialize_netdevices(void)
15351535
int macsize;
15361536
bool noipv6;
15371537
} devices[] = {
1538-
{"lo", ETH_ALEN},
1539-
{"sit0", 0},
1540-
{"bridge0", ETH_ALEN},
1541-
{"vcan0", 0, true},
1542-
{"tunl0", 0},
1543-
{"gre0", 0},
1544-
{"gretap0", ETH_ALEN},
1545-
{"ip_vti0", 0},
1546-
{"ip6_vti0", 0},
1547-
{"ip6tnl0", 0},
1548-
{"ip6gre0", 0},
1549-
{"ip6gretap0", ETH_ALEN},
1550-
{"erspan0", ETH_ALEN},
1551-
{"bond0", ETH_ALEN},
1552-
{"veth0", ETH_ALEN},
1553-
{"veth1", ETH_ALEN},
1554-
{"team0", ETH_ALEN},
1555-
{"veth0_to_bridge", ETH_ALEN},
1556-
{"veth1_to_bridge", ETH_ALEN},
1557-
{"veth0_to_bond", ETH_ALEN},
1558-
{"veth1_to_bond", ETH_ALEN},
1559-
{"veth0_to_team", ETH_ALEN},
1560-
{"veth1_to_team", ETH_ALEN},
1561-
{"veth0_to_hsr", ETH_ALEN},
1562-
{"veth1_to_hsr", ETH_ALEN},
1563-
{"hsr0", 0},
1564-
{"dummy0", ETH_ALEN},
1538+
{"lo", ETH_ALEN},
1539+
{"sit0", 0},
1540+
{"bridge0", ETH_ALEN},
1541+
{"vcan0", 0, true},
1542+
{"tunl0", 0},
1543+
{"gre0", 0},
1544+
{"gretap0", ETH_ALEN},
1545+
{"ip_vti0", 0},
1546+
{"ip6_vti0", 0},
1547+
{"ip6tnl0", 0},
1548+
{"ip6gre0", 0},
1549+
{"ip6gretap0", ETH_ALEN},
1550+
{"erspan0", ETH_ALEN},
1551+
{"bond0", ETH_ALEN},
1552+
{"veth0", ETH_ALEN},
1553+
{"veth1", ETH_ALEN},
1554+
{"team0", ETH_ALEN},
1555+
{"veth0_to_bridge", ETH_ALEN},
1556+
{"veth1_to_bridge", ETH_ALEN},
1557+
{"veth0_to_bond", ETH_ALEN},
1558+
{"veth1_to_bond", ETH_ALEN},
1559+
{"veth0_to_team", ETH_ALEN},
1560+
{"veth1_to_team", ETH_ALEN},
1561+
{"veth0_to_hsr", ETH_ALEN},
1562+
{"veth1_to_hsr", ETH_ALEN},
1563+
{"hsr0", 0},
1564+
{"dummy0", ETH_ALEN},
15651565
#if SYZ_EXECUTOR || SYZ_NIC_VF
1566-
{"nicvf0", 0, true},
1567-
#endif
1568-
{"nlmon0", 0},
1569-
{"vxcan0", 0, true},
1570-
{"vxcan1", 0, true},
1571-
{"caif0", ETH_ALEN}, // TODO: up'ing caif fails with ENODEV
1572-
{"batadv0", ETH_ALEN},
1573-
{netdevsim, ETH_ALEN},
1574-
{"xfrm0", ETH_ALEN},
1575-
{"veth0_virt_wifi", ETH_ALEN},
1576-
{"veth1_virt_wifi", ETH_ALEN},
1577-
{"virt_wifi0", ETH_ALEN},
1578-
{"veth0_vlan", ETH_ALEN},
1579-
{"veth1_vlan", ETH_ALEN},
1580-
{"vlan0", ETH_ALEN},
1581-
{"vlan1", ETH_ALEN},
1582-
{"macvlan0", ETH_ALEN},
1583-
{"macvlan1", ETH_ALEN},
1584-
{"ipvlan0", ETH_ALEN},
1585-
{"ipvlan1", ETH_ALEN},
1586-
{"veth0_macvtap", ETH_ALEN},
1587-
{"veth1_macvtap", ETH_ALEN},
1588-
{"macvtap0", ETH_ALEN},
1589-
{"macsec0", ETH_ALEN},
1590-
{"veth0_to_batadv", ETH_ALEN},
1591-
{"veth1_to_batadv", ETH_ALEN},
1592-
{"batadv_slave_0", ETH_ALEN},
1593-
{"batadv_slave_1", ETH_ALEN},
1594-
{"geneve0", ETH_ALEN},
1595-
{"geneve1", ETH_ALEN},
1596-
{"wg0", 0},
1597-
{"wg1", 0},
1598-
{"wg2", 0},
1566+
{"nicvf0", 0, true},
1567+
#endif
1568+
{"nlmon0", 0},
1569+
{"vxcan0", 0, true},
1570+
{"vxcan1", 0, true},
1571+
{"caif0", ETH_ALEN}, // TODO: up'ing caif fails with ENODEV
1572+
{"batadv0", ETH_ALEN},
1573+
{netdevsim, ETH_ALEN},
1574+
{"xfrm0", ETH_ALEN},
1575+
{"veth0_virt_wifi", ETH_ALEN},
1576+
{"veth1_virt_wifi", ETH_ALEN},
1577+
{"virt_wifi0", ETH_ALEN},
1578+
{"veth0_vlan", ETH_ALEN},
1579+
{"veth1_vlan", ETH_ALEN},
1580+
{"vlan0", ETH_ALEN},
1581+
{"vlan1", ETH_ALEN},
1582+
{"macvlan0", ETH_ALEN},
1583+
{"macvlan1", ETH_ALEN},
1584+
{"ipvlan0", ETH_ALEN},
1585+
{"ipvlan1", ETH_ALEN},
1586+
{"veth0_macvtap", ETH_ALEN},
1587+
{"veth1_macvtap", ETH_ALEN},
1588+
{"macvtap0", ETH_ALEN},
1589+
{"macsec0", ETH_ALEN},
1590+
{"veth0_to_batadv", ETH_ALEN},
1591+
{"veth1_to_batadv", ETH_ALEN},
1592+
{"batadv_slave_0", ETH_ALEN},
1593+
{"batadv_slave_1", ETH_ALEN},
1594+
{"geneve0", ETH_ALEN},
1595+
{"geneve1", ETH_ALEN},
1596+
{"wg0", 0},
1597+
{"wg1", 0},
1598+
{"wg2", 0},
15991599
};
16001600
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
16011601
if (sock == -1)
@@ -2100,7 +2100,7 @@ struct btf_header {
21002100
};
21012101

21022102
#define BTF_INFO_KIND(info) (((info) >> 24) & 0x0f)
2103-
#define BTF_INFO_VLEN(info) ((info)&0xffff)
2103+
#define BTF_INFO_VLEN(info) ((info) & 0xffff)
21042104

21052105
#define BTF_KIND_INT 1
21062106
#define BTF_KIND_ARRAY 3
@@ -5114,41 +5114,41 @@ static void setup_sysctl()
51145114
const char* data;
51155115
} files[] = {
51165116
#if GOARCH_amd64 || GOARCH_386
5117-
// nmi_check_duration() prints "INFO: NMI handler took too long" on slow debug kernels.
5118-
// It happens a lot in qemu, and the messages are frequently corrupted
5119-
// (intermixed with other kernel output as they are printed from NMI)
5120-
// and are not matched against the suppression in pkg/report.
5121-
// This write prevents these messages from being printed.
5122-
{"/sys/kernel/debug/x86/nmi_longest_ns", "10000000000"},
5123-
#endif
5124-
{"/proc/sys/kernel/hung_task_check_interval_secs", "20"},
5125-
// bpf_jit_kallsyms and disabling bpf_jit_harden are required
5126-
// for unwinding through bpf functions.
5127-
{"/proc/sys/net/core/bpf_jit_kallsyms", "1"},
5128-
{"/proc/sys/net/core/bpf_jit_harden", "0"},
5129-
// This is to provide more useful info in crash reports.
5130-
{"/proc/sys/kernel/kptr_restrict", "0"},
5131-
{"/proc/sys/kernel/softlockup_all_cpu_backtrace", "1"},
5132-
// This is to restrict effects of recursive exponential mounts, for details see
5133-
// "mnt: Add a per mount namespace limit on the number of mounts" commit.
5134-
{"/proc/sys/fs/mount-max", "100"},
5135-
// Dumping all tasks to console can take too long.
5136-
{"/proc/sys/vm/oom_dump_tasks", "0"},
5137-
// Executor hits lots of SIGSEGVs, no point in logging them.
5138-
{"/proc/sys/debug/exception-trace", "0"},
5139-
{"/proc/sys/kernel/printk", "7 4 1 3"},
5140-
// Faster gc (1 second) is intended to make tests more repeatable.
5141-
{"/proc/sys/kernel/keys/gc_delay", "1"},
5142-
// We always want to prefer killing the allocating test process rather than somebody else
5143-
// (sshd or another random test process).
5144-
{"/proc/sys/vm/oom_kill_allocating_task", "1"},
5145-
// This blocks some of the ways the fuzzer can trigger a reboot.
5146-
// ctrl-alt-del=0 tells kernel to signal cad_pid instead of rebooting.
5147-
// We set cad_pid to a transient process pid ctrl-alt-del a no-op.
5148-
// Note: we need to write a live process pid.
5149-
// For context see: https://groups.google.com/g/syzkaller-bugs/c/WqOY4TiRnFg/m/6P9u8lWZAQAJ
5150-
{"/proc/sys/kernel/ctrl-alt-del", "0"},
5151-
{"/proc/sys/kernel/cad_pid", tmppid},
5117+
// nmi_check_duration() prints "INFO: NMI handler took too long" on slow debug kernels.
5118+
// It happens a lot in qemu, and the messages are frequently corrupted
5119+
// (intermixed with other kernel output as they are printed from NMI)
5120+
// and are not matched against the suppression in pkg/report.
5121+
// This write prevents these messages from being printed.
5122+
{"/sys/kernel/debug/x86/nmi_longest_ns", "10000000000"},
5123+
#endif
5124+
{"/proc/sys/kernel/hung_task_check_interval_secs", "20"},
5125+
// bpf_jit_kallsyms and disabling bpf_jit_harden are required
5126+
// for unwinding through bpf functions.
5127+
{"/proc/sys/net/core/bpf_jit_kallsyms", "1"},
5128+
{"/proc/sys/net/core/bpf_jit_harden", "0"},
5129+
// This is to provide more useful info in crash reports.
5130+
{"/proc/sys/kernel/kptr_restrict", "0"},
5131+
{"/proc/sys/kernel/softlockup_all_cpu_backtrace", "1"},
5132+
// This is to restrict effects of recursive exponential mounts, for details see
5133+
// "mnt: Add a per mount namespace limit on the number of mounts" commit.
5134+
{"/proc/sys/fs/mount-max", "100"},
5135+
// Dumping all tasks to console can take too long.
5136+
{"/proc/sys/vm/oom_dump_tasks", "0"},
5137+
// Executor hits lots of SIGSEGVs, no point in logging them.
5138+
{"/proc/sys/debug/exception-trace", "0"},
5139+
{"/proc/sys/kernel/printk", "7 4 1 3"},
5140+
// Faster gc (1 second) is intended to make tests more repeatable.
5141+
{"/proc/sys/kernel/keys/gc_delay", "1"},
5142+
// We always want to prefer killing the allocating test process rather than somebody else
5143+
// (sshd or another random test process).
5144+
{"/proc/sys/vm/oom_kill_allocating_task", "1"},
5145+
// This blocks some of the ways the fuzzer can trigger a reboot.
5146+
// ctrl-alt-del=0 tells kernel to signal cad_pid instead of rebooting.
5147+
// We set cad_pid to a transient process pid ctrl-alt-del a no-op.
5148+
// Note: we need to write a live process pid.
5149+
// For context see: https://groups.google.com/g/syzkaller-bugs/c/WqOY4TiRnFg/m/6P9u8lWZAQAJ
5150+
{"/proc/sys/kernel/ctrl-alt-del", "0"},
5151+
{"/proc/sys/kernel/cad_pid", tmppid},
51525152

51535153
};
51545154
for (size_t i = 0; i < sizeof(files) / sizeof(files[0]); i++) {
@@ -5297,6 +5297,9 @@ enum fuse_opcode {
52975297
FUSE_COPY_FILE_RANGE = 47,
52985298
FUSE_SETUPMAPPING = 48,
52995299
FUSE_REMOVEMAPPING = 49,
5300+
FUSE_SYNCFS = 50,
5301+
FUSE_TMPFILE = 51,
5302+
FUSE_STATX = 52,
53005303

53015304
// CUSE specific operations
53025305
CUSE_INIT = 4096,
@@ -5348,6 +5351,7 @@ struct syz_fuse_req_out {
53485351
struct fuse_out_header* direntplus;
53495352
struct fuse_out_header* create_open;
53505353
struct fuse_out_header* ioctl;
5354+
struct fuse_out_header* statx;
53515355
};
53525356

53535357
// Link the reponse to the request and send it to /dev/fuse.
@@ -5496,6 +5500,9 @@ static volatile long syz_fuse_handle_req(volatile long a0, // /dev/fuse fd.
54965500
case FUSE_IOCTL:
54975501
out_hdr = req_out->ioctl;
54985502
break;
5503+
case FUSE_STATX:
5504+
out_hdr = req_out->statx;
5505+
break;
54995506
default:
55005507
debug("syz_fuse_handle_req: unknown FUSE opcode\n");
55015508
return -1;

sys/linux/fs_fuse.txt

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ resource fd_fuse[fd]
1212
openat$fuse(fd const[AT_FDCWD], file ptr[in, string["/dev/fuse"]], flags const[O_RDWR], mode const[0]) fd_fuse
1313
openat$cuse(fd const[AT_FDCWD], file ptr[in, string["/dev/cuse"]], flags const[O_RDWR], mode const[0]) fd_fuse
1414
ioctl$FUSE_DEV_IOC_CLONE(fd fd_fuse, cmd const[FUSE_DEV_IOC_CLONE], arg ptr[in, fd_fuse])
15+
ioctl$FUSE_DEV_IOC_BACKING_OPEN(fd fd_fuse, cmd const[FUSE_DEV_IOC_BACKING_OPEN], arg ptr[in, fuse_backing_map])
16+
ioctl$FUSE_DEV_IOC_BACKING_CLOSE(fd fd_fuse, cmd const[FUSE_DEV_IOC_BACKING_CLOSE], arg ptr[in, int32])
1517

1618
type read_buffer array[int8, FUSE_MIN_READ_BUFFER]
1719
read$FUSE(fd fd_fuse, buf ptr[out, fuse_in[read_buffer]], len bytesize[buf])
@@ -34,12 +36,14 @@ write$FUSE_ENTRY(fd fd_fuse, arg ptr[in, fuse_out[fuse_entry_out]], len bytesize
3436
write$FUSE_CREATE_OPEN(fd fd_fuse, arg ptr[in, fuse_out[fuse_create_open_out]], len bytesize[arg])
3537
write$FUSE_DIRENT(fd fd_fuse, arg ptr[in, fuse_out[array[fuse_dirent]]], len bytesize[arg])
3638
write$FUSE_DIRENTPLUS(fd fd_fuse, arg ptr[in, fuse_out[array[fuse_direntplus]]], len bytesize[arg])
39+
write$FUSE_STATX(fd fd_fuse, arg ptr[in, fuse_out[fuse_statx_out]], len bytesize[arg])
3740
write$FUSE_NOTIFY_POLL(fd fd_fuse, arg ptr[in, fuse_notify[FUSE_NOTIFY_POLL, fuse_notify_poll_wakeup_out]], len bytesize[arg])
3841
write$FUSE_NOTIFY_INVAL_INODE(fd fd_fuse, arg ptr[in, fuse_notify[FUSE_NOTIFY_INVAL_INODE, fuse_notify_inval_inode_out]], len bytesize[arg])
3942
write$FUSE_NOTIFY_INVAL_ENTRY(fd fd_fuse, arg ptr[in, fuse_notify[FUSE_NOTIFY_INVAL_ENTRY, fuse_notify_inval_entry_out]], len bytesize[arg])
4043
write$FUSE_NOTIFY_STORE(fd fd_fuse, arg ptr[in, fuse_notify[FUSE_NOTIFY_STORE, fuse_notify_store_out]], len bytesize[arg])
4144
write$FUSE_NOTIFY_RETRIEVE(fd fd_fuse, arg ptr[in, fuse_notify[FUSE_NOTIFY_RETRIEVE, fuse_notify_retrieve_out]], len bytesize[arg])
4245
write$FUSE_NOTIFY_DELETE(fd fd_fuse, arg ptr[in, fuse_notify[FUSE_NOTIFY_DELETE, fuse_notify_delete_out]], len bytesize[arg])
46+
write$FUSE_NOTIFY_RESEND(fd fd_fuse, arg ptr[in, fuse_notify[FUSE_NOTIFY_RESEND, const[0, int32]]], len bytesize[arg])
4347

4448
syz_mount_image$fuse(fs ptr[in, string["fuse"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fuse_options], chdir bool8, size const[0], img ptr[in, array[int8]]) fd_dir
4549
syz_fuse_handle_req(fd fd_fuse, buf ptr[in, read_buffer], len bytesize[buf], res ptr[in, syz_fuse_req_out])
@@ -93,10 +97,24 @@ fuse_init_out {
9397
time_gran int32
9498
max_pages const[0, int16]
9599
map_alignment const[0, int16]
96-
unused array[const[0, int32], 8]
100+
flags2 flags[fuse_init_flags2, int32]
101+
max_stack_depth int32
102+
unused array[const[0, int32], 6]
97103
}
98104

99-
fuse_init_flags = FUSE_ASYNC_READ, FUSE_POSIX_LOCKS, FUSE_FILE_OPS, FUSE_ATOMIC_O_TRUNC, FUSE_EXPORT_SUPPORT, FUSE_BIG_WRITES, FUSE_DONT_MASK, FUSE_SPLICE_WRITE, FUSE_SPLICE_MOVE, FUSE_SPLICE_READ, FUSE_FLOCK_LOCKS, FUSE_HAS_IOCTL_DIR, FUSE_AUTO_INVAL_DATA, FUSE_DO_READDIRPLUS, FUSE_READDIRPLUS_AUTO, FUSE_ASYNC_DIO, FUSE_WRITEBACK_CACHE, FUSE_NO_OPEN_SUPPORT, FUSE_PARALLEL_DIROPS, FUSE_HANDLE_KILLPRIV, FUSE_POSIX_ACL, FUSE_ABORT_ERROR, FUSE_MAX_PAGES, FUSE_CACHE_SYMLINKS, FUSE_NO_OPENDIR_SUPPORT, FUSE_EXPLICIT_INVAL_DATA
105+
fuse_init_flags = FUSE_ASYNC_READ, FUSE_POSIX_LOCKS, FUSE_FILE_OPS, FUSE_ATOMIC_O_TRUNC, FUSE_EXPORT_SUPPORT, FUSE_BIG_WRITES, FUSE_DONT_MASK, FUSE_SPLICE_WRITE, FUSE_SPLICE_MOVE, FUSE_SPLICE_READ, FUSE_FLOCK_LOCKS, FUSE_HAS_IOCTL_DIR, FUSE_AUTO_INVAL_DATA, FUSE_DO_READDIRPLUS, FUSE_READDIRPLUS_AUTO, FUSE_ASYNC_DIO, FUSE_WRITEBACK_CACHE, FUSE_NO_OPEN_SUPPORT, FUSE_PARALLEL_DIROPS, FUSE_HANDLE_KILLPRIV, FUSE_POSIX_ACL, FUSE_ABORT_ERROR, FUSE_MAX_PAGES, FUSE_CACHE_SYMLINKS, FUSE_NO_OPENDIR_SUPPORT, FUSE_EXPLICIT_INVAL_DATA, FUSE_MAP_ALIGNMENT, FUSE_SUBMOUNTS, FUSE_HANDLE_KILLPRIV_V2, FUSE_SETXATTR_EXT, FUSE_INIT_EXT, FUSE_INIT_RESERVED
106+
fuse_init_flags2 = FUSE_SECURITY_CTX_FLAG2, FUSE_HAS_INODE_DAX_FLAG2, FUSE_CREATE_SUPP_GROUP_FLAG2, FUSE_HAS_EXPIRE_ONLY_FLAG2, FUSE_DIRECT_IO_ALLOW_MMAP_FLAG2, FUSE_PASSTHROUGH_FLAG2, FUSE_NO_EXPORT_SUPPORT_FLAG2, FUSE_HAS_RESEND_FLAG2, FUSE_DIRECT_IO_RELAX_FLAG2, FUSE_ALLOW_IDMAP_FLAG2
107+
108+
define FUSE_SECURITY_CTX_FLAG2 FUSE_SECURITY_CTX >> 32
109+
define FUSE_HAS_INODE_DAX_FLAG2 FUSE_HAS_INODE_DAX >> 32
110+
define FUSE_CREATE_SUPP_GROUP_FLAG2 FUSE_CREATE_SUPP_GROUP >> 32
111+
define FUSE_HAS_EXPIRE_ONLY_FLAG2 FUSE_HAS_EXPIRE_ONLY >> 32
112+
define FUSE_DIRECT_IO_ALLOW_MMAP_FLAG2 FUSE_DIRECT_IO_ALLOW_MMAP >> 32
113+
define FUSE_PASSTHROUGH_FLAG2 FUSE_PASSTHROUGH >> 32
114+
define FUSE_NO_EXPORT_SUPPORT_FLAG2 FUSE_NO_EXPORT_SUPPORT >> 32
115+
define FUSE_HAS_RESEND_FLAG2 FUSE_HAS_RESEND >> 32
116+
define FUSE_DIRECT_IO_RELAX_FLAG2 FUSE_DIRECT_IO_RELAX >> 32
117+
define FUSE_ALLOW_IDMAP_FLAG2 FUSE_ALLOW_IDMAP >> 32
100118

101119
fuse_lseek_out {
102120
offset int64
@@ -269,6 +287,48 @@ fuse_notify_retrieve_out {
269287
padding const[0, int32]
270288
} [packed]
271289

290+
fuse_statx_out {
291+
attr_valid int64
292+
attr_valid_nsec int32
293+
flags const[0, int32]
294+
spare array[const[0, int64], 2]
295+
stat fuse_statx
296+
}
297+
298+
fuse_statx {
299+
mask flags[fuse_statx_masx, int32]
300+
blksize int32
301+
attributes int64
302+
nlink int32
303+
uid uid
304+
gid gid
305+
mode flags[fuse_valid_type, int16]
306+
__spare0 array[const[0, int16], 1]
307+
ino int64
308+
size int64
309+
blocks int64
310+
attributes_mask int64
311+
atime fuse_sx_time
312+
btime fuse_sx_time
313+
ctime fuse_sx_time
314+
mtime fuse_sx_time
315+
rdev_major int32
316+
rdev_minor int32
317+
dev_major int32
318+
dev_minor int32
319+
__spare2 array[const[0, int64], 14]
320+
}
321+
322+
fuse_statx_masx = STATX_TYPE, STATX_MODE, STATX_NLINK, STATX_UID, STATX_GID, STATX_ATIME, STATX_MTIME, STATX_CTIME, STATX_INO, STATX_SIZE, STATX_BLOCKS, STATX_BASIC_STATS, STATX_BTIME, STATX_MNT_ID, STATX_DIOALIGN, STATX_MNT_ID_UNIQUE, STATX_SUBVOL, STATX_WRITE_ATOMIC
323+
324+
fuse_valid_type = S_IFLNK, S_IFREG, S_IFDIR, S_IFCHR, S_IFBLK, S_IFIFO, S_IFSOCK
325+
326+
fuse_sx_time {
327+
tv_sec int64
328+
tv_nsec int32
329+
__reserved const[0, int32]
330+
}
331+
272332
# Mount options.
273333

274334
fuse_options {
@@ -311,4 +371,11 @@ syz_fuse_req_out {
311371
direntplus ptr[in, syz_fuse_out[array[fuse_direntplus]]]
312372
create_open ptr[in, syz_fuse_out[fuse_create_open_out]]
313373
ioctl ptr[in, syz_fuse_out[fuse_ioctl_out]]
374+
statx ptr[in, syz_fuse_out[fuse_statx_out]]
375+
}
376+
377+
fuse_backing_map {
378+
fd fd_fuse
379+
flags const[0, int32]
380+
padding const[0, int64]
314381
}

0 commit comments

Comments
 (0)