aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-04-21 08:01:30 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-04-21 14:05:20 +0200
commitad3ce6afab30fb68cfcda40a1910b87279795c5a (patch)
tree6a6febdaae83e071a85576bb6fa1fd5b8abb2936
parent7ffd6ad61b0d0c6290f73b3652f79c63b305351e (diff)
pkg/compiler: optimize array[const] representation
Represent array[const[X, int8], N] as string["XX...X"]. This replaces potentially huge number of: NONFAILING(*(uint8_t*)0x2000126c = 0); NONFAILING(*(uint8_t*)0x2000126d = 0); NONFAILING(*(uint8_t*)0x2000126e = 0); with a single memcpy. In one reproducer we had 3991 such lines. Also replace memcpy's with memset's when possible. Update #1070
-rw-r--r--pkg/compiler/types.go24
-rw-r--r--pkg/csource/csource.go9
-rw-r--r--pkg/csource/csource_test.go30
-rw-r--r--prog/encoding_test.go5
-rw-r--r--prog/types.go15
-rw-r--r--sys/linux/netfilter_arp.txt2
-rw-r--r--sys/linux/netfilter_bridge.txt8
-rw-r--r--sys/linux/netfilter_ipv4.txt2
-rw-r--r--sys/linux/test/bpf_cgroup2
-rw-r--r--sys/linux/test/btf_id4
-rw-r--r--sys/linux/test/file_immutable4
-rw-r--r--sys/linux/test/fscrypt_ext44
-rw-r--r--sys/linux/test/fscrypt_f2fs4
-rw-r--r--sys/linux/test/fuse_deadlock2
-rw-r--r--sys/linux/test/fuse_getdents642
-rw-r--r--sys/linux/test/io_uring4
-rw-r--r--sys/linux/test/syz_fuse_handle_req2
-rw-r--r--sys/linux/test/syz_mount_image_fuse2
-rw-r--r--sys/test/csource.txt5
-rw-r--r--tools/syz-trace2syz/proggen/proggen_test.go8
20 files changed, 79 insertions, 59 deletions
diff --git a/pkg/compiler/types.go b/pkg/compiler/types.go
index b2c8c3204..038a05f24 100644
--- a/pkg/compiler/types.go
+++ b/pkg/compiler/types.go
@@ -4,6 +4,8 @@
package compiler
import (
+ "bytes"
+ "encoding/binary"
"fmt"
"sort"
"strconv"
@@ -249,6 +251,28 @@ var typeArray = &typeDesc{
RangeEnd: end,
}
}
+ if ct, ok := elemType.(*prog.ConstType); ok &&
+ (ct.ArgFormat == prog.FormatNative || ct.ArgFormat == prog.FormatBigEndian) &&
+ kind == prog.ArrayRangeLen && begin == end {
+ // Special case: const string takes less space in C programs.
+ base.TypeSize = begin * ct.Size()
+ base.TypeAlign = ct.TypeAlign
+ val := make([]byte, 8)
+ if ct.ArgFormat == prog.FormatBigEndian {
+ binary.BigEndian.PutUint64(val, ct.Val)
+ val = val[8-ct.Size():]
+ } else {
+ binary.LittleEndian.PutUint64(val, ct.Val)
+ val = val[:ct.Size()]
+ }
+ val = bytes.Repeat(val, int(begin))
+ return &prog.BufferType{
+ TypeCommon: base.TypeCommon,
+ Kind: prog.BufferString,
+ Values: []string{string(val)},
+ NoZ: true,
+ }
+ }
// TypeSize is assigned later in layoutArray.
base.TypeAlign = elemType.Alignment()
return &prog.ArrayType{
diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go
index 24717a31a..c30db6b9d 100644
--- a/pkg/csource/csource.go
+++ b/pkg/csource/csource.go
@@ -366,8 +366,13 @@ func (ctx *context) copyin(w *bytes.Buffer, csumSeq *int, copyin prog.ExecCopyin
case prog.ExecArgResult:
ctx.copyinVal(w, copyin.Addr, arg.Size, ctx.resultArgToStr(arg), arg.Format)
case prog.ExecArgData:
- fmt.Fprintf(w, "\tNONFAILING(memcpy((void*)0x%x, \"%s\", %v));\n",
- copyin.Addr, toCString(arg.Data, arg.Readable), len(arg.Data))
+ if bytes.Equal(arg.Data, bytes.Repeat(arg.Data[:1], len(arg.Data))) {
+ fmt.Fprintf(w, "\tNONFAILING(memset((void*)0x%x, %v, %v));\n",
+ copyin.Addr, arg.Data[0], len(arg.Data))
+ } else {
+ fmt.Fprintf(w, "\tNONFAILING(memcpy((void*)0x%x, \"%s\", %v));\n",
+ copyin.Addr, toCString(arg.Data, arg.Readable), len(arg.Data))
+ }
case prog.ExecArgCsum:
switch arg.Kind {
case prog.ExecArgCsumInet:
diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go
index 752ff919b..e2035b286 100644
--- a/pkg/csource/csource_test.go
+++ b/pkg/csource/csource_test.go
@@ -160,37 +160,19 @@ csource2(&AUTO="12345678")
csource3(&AUTO)
csource4(&AUTO)
csource5(&AUTO)
+csource6(&AUTO)
`,
output: `
NONFAILING(memcpy((void*)0x20000040, "\x12\x34\x56\x78", 4));
syscall(SYS_csource2, 0x20000040ul);
-NONFAILING(*(uint8*)0x20000080 = 0);
-NONFAILING(*(uint8*)0x20000081 = 0);
-NONFAILING(*(uint8*)0x20000082 = 0);
-NONFAILING(*(uint8*)0x20000083 = 0);
-NONFAILING(*(uint8*)0x20000084 = 0);
-NONFAILING(*(uint8*)0x20000085 = 0);
-NONFAILING(*(uint8*)0x20000086 = 0);
-NONFAILING(*(uint8*)0x20000087 = 0);
-NONFAILING(*(uint8*)0x20000088 = 0);
-NONFAILING(*(uint8*)0x20000089 = 0);
+NONFAILING(memset((void*)0x20000080, 0, 10));
syscall(SYS_csource3, 0x20000080ul);
-NONFAILING(*(uint8*)0x200000c0 = 0xab);
-NONFAILING(*(uint8*)0x200000c1 = 0xab);
-NONFAILING(*(uint8*)0x200000c2 = 0xab);
-NONFAILING(*(uint8*)0x200000c3 = 0xab);
-NONFAILING(*(uint8*)0x200000c4 = 0xab);
-NONFAILING(*(uint8*)0x200000c5 = 0xab);
-NONFAILING(*(uint8*)0x200000c6 = 0xab);
-NONFAILING(*(uint8*)0x200000c7 = 0xab);
-NONFAILING(*(uint8*)0x200000c8 = 0xab);
-NONFAILING(*(uint8*)0x200000c9 = 0xab);
+NONFAILING(memset((void*)0x200000c0, 48, 10));
syscall(SYS_csource4, 0x200000c0ul);
-NONFAILING(*(uint32*)0x20000100 = 0x12345678);
-NONFAILING(*(uint32*)0x20000104 = 0x12345678);
-NONFAILING(*(uint32*)0x20000108 = 0x12345678);
-NONFAILING(*(uint32*)0x2000010c = 0x12345678);
+NONFAILING(memcpy((void*)0x20000100, "0101010101", 10));
syscall(SYS_csource5, 0x20000100ul);
+NONFAILING(memcpy((void*)0x20000140, "101010101010", 12));
+syscall(SYS_csource6, 0x20000140ul);
`,
},
}
diff --git a/prog/encoding_test.go b/prog/encoding_test.go
index a38e9deab..4ba9edd50 100644
--- a/prog/encoding_test.go
+++ b/prog/encoding_test.go
@@ -278,11 +278,12 @@ func TestDeserialize(t *testing.T) {
StrictErr: `out arg const[1, const] has non-default value: 2`,
},
{
- In: `test$str1(&(0x7f0000000000)='foo\x00')`,
+ In: `test$str1(&(0x7f0000000000)='foo\x00')`,
+ Out: `test$str1(&(0x7f0000000000))`,
},
{
In: `test$str1(&(0x7f0000000000)='bar\x00')`,
- Out: `test$str1(&(0x7f0000000000)='foo\x00')`,
+ Out: `test$str1(&(0x7f0000000000))`,
StrictErr: `bad string value "bar\x00", expect ["foo\x00"]`,
},
{
diff --git a/prog/types.go b/prog/types.go
index 482b20e2d..fb680f0a1 100644
--- a/prog/types.go
+++ b/prog/types.go
@@ -518,8 +518,11 @@ func (t *BufferType) DefaultArg(dir Dir) Arg {
}
return MakeOutDataArg(t, dir, sz)
}
+
var data []byte
- if !t.Varlen() {
+ if len(t.Values) == 1 {
+ data = []byte(t.Values[0])
+ } else if !t.Varlen() {
data = make([]byte, t.Size())
}
return MakeDataArg(t, dir, data)
@@ -527,15 +530,19 @@ func (t *BufferType) DefaultArg(dir Dir) Arg {
func (t *BufferType) isDefaultArg(arg Arg) bool {
a := arg.(*DataArg)
- if a.Size() == 0 {
- return true
+ sz := uint64(0)
+ if !t.Varlen() {
+ sz = t.Size()
}
- if a.Type().Varlen() {
+ if a.Size() != sz {
return false
}
if a.Dir() == DirOut {
return true
}
+ if len(t.Values) == 1 {
+ return string(a.Data()) == t.Values[0]
+ }
for _, v := range a.Data() {
if v != 0 {
return false
diff --git a/sys/linux/netfilter_arp.txt b/sys/linux/netfilter_arp.txt
index c2495aee9..0f897802d 100644
--- a/sys/linux/netfilter_arp.txt
+++ b/sys/linux/netfilter_arp.txt
@@ -134,7 +134,7 @@ arpt_counters_info {
arpt_getinfo {
name string["filter", XT_TABLE_MAXNAMELEN]
valid_hooks const[0, int32]
- hook_entry array[const[0, int32], NF_ARP_NUMHOOKS]
+ hook_entry array[int32, NF_ARP_NUMHOOKS]
underflow array[const[0, int32], NF_ARP_NUMHOOKS]
num_entries const[0, int32]
size const[0, int32]
diff --git a/sys/linux/netfilter_bridge.txt b/sys/linux/netfilter_bridge.txt
index d4c7f9f36..f6481fc18 100644
--- a/sys/linux/netfilter_bridge.txt
+++ b/sys/linux/netfilter_bridge.txt
@@ -51,7 +51,7 @@ type ebt_replace_t[NAME, HOOKS, TARGETS] {
valid_hooks const[HOOKS, int32]
nentries const[0, int32]
entries_size bytesize[entries, int32]
- hook_entry array[const[0, intptr], NF_BR_NUMHOOKS]
+ hook_entry array[intptr, NF_BR_NUMHOOKS]
num_counters const[0, int32]
counters ptr[out, array[xt_counters, 1]]
entries ptr[in, array[ebt_entries[TARGETS], 3:4]]
@@ -104,7 +104,7 @@ ebt_counters_info {
valid_hooks const[0, int32]
nentries const[0, int32]
entries_size const[0, int32]
- hook_entry array[const[0, intptr], NF_BR_NUMHOOKS]
+ hook_entry array[intptr, NF_BR_NUMHOOKS]
num_counters len[counters1, int32]
counters ptr[out, array[xt_counters]]
entries const[0, intptr]
@@ -116,7 +116,7 @@ ebt_getinfo {
valid_hooks const[0, int32]
nentries const[0, int32]
entries_size const[0, int32]
- hook_entry array[const[0, intptr], NF_BR_NUMHOOKS]
+ hook_entry array[intptr, NF_BR_NUMHOOKS]
num_counters const[0, int32]
counters const[0, intptr]
entries const[0, intptr]
@@ -127,7 +127,7 @@ ebt_get_entries {
valid_hooks const[0, int32]
nentries int32[3:4]
entries_size bytesize[entries, int32]
- hook_entry array[const[0, intptr], NF_BR_NUMHOOKS]
+ hook_entry array[intptr, NF_BR_NUMHOOKS]
num_counters len[counters, int32]
counters ptr[out, array[xt_counters]]
entries ptr[out, array[int8]]
diff --git a/sys/linux/netfilter_ipv4.txt b/sys/linux/netfilter_ipv4.txt
index bbf5c9621..1ecd8896f 100644
--- a/sys/linux/netfilter_ipv4.txt
+++ b/sys/linux/netfilter_ipv4.txt
@@ -120,7 +120,7 @@ ipt_getinfo {
name string[ipt_tables, XT_TABLE_MAXNAMELEN]
# The rest are output arguments.
valid_hooks const[0, int32]
- hook_entry array[const[0, int32], NF_INET_NUMHOOKS]
+ hook_entry array[int32, NF_INET_NUMHOOKS]
underflow array[const[0, int32], NF_INET_NUMHOOKS]
num_entries const[0, int32]
size const[0, int32]
diff --git a/sys/linux/test/bpf_cgroup b/sys/linux/test/bpf_cgroup
index 026470f3d..e28034c83 100644
--- a/sys/linux/test/bpf_cgroup
+++ b/sys/linux/test/bpf_cgroup
@@ -6,7 +6,7 @@ r1 = write$tcp_congestion(r0, &AUTO='reno\x00', AUTO)
# Now, load a BPF_PROG_TYPE_CGROUP_SYSCTL that simply returns 0, which will block all writes to /proc/sys
-r2 = bpf$PROG_LOAD(AUTO, &AUTO={0x17, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0x78)
+r2 = bpf$PROG_LOAD(AUTO, &AUTO={0x17, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0x78)
r3 = openat(0xffffffffffffff9c, &AUTO='./cgroup\x00', 0x0, 0x0)
diff --git a/sys/linux/test/btf_id b/sys/linux/test/btf_id
index ca13e1daa..0e004659e 100644
--- a/sys/linux/test/btf_id
+++ b/sys/linux/test/btf_id
@@ -4,7 +4,7 @@ r0 = syz_btf_id_by_name$bpf_lsm(&AUTO='bpf_lsm_path_mkdir\x00')
# Load the bpf program.
-r1 = bpf$BPF_PROG_WITH_BTFID_LOAD(0x5, &AUTO=@bpf_lsm={0x1d, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], 0x0, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, r0, 0x0}, 0x78)
+r1 = bpf$BPF_PROG_WITH_BTFID_LOAD(0x5, &AUTO=@bpf_lsm={0x1d, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, r0, 0x0}, 0x78)
# Attach the bpf program to the lsm hook.
@@ -14,6 +14,6 @@ r2 = bpf$BPF_RAW_TRACEPOINT_OPEN_UNNAMED(0x11, &AUTO={AUTO, r1}, 0x10)
r3 = syz_btf_id_by_name$bpf_lsm(&AUTO='bpf_lsm_path_mkdir\x00')
-r4 = bpf$BPF_PROG_WITH_BTFID_LOAD(0x5, &AUTO=@bpf_lsm={0x1d, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], 0x0, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, r3, 0x0}, 0x78)
+r4 = bpf$BPF_PROG_WITH_BTFID_LOAD(0x5, &AUTO=@bpf_lsm={0x1d, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, r3, 0x0}, 0x78)
r5 = bpf$BPF_RAW_TRACEPOINT_OPEN_UNNAMED(0x11, &AUTO={AUTO, r4}, 0x10)
diff --git a/sys/linux/test/file_immutable b/sys/linux/test/file_immutable
index f9df5ddc9..46c81692e 100644
--- a/sys/linux/test/file_immutable
+++ b/sys/linux/test/file_immutable
@@ -4,7 +4,7 @@
# requires: -sandbox=namespace -sandbox=setuid
r0 = openat(0xffffffffffffff9c, &AUTO='./file0\x00', 0x26e1, 0x0)
-ioctl$FS_IOC_FSSETXATTR(r0, 0x40086602, &AUTO={0x17e, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]})
+ioctl$FS_IOC_FSSETXATTR(r0, 0x40086602, &AUTO={0x17e, 0x0, 0x0, 0x0, 0x0, "0000000000000000"})
mkdirat(0xffffffffffffff9c, &AUTO='./file1\x00', 0x1ff)
r1 = openat(0xffffffffffffff9c, &AUTO='./file1\x00', 0x0, 0x0)
-ioctl$FS_IOC_FSSETXATTR(r1, 0x40086602, &AUTO={0x17e, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]})
+ioctl$FS_IOC_FSSETXATTR(r1, 0x40086602, &AUTO={0x17e, 0x0, 0x0, 0x0, 0x0, "0000000000000000"})
diff --git a/sys/linux/test/fscrypt_ext4 b/sys/linux/test/fscrypt_ext4
index 0ba0c0f20..b45395ecc 100644
--- a/sys/linux/test/fscrypt_ext4
+++ b/sys/linux/test/fscrypt_ext4
@@ -4,9 +4,9 @@
syz_mount_image$ext4(&(0x7f0000000000)='ext4\x00', &(0x7f0000000100)='./mnt\x00', 0x10000, 0x1d, &(0x7f0000000200)=[{&(0x7f0000010000)="1000000040000000030000002b00000005000000010000000000000000000000002000000020000010000000000000009f09c75f0000ffff53ef0100010000009f09c75f000000000000000001000000000000000b0000008000000038000000c20201006b04000076b65be2f6da47278c750525a5b65a090000000000000000", 0x80, 0x400}, {&(0x7f0000010080)="000000000000000000000000ede2de4df49d4f87b54a3176cfd4eb4f010040000c000000000000009f09c75f0000000000000000000000000000000000000000", 0x40, 0x4e0}, {&(0x7f00000100c0)="0100000000000000000000000000000000000000040100001200000000000000", 0x20, 0x560}, {&(0x7f00000100e0)="0000000000000000000000000000000000000000010400000000000000000000", 0x20, 0x640}, {&(0x7f0000010100)="000000000000000000000000000000000000000000000000000000005178aedb0300000013000000230000002b0005000200040000000000907306c205002a9c00000000000000000000000000000000000000000000000091ecd11b00000000", 0x60, 0x7e0}, {&(0x7f0000010160)="ffff05000c000080ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff020000000c0001022e000000020000000c0002022e2e00000b000000dc030a026c6f73742b666f756e6400000000000000000000000000000000000000000000", 0x440, 0xc00}, {&(0x7f00000105a0)="0000000000000000000000000000000000000000000000000c0000de46b807b70b0000000c0001022e00000002000000e80302022e2e00000000000000000000", 0x40, 0x13e0}, {&(0x7f00000105e0)="0000000000000000000000000000000000000000000000000c0000de5551aadd00000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x17e0}, {&(0x7f0000010620)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x1be0}, {&(0x7f0000010660)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x1fe0}, {&(0x7f00000106a0)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x23e0}, {&(0x7f00000106e0)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x27e0}, {&(0x7f0000010720)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x2be0}, {&(0x7f0000010760)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x2fe0}, {&(0x7f00000107a0)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x33e0}, {&(0x7f00000107e0)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x37e0}, {&(0x7f0000010820)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x3be0}, {&(0x7f0000010860)="0000000000000000000000000000000000000000000000000c0000de2b607f2900000000f4030000000000000000000000000000000000000000000000000000", 0x40, 0x3fe0}, {&(0x7f00000108a0)="0000000000000000000000000000000000000000000000000c0000de2b607f29", 0x20, 0x43e0}, {&(0x7f00000108c0)="ff07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 0x400, 0x4c00}, {&(0x7f0000010cc0)="00000000000000009f09c75f9f09c75f9f09c75f000000000000000000000000", 0x20, 0x8c00}, {&(0x7f0000010ce0)="00000000000000000000000000000000000000000000000000000000c99b0000ed410000000400009f09c75f9f09c75f9f09c75f00000000000003000200000000000800000000000af3010004000000000000000000000001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c1f0000", 0xa0, 0x8c60}, {&(0x7f0000010d80)="00000000000000000000000000000000000000000000000000000000acff0000", 0x20, 0x8d60}, {&(0x7f0000010da0)="000000000000000000000000000000000000000000000000000000000ee30000", 0x20, 0x8de0}, {&(0x7f0000010dc0)="00000000000000000000000000000000000000000000000000000000ce1e0000", 0x20, 0x8e60}, {&(0x7f0000010de0)="000000000000000000000000000000000000000000000000000000007f6e000080810000003004049f09c75f9f09c75f9f09c75f000000000000010002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000000000000000000000000000000000000005620000", 0xa0, 0x8ee0}, {&(0x7f0000010e80)="000000000000000000000000000000000000000000000000000000003b570000", 0x20, 0x8fe0}, {&(0x7f0000010ea0)="00000000000000000000000000000000000000000000000000000000fbaa0000", 0x20, 0x9060}, {&(0x7f0000010ec0)="000000000000000000000000000000000000000000000000000000004ada0000c0410000003000009f09c75f9f09c75f9f09c75f00000000000002001800000000000800000000000af301000400000000000000000000000c0000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070fa0000", 0xa0, 0x90e0}], 0x0, &(0x7f0000010f60))
r0 = openat(0xffffffffffffff9c, &AUTO='mnt', 0x0, 0x0)
-ioctl$FS_IOC_ADD_ENCRYPTION_KEY(r0, 0xc0506617, &AUTO={@id={0x2, 0x0, @a='\x69\xb2\xf6\xed\xee\xe7\x20\xcc\xe0\x57\x79\x37\xeb\x8a\x67\x51', [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}, 0x40, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], @a='\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40'})
+ioctl$FS_IOC_ADD_ENCRYPTION_KEY(r0, 0xc0506617, &AUTO={@id={0x2, 0x0, @a='\x69\xb2\xf6\xed\xee\xe7\x20\xcc\xe0\x57\x79\x37\xeb\x8a\x67\x51', "00000000000000000000000000000000"}, 0x40, 0x0, "00000000000000000000000000000000", @a='\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40'})
mkdirat(0xffffffffffffff9c, &AUTO='mnt/encrypted_dir\x00', 0x1c0)
r1 = openat(0xffffffffffffff9c, &AUTO='mnt/encrypted_dir\x00', 0x0, 0x0)
-ioctl$FS_IOC_SET_ENCRYPTION_POLICY(r1, 0x800c6613, &AUTO=@v2={0x2, @aes256, 0x0, [0x0, 0x0, 0x0, 0x0], @a='\x69\xb2\xf6\xed\xee\xe7\x20\xcc\xe0\x57\x79\x37\xeb\x8a\x67\x51'})
+ioctl$FS_IOC_SET_ENCRYPTION_POLICY(r1, 0x800c6613, &AUTO=@v2={0x2, @aes256, 0x0, "00000000", @a='\x69\xb2\xf6\xed\xee\xe7\x20\xcc\xe0\x57\x79\x37\xeb\x8a\x67\x51'})
r2 = openat(0xffffffffffffff9c, &AUTO='mnt/encrypted_dir/file\x00', 0x42, 0x180)
write(r2, &AUTO='foo', 0x3)
diff --git a/sys/linux/test/fscrypt_f2fs b/sys/linux/test/fscrypt_f2fs
index 4f37caaec..e17607532 100644
--- a/sys/linux/test/fscrypt_f2fs
+++ b/sys/linux/test/fscrypt_f2fs
@@ -4,9 +4,9 @@
syz_mount_image$f2fs(&(0x7f0000000000)='f2fs\x00', &(0x7f0000000100)='./mnt\x00', 0x4000000, 0x26, &(0x7f0000000200)=[{&(0x7f0000010000)="1020f5f201000e0009000000030000000c000000090000000100000001000000000000000040000000000000180000001f0000000200000002000000020000000100000018000000000200000002000000060000000a0000000e000000100000030000000100000002000000a3bd865da4e84b259caac903308887eb00000000", 0x80, 0x400}, {&(0x7f0000010080)="00000000000000000000000000000000000000000000000000000000240000006d70000000000000776d0000000000006f670000000000006a7000000000000061766900000000006d347600000000006d347000000000006d6b7600000000006d6f7600000000007765626d0000000077617600000000006d3461000000000033677000000000006f70757300000000666c6163000000006769660000000000706e670000000000737667000000000077656270000000006a61720000000000646562000000000069736f0000000000677a000000000000787a0000000000007a737400000000007064660000000000707963000000000074746300000000007474660000000000657865000000000061706b0000000000636e74000000000065786f00000000006f646578000000007664657800000000736f0000000000006462000000000000000000000000000000000000000000000000000000000000", 0x160, 0x860}, {&(0x7f00000101e0)="000000004c696e75782076657273696f6e20352e31302e302d7263362d30303139332d6764616663366532346461663420286540736f6c2920286763632028474343292031302e322e302c20474e55206c642028474e552042696e7574696c732920322e33352e312920233120534d5020505245454d5054204d6f6e204e6f762033302031333a35323a33382050535420323032300000000000000000000000", 0xa0, 0xa80}, {&(0x7f0000010280)="000000004c696e75782076657273696f6e20352e31302e302d7263362d30303139332d6764616663366532346461663420286540736f6c2920286763632028474343292031302e322e302c20474e55206c642028474e552042696e7574696c732920322e33352e312920233120534d5020505245454d5054204d6f6e204e6f762033302031333a35323a33382050535420323032300000000000000000000000", 0xa0, 0xb80}, {&(0x7f0000010320)="0000000001000000000000000000000000000000000000000000000000000000", 0x20, 0xc80}, {&(0x7f0000010340)="0000000000010000000000000000000000000000000000000000000000000000", 0x20, 0xec0}, {&(0x7f0000010360)="1020f5f201000e0009000000030000000c000000090000000100000001000000000000000040000000000000180000001f0000000200000002000000020000000100000018000000000200000002000000060000000a0000000e000000100000030000000100000002000000a3bd865da4e84b259caac903308887eb00000000", 0x80, 0x1400}, {&(0x7f00000103e0)="00000000000000000000000000000000000000000000000000000000240000006d70000000000000776d0000000000006f670000000000006a7000000000000061766900000000006d347600000000006d347000000000006d6b7600000000006d6f7600000000007765626d0000000077617600000000006d3461000000000033677000000000006f70757300000000666c6163000000006769660000000000706e670000000000737667000000000077656270000000006a61720000000000646562000000000069736f0000000000677a000000000000787a0000000000007a737400000000007064660000000000707963000000000074746300000000007474660000000000657865000000000061706b0000000000636e74000000000065786f00000000006f646578000000007664657800000000736f0000000000006462000000000000000000000000000000000000000000000000000000000000", 0x160, 0x1860}, {&(0x7f0000010540)="000000004c696e75782076657273696f6e20352e31302e302d7263362d30303139332d6764616663366532346461663420286540736f6c2920286763632028474343292031302e322e302c20474e55206c642028474e552042696e7574696c732920322e33352e312920233120534d5020505245454d5054204d6f6e204e6f762033302031333a35323a33382050535420323032300000000000000000000000", 0xa0, 0x1a80}, {&(0x7f00000105e0)="000000004c696e75782076657273696f6e20352e31302e302d7263362d30303139332d6764616663366532346461663420286540736f6c2920286763632028474343292031302e322e302c20474e55206c642028474e552042696e7574696c732920322e33352e312920233120534d5020505245454d5054204d6f6e204e6f762033302031333a35323a33382050535420323032300000000000000000000000", 0xa0, 0x1b80}, {&(0x7f0000010680)="0000000001000000000000000000000000000000000000000000000000000000", 0x20, 0x1c80}, {&(0x7f00000106a0)="0000000000010000000000000000000000000000000000000000000000000000", 0x20, 0x1ec0}, {&(0x7f00000106c0)="0bd03b7500000000001000000000000002000000000000000d0000001000000012000000000000000100000002000000ffffffffffffffffffffffffffffffffffffffff01000000000000000000000000000000030000000b00000005000000ffffffffffffffffffffffffffffffffffffffff010000000000000000000000000000008501000006000000010000000100000001000000040000004000000040000000fc0f0000000000000000000000000000000000000000000000000000", 0xc0, 0x200000}, {&(0x7f0000010780)="00000000000000000000000000000000000000000000000000000000d9fa28d50100030000000003000000001000000000000000000000000000000000000000", 0x40, 0x200fe0}, {&(0x7f00000107c0)="000000000000000000000000000000000000000000000000000000060000000000010c8000000000000000000000000000000000000000000000000000000000", 0x40, 0x2011e0}, {&(0x7f0000010800)="0000000000000000000000010000000010000000000000000000000000000000", 0x20, 0x201240}, {&(0x7f0000010820)="0000000000000000000000000000000000000000000000000002000000001400", 0x20, 0x201280}, {&(0x7f0000010840)="0000000000000003000000010080000000000000000000000000000000000000", 0x20, 0x2012e0}, {&(0x7f0000010860)="0000000000000000000000000000000000000000000b00000000040000000000", 0x20, 0x201320}, {&(0x7f0000010880)="0000000500000000080000000000000000000000000000000000000000000000", 0x20, 0x201380}, {&(0x7f00000108a0)="0000000000000000000000000000000000000000000003000000000000000000", 0x20, 0x2013e0}, {&(0x7f00000108c0)="0300000000000000000000000000000000000000000000000000000000000000", 0x20, 0x202000}, {&(0x7f00000108e0)="0000000000000000000000000000000000000000000000000000000100000000", 0x20, 0x202fe0}, {&(0x7f0000010900)="0000000000000000000000000000000000000000000000000000000100000000", 0x20, 0x203fe0}, {&(0x7f0000010920)="00000000000000000000000000000000000000000000000000000001000000000bd03b7500000000001000000000000002000000000000000d0000001000000012000000000000000100000002000000ffffffffffffffffffffffffffffffffffffffff01000000000000000000000000000000030000000b00000005000000ffffffffffffffffffffffffffffffffffffffff010000000000000000000000000000008501000006000000010000000100000001000000040000004000000040000000fc0f0000000000000000000000000000000000000000000000000000", 0xe0, 0x204fe0}, {&(0x7f0000010a00)="00000000000000000000000000000000000000000000000000000000d9fa28d5", 0x20, 0x205fe0}, {&(0x7f0000010a20)="0bd03b75d9fa28d5000000000000000000000000000000000000000000000000", 0x20, 0x3ff000}, {&(0x7f0000010a40)="0000000000000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000", 0x60, 0x3ff040}, {&(0x7f0000010aa0)="0000000000000000001000000000000002000000000000000d0000001000000012000000000000000100000002000000ffffffffffffffffffffffffffffffffffffffff01000000000000000000000000000000030000000b00000005000000ffffffffffffffffffffffffffffffffffffffff010000000000000000000000000000008501000006000000010000000100000001000000040000004000000040000000fc0f0000000000000000000000000000000000000000000000000000", 0xc0, 0x400000}, {&(0x7f0000010b60)="00000000000000000000000000000000000000000000000000000000d9a1f350", 0x20, 0x400fe0}, {&(0x7f0000010b80)="0000000000000000001000000000000002000000000000000d0000001000000012000000000000000100000002000000ffffffffffffffffffffffffffffffffffffffff01000000000000000000000000000000030000000b00000005000000ffffffffffffffffffffffffffffffffffffffff010000000000000000000000000000008501000006000000010000000100000001000000040000004000000040000000fc0f0000000000000000000000000000000000000000000000000000", 0xc0, 0x405000}, {&(0x7f0000010c40)="00000000000000000000000000000000000000000000000000000000d9a1f350", 0x20, 0x405fe0}, {&(0x7f0000010c60)="00000000000000000000010000000100000000020000000100000000030000000010000000000000000000000000000000000000000000000000000000000000", 0x40, 0xa00000}, {&(0x7f0000010ca0)="ed410000e8030000e8030000020000000010000000000000020000000000000055ffc65f0000000055ffc65f0000000055ffc65f0000000000000000000000000000000000000000010000000000000000000000000000000000000000000000", 0x60, 0x1000000}, {&(0x7f0000010d00)="0000000000000000001600000000000000000000000000000000000000000000", 0x20, 0x1000160}, {&(0x7f0000010d20)="0000000000000000030000000300000000000000010000000000000001100000", 0x20, 0x1000fe0}, {&(0x7f0000010d40)="03000000000000000000000000000000000000000000000000000000000000000000030000000100020000000003000000020002000000000000000000000000", 0x40, 0x1600000}, {&(0x7f0000010d80)="000000000000000000000000000000002e000000000000002e2e000000000000", 0x20, 0x1600940}], 0x0, &(0x7f0000010da0))
r0 = openat(0xffffffffffffff9c, &AUTO='mnt', 0x0, 0x0)
-ioctl$FS_IOC_ADD_ENCRYPTION_KEY(r0, 0xc0506617, &AUTO={@id={0x2, 0x0, @a='\x69\xb2\xf6\xed\xee\xe7\x20\xcc\xe0\x57\x79\x37\xeb\x8a\x67\x51', [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}, 0x40, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], @a='\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40'})
+ioctl$FS_IOC_ADD_ENCRYPTION_KEY(r0, 0xc0506617, &AUTO={@id={0x2, 0x0, @a='\x69\xb2\xf6\xed\xee\xe7\x20\xcc\xe0\x57\x79\x37\xeb\x8a\x67\x51', "00000000000000000000000000000000"}, 0x40, 0x0, "0000000000000000000000000000000000000000000000000000000000000000", @a='\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40'})
mkdirat(0xffffffffffffff9c, &AUTO='mnt/encrypted_dir\x00', 0x1c0)
r1 = openat(0xffffffffffffff9c, &AUTO='mnt/encrypted_dir\x00', 0x0, 0x0)
-ioctl$FS_IOC_SET_ENCRYPTION_POLICY(r1, 0x800c6613, &AUTO=@v2={0x2, @aes256, 0x0, [0x0, 0x0, 0x0, 0x0], @a='\x69\xb2\xf6\xed\xee\xe7\x20\xcc\xe0\x57\x79\x37\xeb\x8a\x67\x51'})
+ioctl$FS_IOC_SET_ENCRYPTION_POLICY(r1, 0x800c6613, &AUTO=@v2={0x2, @aes256, 0x0, "00000000", @a='\x69\xb2\xf6\xed\xee\xe7\x20\xcc\xe0\x57\x79\x37\xeb\x8a\x67\x51'})
r2 = openat(0xffffffffffffff9c, &AUTO='mnt/encrypted_dir/file\x00', 0x42, 0x180)
write(r2, &AUTO='foo', 0x3)
diff --git a/sys/linux/test/fuse_deadlock b/sys/linux/test/fuse_deadlock
index 2b41b1e15..cb8e7bbe6 100644
--- a/sys/linux/test/fuse_deadlock
+++ b/sys/linux/test/fuse_deadlock
@@ -6,6 +6,6 @@ r0 = openat$fuse(0xffffffffffffff9c, &AUTO='/dev/fuse\x00', 0x2, 0x0)
mount$fuse(0x0, &AUTO='./file0\x00', &AUTO='fuse\x00', 0x0, &AUTO={{'fd', 0x3d, r0}, 0x2c, {'rootmode', 0x3d, 0x4000}, 0x2c, {'user_id', 0x3d, 0x0}, 0x2c, {'group_id', 0x3d, 0x0}, 0x2c, {[], [], 0x0}})
read$FUSE(r0, &AUTO={AUTO, 0x0, <r1=>0x0, 0x0, 0x0, 0x0, 0x0, ""/8192}, AUTO)
pread64(r0, &AUTO=""/236, AUTO, 0x0) # blocked
-write$FUSE_INIT(r0, &AUTO={AUTO, 0x0, r1, {AUTO, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}}, AUTO)
+write$FUSE_INIT(r0, &AUTO={AUTO, 0x0, r1, {AUTO, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, "0000000000000000"}}, AUTO)
mkdirat(0xffffffffffffff9c, &AUTO='./file0/file0\x00', 0x0) # unfinished
write$FUSE_NOTIFY_INVAL_ENTRY(r0, &AUTO={AUTO, 0x3, 0x0, {0x1, AUTO, 0x0, 'group_id', 0x0}}, AUTO) # unfinished
diff --git a/sys/linux/test/fuse_getdents64 b/sys/linux/test/fuse_getdents64
index 3ec2ee164..2901e9828 100644
--- a/sys/linux/test/fuse_getdents64
+++ b/sys/linux/test/fuse_getdents64
@@ -2,7 +2,7 @@ mkdirat(0xffffffffffffff9c, &AUTO='./file0\x00', 0x0)
r0 = openat$fuse(0xffffffffffffff9c, &AUTO='/dev/fuse\x00', 0x2, 0x0)
mount$fuse(0x0, &AUTO='./file0\x00', &AUTO='fuse\x00', 0x0, &AUTO={{'fd', 0x3d, r0}, 0x2c, {'rootmode', 0x3d, 0x4000}, 0x2c, {'user_id', 0x3d, 0x0}, 0x2c, {'group_id', 0x3d, 0x0}, 0x2c, {[], [], 0x0}})
read$FUSE(r0, &AUTO={AUTO, 0x0, <r1=>0x0, 0x0, 0x0, 0x0, 0x0, ""/8192}, AUTO)
-write$FUSE_INIT(r0, &AUTO={AUTO, 0x0, r1, {AUTO, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}}, AUTO)
+write$FUSE_INIT(r0, &AUTO={AUTO, 0x0, r1, {AUTO, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, "0000000000000000"}}, AUTO)
r2 = openat$dir(0xffffffffffffff9c, &AUTO='./file0\x00', 0x0, 0x0)
syz_fuse_handle_req(r0, &AUTO=""/8192, AUTO, &AUTO={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, &AUTO={AUTO, 0x0, 0x0, {0x0, 0x8, AUTO}}, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})
getdents64(r2, &AUTO=""/1024, AUTO)
diff --git a/sys/linux/test/io_uring b/sys/linux/test/io_uring
index a85a4cc70..3e7e80371 100644
--- a/sys/linux/test/io_uring
+++ b/sys/linux/test/io_uring
@@ -1,6 +1,6 @@
# Create an io_uring instance
-r0 = syz_io_uring_setup(0x1, &AUTO={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}, &(0x7f00000a0000)=nil, &(0x7f00000b0000)=nil, &AUTO=<r1=>0x0, &AUTO=<r2=>0x0)
+r0 = syz_io_uring_setup(0x1, &AUTO={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, "000000000000000000000000", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}, &(0x7f00000a0000)=nil, &(0x7f00000b0000)=nil, &AUTO=<r1=>0x0, &AUTO=<r2=>0x0)
# Set IORING_CQ_EVENTFD_DISABLED. Has no side-effect for the test,
# only tests syz_memcpy_off().
@@ -9,7 +9,7 @@ syz_memcpy_off$IO_URING_METADATA_FLAGS(r1, 0x114, &AUTO=0x1, 0x0, AUTO)
# Write an openat2 operation to the submission queue
-syz_io_uring_submit(r1, r2, &AUTO=@IORING_OP_OPENAT2={AUTO, 0x0, AUTO, 0xffffffffffffff9c, &AUTO={0x42, 0x0, 0x0}, &AUTO='./file1\x00', AUTO, AUTO, 0x12345, {AUTO, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]} }, 0x0)
+syz_io_uring_submit(r1, r2, &AUTO=@IORING_OP_OPENAT2={AUTO, 0x0, AUTO, 0xffffffffffffff9c, &AUTO={0x42, 0x0, 0x0}, &AUTO='./file1\x00', AUTO, AUTO, 0x12345, {AUTO, 0x0, "0000000000000000000000000000000000000000"}}, 0x0)
# Notify the kernel about the submission and wait until completion
diff --git a/sys/linux/test/syz_fuse_handle_req b/sys/linux/test/syz_fuse_handle_req
index cb2aa42c8..a63aa92df 100644
--- a/sys/linux/test/syz_fuse_handle_req
+++ b/sys/linux/test/syz_fuse_handle_req
@@ -5,7 +5,7 @@ r1 = openat$dir(0xffffffffffffff9c, &AUTO='./file0\x00', 0x0, 0x0)
# FUSE_INIT
-syz_fuse_handle_req(r0, &AUTO=""/8192, AUTO, &AUTO={&AUTO={AUTO, 0x0, 0x0, {AUTO, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, AUTO, AUTO, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}}, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})
+syz_fuse_handle_req(r0, &AUTO=""/8192, AUTO, &AUTO={&AUTO={AUTO, 0x0, 0x0, {AUTO, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, AUTO, AUTO, "0000000000000000000000000000000000000000000000000000000000000000"}}, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})
# FUSE_OPENDIR
diff --git a/sys/linux/test/syz_mount_image_fuse b/sys/linux/test/syz_mount_image_fuse
index de68f09ef..48189c4bf 100644
--- a/sys/linux/test/syz_mount_image_fuse
+++ b/sys/linux/test/syz_mount_image_fuse
@@ -5,7 +5,7 @@ r3 = syz_mount_image$fuse(&AUTO='fuse\x00', &AUTO='./file0\x00', 0x0, 0x0, 0x0,
# FUSE_INIT
-syz_fuse_handle_req(r0, &AUTO=""/8192, AUTO, &AUTO={&AUTO={AUTO, 0x0, 0x0, {AUTO, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, AUTO, AUTO, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]}}, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})
+syz_fuse_handle_req(r0, &AUTO=""/8192, AUTO, &AUTO={&AUTO={AUTO, 0x0, 0x0, {AUTO, AUTO, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, AUTO, AUTO, "0000000000000000000000000000000000000000000000000000000000000000"}}, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})
# FUSE_OPENDIR
diff --git a/sys/test/csource.txt b/sys/test/csource.txt
index 0d1c847eb..e4c447b54 100644
--- a/sys/test/csource.txt
+++ b/sys/test/csource.txt
@@ -9,5 +9,6 @@ csource0(a int32) fd0
csource1(a fd0)
csource2(a ptr[in, array[int8]])
csource3(a ptr[in, array[const[0, int8], 10]])
-csource4(a ptr[in, array[const[0xab, int8], 10]])
-csource5(a ptr[in, array[const[0x12345678, int32], 4]])
+csource4(a ptr[in, array[const[0x30, int8], 10]])
+csource5(a ptr[in, array[const[0x3130, int16], 5]])
+csource6(a ptr[in, array[const[0x3130, int16be], 6]])
diff --git a/tools/syz-trace2syz/proggen/proggen_test.go b/tools/syz-trace2syz/proggen/proggen_test.go
index 451147bed..5f0531971 100644
--- a/tools/syz-trace2syz/proggen/proggen_test.go
+++ b/tools/syz-trace2syz/proggen/proggen_test.go
@@ -163,7 +163,7 @@ connect$inet(r0, &(0x7f0000000000)={0x2, 0x4594}, 0x10)
open("\x2f\x64\x65\x76\x2f\x73\x6e\x64\x2f\x73\x65\x71", 0) = 3
fsetxattr(3, "\x73\x65\x63\x75\x72\x69\x74\x79\x2e\x73\x65\x6c\x69\x6e\x75\x78","\x73\x79\x73", 4, 0) = 0
`, `
-r0 = openat$sndseq(0xffffffffffffff9c, &(0x7f0000000000)='/dev/snd/seq\x00', 0x0)
+r0 = openat$sndseq(0xffffffffffffff9c, &(0x7f0000000000), 0x0)
fsetxattr(r0, &(0x7f0000000040)=@known='security.selinux\x00', &(0x7f0000000080)='sys\x00', 0x4, 0x0)
`,
}, {`
@@ -226,7 +226,7 @@ sendto$inet6(r0, &(0x7f0000000000), 0x0, 0x0, &(0x7f0000000040)={0xa, 0x4e24}, 0
}, {`
open("\x2f\x64\x65\x76\x2f\x7a\x65\x72\x6f", "1") = 3
`, `
-openat$zero(0xffffffffffffff9c, &(0x7f0000000000)='/dev/zero\x00', 0x31, 0x0)
+openat$zero(0xffffffffffffff9c, &(0x7f0000000000), 0x31, 0x0)
`,
}, {`
open("\x2f\x64\x65\x76\x2f\x6c\x6f\x6f\x70\x30", 0) = 3
@@ -246,7 +246,7 @@ syz_open_dev$usbfs(&(0x7f0000000000)='/dev/bus/usb/001/001\x00', 0xb, 0x0)
}, {`
openat(0xffffffffffffff9c, "\x2f\x64\x65\x76\x2f\x7a\x65\x72\x6f", 0x31, 0) = 3
`, `
-openat$zero(0xffffffffffffff9c, &(0x7f0000000000)='/dev/zero\x00', 0x31, 0x0)
+openat$zero(0xffffffffffffff9c, &(0x7f0000000000), 0x31, 0x0)
`}, {`
socket(0xa, 0x1, 0) = 3
setsockopt(3, 0x29, 0x2a, {gr_interface=0, gr_group={sa_family=0xa, sin6_port="\x00\x00", sin6_flowinfo=` +
@@ -262,7 +262,7 @@ openat(-100, "\x2f\x64\x65\x76\x2f\x72\x74\x63\x30", 0) = 3
ioctl(3, 0x4028700f, {enabled=0, pending=0, time={tm_sec=0, tm_min=0, tm_hour=0, tm_mday=0, tm_mon=65536,` +
`tm_year=20865, tm_wday=0, tm_yday=0, tm_isdst=0}}) = -1 EINVAL (Invalid argument)`,
`
-r0 = openat$rtc(0xffffffffffffff9c, &(0x7f0000000000)='/dev/rtc0\x00', 0x0, 0x0)
+r0 = openat$rtc(0xffffffffffffff9c, &(0x7f0000000000), 0x0, 0x0)
ioctl$RTC_WKALM_SET(r0, 0x4028700f, &(0x7f0000000040)={0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x10000, 0x5181}})`,
},
}