| 0/0 |
2026/05/19 15:28 |
flow |
repro |
49m
Error:
|
| 1/1 |
2026/05/19 15:28 |
action |
kernel-checkouter |
0m
Results: map[KernelSrc:/app/workdir/cache/src/ecd8bb68855fdd08aa08215ac485989bac875215]
|
| 2/1 |
2026/05/19 15:28 |
action |
kernel-builder |
15m
Results: map[KernelObj:/app/workdir/cache/build/f2c01ec8be2f769089c3210aa8f229fe08da7d97]
|
| 3/1 |
2026/05/19 15:43 |
action |
codesearch-prepare |
11m
Results: map[Index:codesearch-index]
|
| 4/1 |
2026/05/19 15:55 |
agent |
crash-repro-finder |
15m
Model:
Results: map[CandidateReproSyz:syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
ReproOpts:]
Instruction:
You are an expert in the Linux kernel fuzzing. Your goal is to write a syzkaller program to trigger a specific bug.
Don't make assumptions about the kernel source code, use the provided codesearch tools
to examine the kernel code instead.
Document about syzkaller program syntax:
===
# Program syntax
Syzkaller uses a compact domain-specific language (DSL) for programs
to log executed programs, test its code, and persist programs in the
corpus. This page provides a brief description of the corresponding
syntax. Some useful information can also be found in the
[existing examples](/sys/linux/test) and in the program
[deserialization code](/prog/encoding.go).
Together with execution options, the DSL provides everything that
syz-executor needs to run a program.
For example, consider the program:
```
r0 = syz_open_dev$loop(&(0x7f00000011c0), 0x0, 0x0)
r1 = openat$6lowpan_control(0xffffffffffffff9c, &(0x7f00000000c0), 0x2, 0x0)
ioctl$LOOP_SET_FD(r0, 0x4c00, r1)
```
Each line in this program describes a particular syscall invocation,
with the first two calls saving the result in temporary variables `r0`
and `r1`, which are passed to the third call.
```
line = assignment | call
assignment = variable " = " call
call = syscall-name "(" [arg ["," arg]*] ")" ["(" [call-prop ["," call-prop*] ")"]
arg = "nil" | "AUTO" | const-arg | resource-arg | result-arg | pointer-arg | string-arg | struct-arg | array-arg | union-arg
const-arg = integer
resource-arg = variable ["/" hex-integer] ["+" hex-integer]
result-arg = "<" variable "=>" arg
pointer-arg = "&" pointer-arg-addr ["=ANY"] "=" arg
pointer-arg-addr = "AUTO" | "(" pointer-addr ["/" region-size] ")"
string-arg = "'" escaped-string "'" | "\"" escaped-string "\"" | "\"$" escaped-string "\""
struct-arg = "{" [arg ["," arg]*] "}"
array-arg = "[" [arg ["," arg]*] "]"
union-arg = "@" field-name ["=" arg]
call-prop = prop-name ": " prop-value
variable = "r" dec-integer
pointer-addr = integer
region-size = integer
integer = dec-integer | oct-integer | "0x" hex-integer
```
Programs may also contain blank lines and comments.
```
# Obtain a file handle
r0 = openat(0xffffffffffffff9c, &AUTO='./file1\x00', 0x42, 0x1ff)
# Perform a write operation
write(r0, &AUTO="01010101", 0x4)
```
### Memory management
Memory management is performed by syzkaller itself. It will allocate
virtual memory regions of the necessary size and set the final values
of pointer arguments.
By using the `AUTO` keyword, programs can give syzkaller the full
control over storing the data. This may be convenient e.g. when a
parameter must be passed by reference, but the exact location of its
value is not of particular importance.
```
r1 = syz_genetlink_get_family_id$nl80211(&AUTO='nl80211\x00', 0xffffffffffffffff)
ioctl$sock_SIOCGIFINDEX_80211(r0, 0x8933, &AUTO={'wlan0\x00', <r2=>0x0})
```
Alternatively, some data can be "anchored" to specific addresses. It
may be especially important when a memory region must be shared
between multiple calls. In this case, pointer addresses must be given
at the 0x7f0000000000 offset. Before the actual execution, syzkaller
will adjust pointers to the start of the actual mmap'ed region.
### Call properties
Call properties specify extra information about how a specific call
must be executed. Each call within a program has its own set of call
properties. If no properties are provided, syzkaller takes the default
ones.
Currently, syzkaller supports the following call properties.
#### Fault injection
Syntax: `fail_nth: N`.
It takes an integer (base 10) argument `N`. If the argument is
non-negative, a fault will be injected into the `N`-th occasion.
```
r0 = openat$6lowpan_control(0xffffffffffffff9c, &(0x7f00000000c0), 0x2, 0x0)
ioctl$LOOP_SET_FD(r0, 0x4c00, r0) (fail_nth: 5)
```
#### Async
Syntax: `async`.
Instructs `syz-executor` not to wait until the call completes and
to proceed immediately to the next call.
```
r0 = openat(0xffffffffffffff9c, &AUTO='./file1\x00', 0x42, 0x1ff)
write(r0, &AUTO="01010101", 0x4) (async)
read(r0, &AUTO=""/4, 0x4)
close(r0)
```
When setting `async` flags be aware of the following considerations:
* Such programs should only be executed in threaded mode (i.e. `-threaded`
flag must be passed to `syz-executor`.
* Each `async` call is executed in a separate thread and there's a
limited number of available threads (`kMaxThreads = 16`).
* If an `async` call produces a resource, keep in mind that some other call
might take it as input and `syz-executor` will just pass 0 if the resource-
producing call has not finished by that time.
===
Document about syzlang system call descriptions syntax:
===
# Syscall description language
aka `syzlang` (`[siːzˈlæŋg]`)
Pseudo-formal grammar of syscall description:
```
syscallname "(" [arg ["," arg]*] ")" [type] ["(" attribute* ")"]
arg = argname type
argname = identifier
type = typename [ "[" type-options "]" ]
typename = "const" | "intN" | "intptr" | "flags" | "array" | "ptr" |
"string" | "filename" | "glob" | "len" |
"bytesize" | "bytesizeN" | "bitsize" | "vma" | "proc" |
"compressed_image"
type-options = [type-opt ["," type-opt]]
```
common type-options include:
```
"opt" - the argument is optional (like mmap fd argument, or accept peer argument)
```
rest of the type-options are type-specific:
```
"const": integer constant, type-options:
value, underlying type (one of "intN", "intptr")
"intN"/"intptr": an integer without a particular meaning, type-options:
either an optional range of values (e.g. "5:10", or "100:200")
or a reference to flags description (see below),
or a single value
optionally followed by an alignment parameter if using a range
"flags": a set of values, type-options:
reference to flags description (see below), underlying int type (e.g. "int32")
"array": a variable/fixed-length array, type-options:
type of elements, optional size (fixed "5", or ranged "5:10", boundaries inclusive)
"ptr"/"ptr64": a pointer to an object, type-options:
direction (in/out/inout); type of the object
ptr64 has size of 8 bytes regardless of target pointer size
"string": a zero-terminated memory buffer (no pointer indirection implied), type-options:
either a string value in quotes for constant strings (e.g. "foo" or `deadbeef` for hex literal),
or a reference to string flags (special value `filename` produces file names),
optionally followed by a buffer size (string values will be padded with \x00 to that size)
"stringnoz": a non-zero-terminated memory buffer (no pointer indirection implied), type-options:
either a string value in quotes for constant strings (e.g. "foo" or `deadbeef` for hex literal),
or a reference to string flags,
"glob": glob pattern to match on the target files, type-options:
a pattern string in quotes (syntax: https://golang.org/pkg/path/filepath/#Match)
(e.g. "/sys/" or "/sys/**/*"),
or include exclude glob too (e.g. "/sys/**/*:-/sys/power/state")
"fmt": a string representation of an integer (not zero-terminated), type-options:
format (one of "dec", "hex", "oct") and the value (a resource, int, flags or proc)
the resulting data is always fixed-size (formatted as "%020llu", "0x%016llx" or "%023llo", respectively)
"len": length of another field (for array it is number of elements), type-options:
argname of the object
"bytesize": similar to "len", but always denotes the size in bytes, type-options:
argname of the object
"bitsize": similar to "len", but always denotes the size in bits, type-options:
argname of the object
"offsetof": offset of the field from the beginning of the parent struct, type-options:
field
"vma"/"vma64": a pointer to a set of pages (used as input for mmap/munmap/mremap/madvise), type-options:
optional number of pages (e.g. vma[7]), or a range of pages (e.g. vma[2-4])
vma64 has size of 8 bytes regardless of target pointer size
"proc": per process int (see description below), type-options:
value range start, how many values per process, underlying type
"compressed_image": zlib-compressed disk image
syscalls accepting compressed images must be marked with `no_generate`
and `no_minimize` call attributes. if the content of the decompressed image
can be checked by a `fsck`-like command, use the `fsck` syscall attribute
"text": machine code of the specified type, type-options:
text type (x86_real, x86_16, x86_32, x86_64, arm64)
"void": type with static size 0
mostly useful inside of templates and varlen unions, can't be syscall argument
```
flags/len/flags also have trailing underlying type type-option when used in structs/unions/pointers.
Flags are described as:
```
flagname = const ["," const]*
```
or for string flags as:
```
flagname = "\"" literal "\"" ["," "\"" literal "\""]*
```
Call attributes are:
```
"disabled": the call will not be used in fuzzing; useful to temporary disable some calls
or prohibit particular argument combinations.
"timeout[N]": additional execution timeout (in ms) for the call on top of some default value.
"prog_timeout[N]": additional execution timeout (in ms) for the whole program if it contains this call;
if a program contains several such calls, the max value is used.
"ignore_return": ignore return value of this syscall in fallback feedback; need to be used for calls
that don't return fixed error codes but rather something else (e.g. the current time).
"breaks_returns": ignore return values of all subsequent calls in the program in fallback feedback (can't be trusted).
"no_generate": do not try to generate this syscall, i.e. use only seed descriptions to produce it.
"no_minimize": do not modify instances of this syscall when trying to minimize a crashing program.
"no_squash": do not attempt to pass squashed arguments to this syscall.
Without that, the fuzzer will sometimes attempt to replace complex structures with arrays of bytes,
possibly triggering interesting mutations, but also making programs hard to reason about.
"fsck": the content of the compressed buffer argument for this syscall is a file system and the
string argument is a fsck-like command that will be called to verify the filesystem.
"remote_cover": wait longer to collect remote coverage for this call.
"kfuzz_test": the call is a kfuzztest target.
"snapshot": the call is enabled by default only in snapshot fuzzing mode, but can also be enabled in
the non-snasphot mode when listed in "enable_syscalls" with its full name (as opposed to a wildcard match).
It can also always be disabled via "disable_syscalls".
The attribute is generally used to mark calls that are not safe to execute in non-snapshot mode
(can lead to false positives, or lost connections to test machines.
```
## Ints
`int8`, `int16`, `int32` and `int64` denote an integer of the corresponding size.
`intptr` denotes a pointer-sized integer, i.e. C `long` type.
By appending `be` suffix (e.g. `int16be`) integers become big-endian.
It's possible to specify a range of values for an integer in the format of `int32[0:100]` or `int32[0:4096, 512]` for a 512-aligned int.
Integers can also take a reference to flags description or a value as its first type-option.
In that case, the alignment parameter is not supported.
To denote a bitfield of size N use `int64:N`.
It's possible to use these various kinds of ints as base types for `const`, `flags`, `len` and `proc`.
```
example_struct {
f0 int8 # random 1-byte integer
f1 const[0x42, int16be] # const 2-byte integer with value 0x4200 (big-endian 0x42)
f2 int32[0:100] # random 4-byte integer with values from 0 to 100 inclusive
f3 int32[1:10, 2] # random 4-byte integer with values {1, 3, 5, 7, 9}
f4 int64:20 # random 20-bit bitfield
f5 int8[10] # const 1-byte integer with value 10
f6 int32[flagname] # random 4-byte integer from the set of values referenced by flagname
}
```
## Structs
Structs are described as:
```
structname "{" "\n"
(fieldname type ("(" fieldattribute* ")")? (if[expression])? "\n")+
"}" ("[" attribute* "]")?
```
Fields can have attributes specified in parentheses after the field, independent
of their type. `in/out/inout` attribute specify per-field direction, for example:
```
foo {
field0 const[1, int32] (in)
field1 int32 (inout)
field2 fd (out)
}
```
You may specify conditions that determine whether a field will be included:
```
foo {
field0 int32
field1 int32 (if[value[field0] == 0x1])
}
```
See [the corresponding section](syscall_descriptions_syntax.md#conditional-fields)
for more details.
`out_overlay` attribute allows to have separate input and output layouts for the struct.
Fields before the `out_overlay` field are input, fields starting from `out_overlay` are output.
Input and output fields overlap in memory (both start from the beginning of the struct in memory).
For example:
```
foo {
in0 const[1, int32]
in1 flags[bar, int8]
in2 ptr[in, string]
out0 fd (out_overlay)
out1 int32
}
```
Structs can have attributes specified in square brackets after the struct.
Attributes are:
- `packed`: the struct does not have paddings between fields and has alignment 1; this is similar to GNU C `__attribute__((packed))`; struct alignment can be overridden with `align` attribute
- `align[N]`: the struct has alignment N and padded up to multiple of `N`; contents of the padding are unspecified (though, frequently are zeros); similar to GNU C `__attribute__((aligned(N)))`
- `size[N]`: the struct is padded up to the specified size `N`; contents of the padding are unspecified (though, frequently are zeros)
## Unions
Unions are described as:
```
unionname "[" "\n"
(fieldname type (if[expression])? "\n")+
"]" ("[" attribute* "]")?
```
During fuzzing, syzkaller randomly picks one of the union options.
You may also specify conditions that determine whether the corresponding
option may or may not be selected, depending on values of other fields. See
[the corresponding section](syscall_descriptions_syntax.md#conditional-fields)
for more details.
Unions can have attributes specified in square brackets after the union.
Attributes are:
- `varlen`: union size is the size of the particular chosen option (not statically known); without this attribute unions are statically sized as maximum of all options (similar to C unions)
- `size[N]`: the union is padded up to the specified size `N`; contents of the padding are unspecified (though, frequently are zeros)
## Resources
Resources represent values that need to be passed from output of one syscall to input of another syscall. For example, `close` syscall requires an input value (fd) previously returned by `open` or `pipe` syscall. To achieve this, `fd` is declared as a resource. This is a way of modelling dependencies between syscalls, as defining a syscall as the producer of a resource and another syscall as the consumer defines a loose sense of ordering between them. Resources are described as:
```
"resource" identifier "[" underlying_type "]" [ ":" const ("," const)* ]
```
`underlying_type` is either one of `int8`, `int16`, `int32`, `int64`, `intptr` or another resource (which models inheritance, for example, a socket is a subtype of fd). The optional set of constants represent resource special values, for example, `0xffffffffffffffff` (-1) for "no fd", or `AT_FDCWD` for "the current dir". Special values are used once in a while as resource values. If no special values specified, special value of `0` is used. Resources can then be used as types, for example:
```
resource fd[int32]: 0xffffffffffffffff, AT_FDCWD, 1000000
resource sock[fd]
resource sock_unix[sock]
socket(...) sock
accept(fd sock, ...) sock
listen(fd sock, backlog int32)
```
Resources don't have to be necessarily returned by a syscall. They can be used as any other data type. For example:
```
resource my_resource[int32]
request_producer(..., arg ptr[out, my_resource])
request_consumer(..., arg ptr[inout, test_struct])
test_struct {
...
attr my_resource
}
```
For more complex producer/consumer scenarios, field attributes can be utilized.
For example:
```
resource my_resource_1[int32]
resource my_resource_2[int32]
request_produce1_consume2(..., arg ptr[inout, test_struct])
test_struct {
...
field0 my_resource_1 (out)
field1 my_resource_2 (in)
}
```
Each resource type must be "produced" (used as an output) by at least one syscall
(outside of unions and optional pointers) and "consumed" (used as an input)
by at least one syscall.
## Type Aliases
Complex types that are often repeated can be given short type aliases using the
following syntax:
```
type identifier underlying_type
```
For example:
```
type signalno int32[0:65]
type net_port proc[20000, 4, int16be]
```
Then, type alias can be used instead of the underlying type in any contexts.
Underlying type needs to be described as if it's a struct field, that is,
with the base type if it's required. However, type alias can be used as syscall
arguments as well. Underlying types are currently restricted to integer types,
`ptr`, `ptr64`, `const`, `flags` and `proc` types.
There are some builtin type aliases:
```
type bool8 int8[0:1]
type bool16 int16[0:1]
type bool32 int32[0:1]
type bool64 int64[0:1]
type boolptr intptr[0:1]
type fileoff[BASE] BASE
type filename string[filename]
type buffer[DIR] ptr[DIR, array[int8]]
```
## Type Templates
Type templates can be declared as follows:
```
type buffer[DIR] ptr[DIR, array[int8]]
type fileoff[BASE] BASE
type nlattr[TYPE, PAYLOAD] {
nla_len len[parent, int16]
nla_type const[TYPE, int16]
payload PAYLOAD
} [align_4]
```
and later used as follows:
```
syscall(a buffer[in], b fileoff[int64], c ptr[in, nlattr[FOO, int32]])
```
There is builtin type template `optional` defined as:
```
type optional[T] [
val T
void void
] [varlen]
```
## Length
You can specify length of a particular field in struct or a named argument by
using `len`, `bytesize` and `bitsize` types, for example:
```
write(fd fd, buf ptr[in, array[int8]], count len[buf])
sock_fprog {
len len[filter, int16]
filter ptr[in, array[sock_filter]]
}
```
If `len`'s argument is a pointer, then the length of the pointee argument is used.
To denote the length of a field in N-byte words use `bytesizeN`, possible values
for N are 1, 2, 4 and 8.
To denote the length of the parent struct, you can use `len[parent, int8]`.
To denote the length of the higher level parent when structs are embedded into
one another, you can specify the type name of the particular parent:
```
s1 {
f0 len[s2] # length of s2
}
s2 {
f0 s1
f1 array[int32]
f2 len[parent, int32]
}
```
`len` argument can also be a path expression which allows more complex
addressing. Path expressions are similar to C field references, but also allow
referencing parent and sibling elements. A special reference `syscall` used
in the beginning of the path allows to refer directly to the syscall arguments.
For example:
```
s1 {
a ptr[in, s2]
b ptr[in, s3]
c array[int8]
}
s2 {
d array[int8]
}
s3 {
# This refers to the array c in the parent s1.
e len[s1:c, int32]
# This refers to the array d in the sibling s2.
f len[s1:a:d, int32]
# This refers to the array k in the child s4.
g len[i:j, int32]
# This refers to syscall argument l.
h len[syscall:l, int32]
i ptr[in, s4]
}
s4 {
j array[int8]
}
foo(k ptr[in, s1], l ptr[in, array[int8]])
```
## Proc
The `proc` type can be used to denote per process integers.
The idea is to have a separate range of values for each executor, so they don't interfere.
The simplest example is a port number.
The `proc[20000, 4, int16be]` type means that we want to generate an `int16be`
integer starting from `20000` and assign `4` values for each process.
As a result the executor number `n` will get values in the `[20000 + n * 4, 20000 + (n + 1) * 4)` range.
## Integer Constants
Integer constants can be specified as decimal literals, as `0x`-prefixed
hex literals, as `'`-surrounded char literals, or as symbolic constants
extracted from kernel headers or defined by `define` directives. For example:
```
foo(a const[10], b const[-10])
foo(a const[0xabcd])
foo(a int8['a':'z'])
foo(a const[PATH_MAX])
foo(a int32[PATH_MAX])
foo(a ptr[in, array[int8, MY_PATH_MAX]])
define MY_PATH_MAX PATH_MAX + 2
```
## Conditional fields
### In structures
In syzlang, it's possible to specify a condition for every struct field that
determines whether the field should be included or omitted:
```
header_fields {
magic const[0xabcd, int16]
haveInteger int8
} [packed]
packet {
header header_fields
integer int64 (if[value[header:haveInteger] == 0x1])
body array[int8]
} [packed]
some_call(a ptr[in, packet])
```
In this example, the `packet` structure will include the field `integer` only
if `header.haveInteger == 1`. In memory, `packet` will have the following
layout:
| header.magic = 0xabcd | header.haveInteger = 0x1 | integer | body |
| --------------------- | ------------------------ | ------- | ---- |
That corresponds to e.g. the following program:
```
some_call(&AUTO={{AUTO, 0x1}, @value=0xabcd, []})
```
If `header.haveInteger` is not `1`, syzkaller will just pretend that the field
`integer` does not exist.
```
some_call(&AUTO={{AUTO, 0x0}, @void, []})
```
| header.magic = 0xabcd | header.haveInteger = 0x0 | body |
| --------------------- | ------------------------ | ---- |
Every conditional field is assumed to be of variable length and so is the struct
to which this field belongs.
When a variable length field appears in the middle of a structure, the structure
must be marked with `[packed].`
Conditions on bitfields are prohibited:
```
struct {
f0 int
f1 int:3 (if[value[f0] == 0x1]) # It will not compile.
}
```
But you may reference bitfields in your conditions:
```
struct {
f0 int:1
f1 int:7
f2 int (if[value[f0] == value[f1]])
} [packed]
```
### In unions
Let's consider the following example.
```
struct {
type int
body alternatives
}
alternatives [
int int64 (if[value[struct:type] == 0x1])
arr array[int64, 5] (if[value[struct:type] == 0x2])
default int32
] [varlen]
some_call(a ptr[in, struct])
```
In this case, the union option will be selected depending on the value of the
`type` field. For example, if `type` is `0x1`, then it can be either `int` or
`default`:
```
some_call(&AUTO={0x1, @int=0x123})
some_call(&AUTO={0x1, @default=0x123})
```
If `type` is `0x2`, it can be either `arr` or `default`.
If `type` is neither `0x1` nor `0x2`, syzkaller may only select `default`:
```
some_call(&AUTO={0x0, @default=0xabcd})
```
To ensure that a union can always be constructed, the last union field **must always
have no condition**.
Thus, the following definition would fail to compile:
```
alternatives [
int int64 (if[value[struct:type] == 0x1])
arr array[int64, 5] (if[value[struct:type] == 0x1])
] [varlen]
```
During prog mutation and generation syzkaller will select a random union field
whose condition is satisfied.
### Expression syntax
Currently, only `==`, `!=`, `&` and `||` operators are supported. However, the
functionality was designed in such a way that adding more operators is easy.
Feel free to file a GitHub issue or write us an email in case it's needed.
Expressions are evaluated as `int64` values. If the final result of an
expression is not 0, it's assumed to be satisfied.
If you want to reference a field's value, you can do it via
`value[path:to:field]`, which is similar to the `len[]` argument.
```
sub_struct {
f0 int
# Reference a field in a parent struct.
f1 int (if[value[struct:f2]]) # Same as if[value[struct:f2] != 0].
}
struct {
f2 int
f3 sub_struct
f4 int (if[value[f2] == 0x2]) # Reference a sibling field.
f5 int (if[value[f3:f0] == 0x1]) # Reference a nested field.
f6 int (if[value[f3:f0] == 0x1 || value[f3:f0] == 0x2]) # Reference a nested field which either equals to 0x1 or 0x2.
} [packed]
call(a ptr[in, struct])
```
The referenced field must be of integer type and there must be no
conditional fields in the path to it. For example, the following
descriptions will not compile.
```
struct {
f0 int
f1 int (if[value[f0] == 0x1])
f2 int (if[value[f1] == 0x1])
}
```
You may also reference constants in expressions:
```
struct {
f0 int
f1 int
f2 int (if[value[f0] & SOME_CONST == OTHER_CONST])
}
```
## Meta
Description files can also contain `meta` directives that specify meta-information for the whole file.
```
meta noextract
```
Tells `make extract` to not extract constants for this file.
Though, `syz-extract` can still be invoked manually on this file.
```
meta arches["arch1", "arch2"]
```
Restricts this file only to the given set of architectures.
`make extract` and `make generate` will not use it on other architectures.
## Misc
Description files also contain `include` directives that refer to Linux kernel header files,
`incdir` directives that refer to custom Linux kernel header directories
and `define` directives that define symbolic constant values.
The syzkaller executor defines some [pseudo system calls](./pseudo_syscalls.md)
that can be used as any other syscall in a description file. These pseudo
system calls expand to literal C code and can perform user-defined
custom actions. You can find some examples in
[executor/common_linux.h](../executor/common_linux.h).
Also see [tips](syscall_descriptions.md#tips) on writing good descriptions.
===
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt:
Bug title: possible deadlock in jfs_commit_inode
The bug report to reproduce:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz-executor/5628 is trying to acquire lock:
ffff888048423fd8 (&jfs_ip->commit_mutex){+.+.}-{4:4}, at: jfs_commit_inode+0x1f5/0x4b0 fs/jfs/inode.c:108
but task is already holding lock:
ffff8880534b4918 (&(log)->loglock){+.+.}-{4:4}, at: jfs_umount+0x189/0x430 fs/jfs/jfs_umount.c:66
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&(log)->loglock){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x1a4/0x1b10 kernel/locking/mutex.c:820
lmLog+0x8c/0xb90 fs/jfs/jfs_logmgr.c:234
dtLog fs/jfs/jfs_txnmgr.c:1620 [inline]
txLog fs/jfs/jfs_txnmgr.c:1402 [inline]
txCommit+0x326d/0x4a90 fs/jfs/jfs_txnmgr.c:1266
jfs_unlink+0x7db/0xa20 fs/jfs/namei.c:557
vfs_unlink+0x2f0/0xbd0 fs/namei.c:5498
filename_unlinkat+0x408/0x730 fs/namei.c:5568
__do_sys_unlink fs/namei.c:5603 [inline]
__se_sys_unlink fs/namei.c:5600 [inline]
__x64_sys_unlink+0x46/0x70 fs/namei.c:5600
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #1 (&jfs_ip->commit_mutex/1){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x1a4/0x1b10 kernel/locking/mutex.c:820
jfs_unlink+0x2c7/0xa20 fs/jfs/namei.c:494
vfs_unlink+0x2f0/0xbd0 fs/namei.c:5498
filename_unlinkat+0x408/0x730 fs/namei.c:5568
__do_sys_unlink fs/namei.c:5603 [inline]
__se_sys_unlink fs/namei.c:5600 [inline]
__x64_sys_unlink+0x46/0x70 fs/namei.c:5600
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&jfs_ip->commit_mutex){+.+.}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x14b8/0x2630 kernel/locking/lockdep.c:5237
lock_acquire kernel/locking/lockdep.c:5868 [inline]
lock_acquire+0x1b1/0x370 kernel/locking/lockdep.c:5825
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x1a4/0x1b10 kernel/locking/mutex.c:820
jfs_commit_inode+0x1f5/0x4b0 fs/jfs/inode.c:108
jfs_write_inode+0xfb/0x230 fs/jfs/inode.c:138
write_inode fs/fs-writeback.c:1584 [inline]
__writeback_single_inode+0xcd4/0x1350 fs/fs-writeback.c:1827
writeback_single_inode+0x4d3/0xf30 fs/fs-writeback.c:1883
write_inode_now+0x174/0x1f0 fs/fs-writeback.c:2974
iput_final fs/inode.c:1950 [inline]
iput.part.0+0x7f3/0xf50 fs/inode.c:2009
iput+0x35/0x40 fs/inode.c:1975
diFreeSpecial+0x76/0x100 fs/jfs/jfs_imap.c:552
jfs_umount+0x1a2/0x430 fs/jfs/jfs_umount.c:72
jfs_put_super+0x88/0x1a0 fs/jfs/super.c:194
generic_shutdown_super+0x167/0x360 fs/super.c:646
kill_block_super+0x3b/0xa0 fs/super.c:1725
deactivate_locked_super+0xc1/0x1b0 fs/super.c:476
deactivate_super fs/super.c:509 [inline]
deactivate_super+0xe7/0x110 fs/super.c:505
cleanup_mnt+0x21f/0x450 fs/namespace.c:1312
task_work_run+0x150/0x240 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
exit_to_user_mode_loop+0x107/0x4f0 kernel/entry/common.c:98
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:238 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
do_syscall_64+0x706/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Chain exists of:
&jfs_ip->commit_mutex --> &jfs_ip->commit_mutex/1 --> &(log)->loglock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&(log)->loglock);
lock(&jfs_ip->commit_mutex/1);
lock(&(log)->loglock);
lock(&jfs_ip->commit_mutex);
*** DEADLOCK ***
2 locks held by syz-executor/5628:
#0: ffff8880268020d8 (&type->s_umount_key#86){+.+.}-{4:4}, at: __super_lock fs/super.c:58 [inline]
#0: ffff8880268020d8 (&type->s_umount_key#86){+.+.}-{4:4}, at: __super_lock_excl fs/super.c:73 [inline]
#0: ffff8880268020d8 (&type->s_umount_key#86){+.+.}-{4:4}, at: deactivate_super fs/super.c:508 [inline]
#0: ffff8880268020d8 (&type->s_umount_key#86){+.+.}-{4:4}, at: deactivate_super+0xdf/0x110 fs/super.c:505
#1: ffff8880534b4918 (&(log)->loglock){+.+.}-{4:4}, at: jfs_umount+0x189/0x430 fs/jfs/jfs_umount.c:66
stack backtrace:
CPU: 1 UID: 0 PID: 5628 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2175
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x14b8/0x2630 kernel/locking/lockdep.c:5237
lock_acquire kernel/locking/lockdep.c:5868 [inline]
lock_acquire+0x1b1/0x370 kernel/locking/lockdep.c:5825
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x1a4/0x1b10 kernel/locking/mutex.c:820
jfs_commit_inode+0x1f5/0x4b0 fs/jfs/inode.c:108
jfs_write_inode+0xfb/0x230 fs/jfs/inode.c:138
write_inode fs/fs-writeback.c:1584 [inline]
__writeback_single_inode+0xcd4/0x1350 fs/fs-writeback.c:1827
writeback_single_inode+0x4d3/0xf30 fs/fs-writeback.c:1883
write_inode_now+0x174/0x1f0 fs/fs-writeback.c:2974
iput_final fs/inode.c:1950 [inline]
iput.part.0+0x7f3/0xf50 fs/inode.c:2009
iput+0x35/0x40 fs/inode.c:1975
diFreeSpecial+0x76/0x100 fs/jfs/jfs_imap.c:552
jfs_umount+0x1a2/0x430 fs/jfs/jfs_umount.c:72
jfs_put_super+0x88/0x1a0 fs/jfs/super.c:194
generic_shutdown_super+0x167/0x360 fs/super.c:646
kill_block_super+0x3b/0xa0 fs/super.c:1725
deactivate_locked_super+0xc1/0x1b0 fs/super.c:476
deactivate_super fs/super.c:509 [inline]
deactivate_super+0xe7/0x110 fs/super.c:505
cleanup_mnt+0x21f/0x450 fs/namespace.c:1312
task_work_run+0x150/0x240 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
exit_to_user_mode_loop+0x107/0x4f0 kernel/entry/common.c:98
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:238 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
do_syscall_64+0x706/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f01bdf9e017
Code: a2 c7 05 dc 06 25 00 00 00 00 00 eb 96 e8 e1 12 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffd3abf1c68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007f01be032120 RCX: 00007f01bdf9e017
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffd3abf1d20
RBP: 00007ffd3abf1d20 R08: 00007ffd3abf2d20 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd3abf2db0
R13: 00007f01be032120 R14: 0000000000036c67 R15: 00007ffd3abf2df0
</TASK>
The list of existing description files:
acpi_thermal_rel.txt
aio.txt
auto.txt
binfmt.txt
bpf.txt
bpf_prog.txt
bpf_trace.txt
cgroup.txt
damon.txt
dev_ashmem.txt
dev_bifrost.txt
dev_binder.txt
dev_binderfs.txt
dev_block.txt
dev_bsg.txt
dev_bus_usb.txt
dev_camx.txt
dev_cdrom.txt
dev_cec.txt
dev_char_usb.txt
dev_comedi.txt
dev_dma_heap.txt
dev_dri.txt
dev_dsp.txt
dev_dvb_demux.txt
dev_dvb_dvr.txt
dev_dvb_frontend.txt
dev_fb.txt
dev_floppy.txt
dev_hidraw.txt
dev_i2c.txt
dev_i915.txt
dev_img_rogue.txt
dev_infiniband_rdma.txt
dev_infiniband_rdma_cm.txt
dev_input.txt
dev_iommu.txt
dev_kvm.txt
dev_kvm_amd64.txt
dev_kvm_arm64.txt
dev_kvm_extra.txt
dev_kvm_riscv64.txt
dev_loop.txt
dev_mali.txt
dev_media.txt
dev_msm.txt
dev_msr.txt
dev_nbd.txt
dev_net_tun.txt
dev_panthor.txt
dev_ppp.txt
dev_ptmx.txt
dev_ptp.txt
dev_qat_adf_ctl.txt
dev_qrtr_tun.txt
dev_random.txt
dev_rfkill.txt
dev_rtc.txt
dev_sequencer.txt
dev_sg.txt
dev_snapshot.txt
dev_snd_control.txt
dev_snd_hw.txt
dev_snd_midi.txt
dev_snd_pcm.txt
dev_snd_seq.txt
dev_snd_timer.txt
dev_sr.txt
dev_sw_sync.txt
dev_tlk_device.txt
dev_trusty.txt
dev_udmabuf.txt
dev_uhid.txt
dev_uinput.txt
dev_usb_hiddev.txt
dev_usbmon.txt
dev_userio.txt
dev_vfio.txt
dev_vga_arbiter.txt
dev_vhci.txt
dev_video4linux.txt
dev_video4linux_vim2m.txt
dev_virtual_nci.txt
dev_vtpm.txt
fanotify.txt
filesystem.txt
fs_9p.txt
fs_fuse.txt
fs_incfs.txt
fs_ioctl.txt
fs_ioctl_autofs.txt
fs_ioctl_btrfs.txt
fs_ioctl_ext4.txt
fs_ioctl_f2fs.txt
fs_ioctl_fat.txt
fs_ioctl_fscrypt.txt
fs_ioctl_fsverity.txt
fs_ioctl_nilfs2.txt
fs_ioctl_ocfs2.txt
fs_ioctl_xfs.txt
futex.txt
hafnium.txt
inotify.txt
io_uring.txt
ipc.txt
key.txt
kfuzztest.txt
l2cap.txt
landlock.txt
lsm.txt
namespaces.txt
net_80211.txt
netfilter.txt
netfilter_arp.txt
netfilter_bridge.txt
netfilter_ipv4.txt
netfilter_ipv6.txt
netfilter_ipvs.txt
netfilter_targets.txt
pagemap_ioctl.txt
perf.txt
prctl.txt
quotactl.txt
seccomp.txt
security_apparmor.txt
security_selinux.txt
security_smack.txt
socket.txt
socket_alg.txt
socket_ax25.txt
socket_bluetooth.txt
socket_caif.txt
socket_can.txt
socket_ieee802154.txt
socket_inet.txt
socket_inet6.txt
socket_inet_dccp.txt
socket_inet_icmp.txt
socket_inet_igmp.txt
socket_inet_l2tp.txt
socket_inet_sctp.txt
socket_inet_tcp.txt
socket_inet_udp.txt
socket_ip_tunnel.txt
socket_isdn.txt
socket_kcm.txt
socket_key.txt
socket_llc.txt
socket_netlink.txt
socket_netlink_audit.txt
socket_netlink_crypto.txt
socket_netlink_generic.txt
socket_netlink_generic_80211.txt
socket_netlink_generic_batadv.txt
socket_netlink_generic_devlink.txt
socket_netlink_generic_ethtool.txt
socket_netlink_generic_fou.txt
socket_netlink_generic_gtp.txt
socket_netlink_generic_mptcp.txt
socket_netlink_generic_net_dm.txt
socket_netlink_generic_netlabel.txt
socket_netlink_generic_nfc.txt
socket_netlink_generic_seg6.txt
socket_netlink_generic_smc.txt
socket_netlink_generic_team.txt
socket_netlink_generic_wireguard.txt
socket_netlink_netfilter.txt
socket_netlink_netfilter_acct.txt
socket_netlink_netfilter_conntrack.txt
socket_netlink_netfilter_conntrack_exp.txt
socket_netlink_netfilter_conntrack_helper.txt
socket_netlink_netfilter_ipset.txt
socket_netlink_netfilter_log.txt
socket_netlink_netfilter_nft_compat.txt
socket_netlink_netfilter_nftables.txt
socket_netlink_netfilter_osf.txt
socket_netlink_netfilter_queue.txt
socket_netlink_netfilter_timeout.txt
socket_netlink_rdma.txt
socket_netlink_route.txt
socket_netlink_route_sched.txt
socket_netlink_route_sched_retired.txt
socket_netlink_sock_diag.txt
socket_netlink_xfrm.txt
socket_netrom.txt
socket_nfc.txt
socket_nvme_of_tcp.txt
socket_packet.txt
socket_phonet.txt
socket_pppox.txt
socket_qipcrtr.txt
socket_rds.txt
socket_rose.txt
socket_rxrpc.txt
socket_tipc.txt
socket_tipc_netlink.txt
socket_unix.txt
socket_vnet.txt
socket_x25.txt
socket_xdp.txt
sys.txt
ublk.txt
uffd.txt
usbip.txt
vmw_vmci.txt
vnet.txt
vnet_mptcp.txt
vusb.txt
watch_queue.txt
xattr.txt
|
| 5/2 |
2026/05/19 15:55 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 16753
output: 18
thoughts: 293
Thoughts: **Analyzing the JFS Deadlock Bug for Syzkaller Program Development**
Okay, so we've got a tricky one here: a potential deadlock in JFS, specifically the "jfs_commit_inode" function. The bug report outlines a circular locking dependency, which is always fun. It looks like we have `&jfs_ip->commit_mutex` locking into `&jfs_ip->commit_mutex/1`, and then into `&(log)->loglock`. The stack traces are helpful, showing the execution flow on two CPUs. CPU0 is hitting the `(log)->loglock` before the `jfs_ip->commit_mutex`, while CPU1 hits `jfs_ip->commit_mutex/1` and then the `(log)->loglock`.
The stacks reveal the specific functions involved. On CPU0, we see the mount/umount path, `jfs_umount` which locks `log->loglock`, and eventually `jfs_commit_inode`, which locks `jfs_ip->commit_mutex`. CPU1 is tracing through `jfs_unlink` and into the logging components, locking the `log->loglock` later. This seems to be where we need to focus.
Right, so we're dealing with JFS. To reproduce this, we'll need to mount a JFS filesystem. The key to that will be `syz_mount_image$jfs`. Now, where did I see that mount call implemented? Let's check `filesystem.txt` or `sys.txt`, those are the usual suspects for finding that syzcall. That should give us a good start.
|
| 6/2 |
2026/05/19 15:55 |
tool |
read-description |
0m
Args:
Results: map[Output:# 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/mount.h>
include <linux/fs.h>
include <linux/fcntl.h>
mount(src ptr[in, blockdev_filename], dst ptr[in, filename], type ptr[in, string[filesystem]], flags flags[mount_flags], data ptr[in, string, opt])
umount2(path ptr[in, filename], flags flags[umount_flags])
mount$bpf(src const[0], dst ptr[in, filename], type ptr[in, string["bpf"]], flags flags[mount_flags], opts ptr[in, fs_options[bpf_options]])
mount$overlay(src const[0], dst ptr[in, filename], type ptr[in, string["overlay"]], flags flags[mount_flags], opts ptr[in, fs_options[overlay_options]])
mount$binder(src const[0], dst ptr[in, filename], type ptr[in, string["binder"]], flags flags[mount_flags], opts ptr[in, fs_options[binder_options]])
mount$tmpfs(src const[0], dst ptr[in, filename], type ptr[in, string["tmpfs"]], flags flags[mount_flags], opts ptr[in, fs_options[tmpfs_options]])
mount$cgroup(src const[0], dst ptr[in, filename], type ptr[in, string["cgroup"]], flags flags[mount_flags], opts ptr[in, fs_options[cgroup_options]])
mount$cgroup2(src const[0], dst ptr[in, filename], type ptr[in, string["cgroup2"]], flags flags[mount_flags], opts ptr[in, fs_options[cgroup2_options]])
mount$afs(src ptr[in, afs_source], dst ptr[in, filename], type ptr[in, string["afs"]], flags flags[mount_flags], opts ptr[in, fs_options[afs_options]])
# A bind mount ignores the filesystem type argument, but
# pkg/host/syscalls_linux.go:isSupportedFilesystem() requires one in
# /proc/filesystems. Use a common and valid filesystem string ("pipefs") to
# pass the check.
mount$bind(src ptr[in, filename], dst ptr[in, filename], type ptr[in, string["pipefs"]], flags flags[mount_flags], data const[0])
# esdfs is ChromeOS-specific:
# https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d2c1fb9fcdb53%5E%21/
mount$esdfs(src ptr[in, filename], dst ptr[in, filename], type ptr[in, string["esdfs"]], flags flags[mount_flags], opts ptr[in, fs_options[esdfs_options]])
# TODO: pvfs2 requires some device/source, but it looks unused:
# https://elixir.bootlin.com/linux/v6.1-rc6/source/fs/orangefs/super.c#L488
# Instead it sends requests to some pvfs2-req character device,
# and somebody is supposed to answer these requests with ioctls.
# But the deivce is not even created in /dev, somebody is supposed to mknod it.
# And it's major number is unknown (printed to console in debug mode only):
# https://elixir.bootlin.com/linux/v6.1-rc6/source/fs/orangefs/devorangefs-req.c#L803
# It does not look usable.
mount$pvfs2(src ptr[in, string["unused"]], dst ptr[in, filename], type ptr[in, string["pvfs2"]], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]])
# TODO: nfs source is "hostname:export_path", but we also needs to setup port,
# protocol and other options, and most importantly we need the server to reply to RPCs.
# There is something called nfsd (fs/nfsd) which may help and which we need to test as well.
mount$nfs(src ptr[in, string], dst ptr[in, filename], type ptr[in, string["nfs"]], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]])
mount$nfs4(src ptr[in, string], dst ptr[in, filename], type ptr[in, string["nfs4"]], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]])
resource fd_fscontext[fd]
fsopen(type ptr[in, string[filesystem]], flags flags[fsopen_flags]) fd_fscontext
fspick(dfd fd_dir[opt], path ptr[in, filename], flags flags[fspick_flags]) fd_fscontext
fsconfig$FSCONFIG_SET_FLAG(fd fd_fscontext, cmd const[FSCONFIG_SET_FLAG], key ptr[in, string[fsconfig_flag_params]], value const[0], aux const[0])
fsconfig$FSCONFIG_SET_STRING(fd fd_fscontext, cmd const[FSCONFIG_SET_STRING], key ptr[in, string], value ptr[in, string], aux const[0])
fsconfig$FSCONFIG_SET_BINARY(fd fd_fscontext, cmd const[FSCONFIG_SET_BINARY], key ptr[in, string], value ptr[in, array[int8]], aux bytesize[value])
fsconfig$FSCONFIG_SET_PATH(fd fd_fscontext, cmd const[FSCONFIG_SET_PATH], key ptr[in, string], value ptr[in, filename], aux fd_dir[opt])
fsconfig$FSCONFIG_SET_PATH_EMPTY(fd fd_fscontext, cmd const[FSCONFIG_SET_PATH_EMPTY], key ptr[in, string], value ptr[in, filename], aux fd_dir[opt])
fsconfig$FSCONFIG_SET_FD(fd fd_fscontext, cmd const[FSCONFIG_SET_FD], key ptr[in, string], value const[0], aux fd)
fsconfig$FSCONFIG_CMD_CREATE(fd fd_fscontext, cmd const[FSCONFIG_CMD_CREATE], key const[0], value const[0], aux const[0])
fsconfig$FSCONFIG_CMD_RECONFIGURE(fd fd_fscontext, cmd const[FSCONFIG_CMD_RECONFIGURE], key const[0], value const[0], aux const[0])
fsmount(fs_fd fd_fscontext, flags flags[fsmount_flags], attr_flags flags[fsmount_attr_flags]) fd
move_mount(from_dfd fd_dir[opt], from_pathname ptr[in, filename], to_dfd fd_dir[opt], to_pathname ptr[in, filename], flags flags[move_mount_flags])
open_tree(dfd fd_dir[opt], filename ptr[in, filename], flags flags[open_tree_flags]) fd
mount_setattr(dfd fd_dir[opt], filename ptr[in, filename], flags flags[mount_setattr_flags], args ptr[in, mount_attr], size bytesize[args])
open_tree_flags = AT_EMPTY_PATH, AT_NO_AUTOMOUNT, AT_RECURSIVE, AT_SYMLINK_NOFOLLOW, OPEN_TREE_CLONE, OPEN_TREE_CLOEXEC
mount_setattr_flags = AT_EMPTY_PATH, AT_NO_AUTOMOUNT, AT_RECURSIVE, AT_SYMLINK_NOFOLLOW
mount_attr {
attr_set flags[mount_attr_flags, int64]
attr_clr flags[mount_attr_flags, int64]
propagation flags[mount_attr_propagation_flags, int64]
userns_fd align64[fd_userns]
}
mount_attr_flags = MOUNT_ATTR_IDMAP, fsmount_attr_flags
mount_attr_propagation_flags = MS_UNBINDABLE, MS_PRIVATE, MS_SLAVE, MS_SHARED
fsmount_flags = FSMOUNT_CLOEXEC
fsopen_flags = FSOPEN_CLOEXEC
fspick_flags = FSPICK_CLOEXEC
fsmount_attr_flags = MOUNT_ATTR_RDONLY, MOUNT_ATTR_NOSUID, MOUNT_ATTR_NODEV, MOUNT_ATTR_NOEXEC, MOUNT_ATTR__ATIME, MOUNT_ATTR_NODIRATIME
move_mount_flags = MOVE_MOUNT_F_SYMLINKS, MOVE_MOUNT_F_AUTOMOUNTS, MOVE_MOUNT_F_EMPTY_PATH, MOVE_MOUNT_T_SYMLINKS, MOVE_MOUNT_T_AUTOMOUNTS, MOVE_MOUNT_T_EMPTY_PATH, MOVE_MOUNT_SET_GROUP, MOVE_MOUNT_BENEATH
fsconfig_flag_params = "dirsync", "lazytime", "mand", "posixacl", "ro", "sync", "async", "nolazytime", "nomand", "rw", "silent"
filesystem = "sysfs", "rootfs", "ramfs", "tmpfs", "devtmpfs", "debugfs", "securityfs", "sockfs", "pipefs", "anon_inodefs", "devpts", "hugetlbfs", "vfat", "ecryptfs", "fuseblk", "fuse", "rpc_pipefs", "nfs", "nfs4", "nfsd", "binfmt_misc", "autofs", "xfs", "jfs", "msdos", "ntfs", "ntfs3", "minix", "hfs", "hfsplus", "qnx4", "ufs", "btrfs", "configfs", "ncpfs", "qnx6", "exofs", "befs", "vxfs", "gfs2", "gfs2meta", "fusectl", "bfs", "nsfs", "efs", "cifs", "efivarfs", "affs", "tracefs", "bdev", "ocfs2", "ocfs2_dlmfs", "hpfs", "proc", "afs", "reiserfs", "jffs2", "romfs", "aio", "sysv", "v7", "udf", "ceph", "pstore", "adfs", "9p", "hostfs", "squashfs", "cramfs", "iso9660", "coda", "nilfs2", "logfs", "overlay", "f2fs", "omfs", "ubifs", "openpromfs", "bpf", "cgroup", "cgroup2", "cpuset", "mqueue", "aufs", "selinuxfs", "dax", "erofs", "virtiofs", "exfat", "binder", "zonefs", "pvfs2", "incremental-fs", "esdfs", "smb3", "gadgetfs", ext4_types
blockdev_filename [
filename filename
nbd nbd_filename
loop loop_filename
nullb string["/dev/nullb0"]
rnullb string["/dev/rnullb0"]
md0 string["/dev/md0"]
sg0 string["/dev/sg0"]
sr0 string["/dev/sr0"]
] [varlen]
nbd_filename {
prefix stringnoz["/dev/nbd"]
# NEED: this does not support formatting numbers larger than 9.
id proc['0', 1, int8]
z const[0, int8]
} [packed]
loop_filename {
prefix stringnoz["/dev/loop"]
# NEED: this does not support formatting numbers larger than 9.
id proc['0', 1, int8]
z const[0, int8]
} [packed]
syz_read_part_table(size len[img], img ptr[in, compressed_image]) (timeout[200], no_generate, no_minimize)
define SYZ_MOUNT_IMAGE_TIMEOUT 4000
syz_mount_image$vfat(fs ptr[in, string["vfat"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[vfat_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.vfat -n"])
syz_mount_image$msdos(fs ptr[in, string["msdos"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[msdos_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.msdos -n"])
syz_mount_image$bfs(fs ptr[in, string["bfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$xfs(fs ptr[in, string["xfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[xfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["xfs_repair -n"])
syz_mount_image$minix(fs ptr[in, string["minix"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.minix"])
syz_mount_image$reiserfs(fs ptr[in, string["reiserfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[reiserfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.reiserfs -n"])
syz_mount_image$hfs(fs ptr[in, string["hfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[hfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$hfsplus(fs ptr[in, string["hfsplus"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[hfsplus_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$iso9660(fs ptr[in, string["iso9660"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[iso9660_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$gfs2(fs ptr[in, string["gfs2"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[gfs2_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.gfs2 -n"])
syz_mount_image$jfs(fs ptr[in, string["jfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[jfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.jfs -n"])
syz_mount_image$btrfs(fs ptr[in, string["btrfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[btrfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["btrfsck --readonly"])
syz_mount_image$ntfs(fs ptr[in, string["ntfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[ntfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$ntfs3(fs ptr[in, string["ntfs3"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[ntfs3_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$ext4(fs ptr[in, string[ext4_types]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[ext4_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.ext4 -n"])
syz_mount_image$f2fs(fs ptr[in, string["f2fs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[f2fs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.f2fs"])
syz_mount_image$ocfs2(fs ptr[in, string["ocfs2"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[ocfs2_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.ocfs2 -n"])
syz_mount_image$erofs(fs ptr[in, string["erofs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[erofs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.erofs"])
syz_mount_image$exfat(fs ptr[in, string["exfat"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[exfat_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.exfat -n"])
syz_mount_image$cramfs(fs ptr[in, string["cramfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize, fsck["fsck.cramfs"])
syz_mount_image$romfs(fs ptr[in, string["romfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$efs(fs ptr[in, string["efs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$jffs2(fs ptr[in, string["jffs2"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[jffs2_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$nilfs2(fs ptr[in, string["nilfs2"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[nilfs2_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$squashfs(fs ptr[in, string["squashfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[squashfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$udf(fs ptr[in, string["udf"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[udf_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$bcachefs(fs ptr[in, string["bcachefs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[bcachefs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
# TODO: zonefs needs a zoned block device:
# https://elixir.bootlin.com/linux/v6.1-rc6/source/fs/zonefs/super.c#L1768
# So currnetly the mount always fails.
# These docs say such devices can be emulated with nullb, but need special setup:
# https://zonedstorage.io/docs/getting-started/zbd-emulation
# https://btrfs.wiki.kernel.org/index.php/Zoned
syz_mount_image$zonefs(fs ptr[in, string["zonefs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[zonefs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
# TODO: ubifs needs a special ubi device:
# https://elixir.bootlin.com/linux/v6.1-rc6/source/fs/ubifs/super.c#L2063
# So currnetly the mount always fails.
syz_mount_image$ubifs(fs ptr[in, string["ubifs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[ubifs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
# TODO: add mount options for the following file systems.
syz_mount_image$adfs(fs ptr[in, string["adfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[adfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$affs(fs ptr[in, string["affs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[affs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$befs(fs ptr[in, string["befs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$vxfs(fs ptr[in, string["vxfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[vxfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$omfs(fs ptr[in, string["omfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[omfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$hpfs(fs ptr[in, string["hpfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[hpfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$qnx4(fs ptr[in, string["qnx4"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$qnx6(fs ptr[in, string["qnx6"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[qnx6_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$sysv(fs ptr[in, string["sysv"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$ufs(fs ptr[in, string["ufs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[ufs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$gfs2meta(fs ptr[in, string["gfs2meta"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
syz_mount_image$v7(fs ptr[in, string["v7"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[stringnoz]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
# Note: tmpfs does not need an image, but we use this in tests.
syz_mount_image$tmpfs(fs ptr[in, string["tmpfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[tmpfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir (timeout[SYZ_MOUNT_IMAGE_TIMEOUT], no_generate, no_minimize)
type fs_options[ELEMS] {
elems array[fs_opt_elem[ELEMS]]
common array[fs_opt_elem[fs_options_common]]
null const[0, int8]
} [packed]
type fs_opt_elem[ELEMS] {
elem ELEMS
comma const[',', int8]
} [packed]
type fs_opt[NAME, TYPE] {
name stringnoz[NAME]
eq const['=', int8]
val TYPE
} [packed]
type fs_opt_nodelim[NAME, TYPE] {
name stringnoz[NAME]
val TYPE
} [packed]
type fs_opt_str[NAME] fs_opt[NAME, stringnoz]
type fs_opt_dec[NAME, VAL] fs_opt[NAME, fmt[dec, VAL]]
type fs_opt_hex[NAME, VAL] fs_opt[NAME, fmt[hex, VAL]]
type fs_opt_oct[NAME, VAL] fs_opt[NAME, fmt[oct, VAL]]
type fs_opt_dec_suffix[NAME] fs_opt[NAME, array[flags[fs_opt_digits_suffix, int8]]]
type fs_opt_filename[NAME] fs_opt[NAME, stringnoz[filename]]
type fs_opt_codepage[NAME] fs_opt[NAME, stringnoz[codepages_names]]
type fs_opt_cp_num[NAME] fs_opt[NAME, stringnoz[codepage_nums]]
fs_opt_digits_suffix = '-', 'x', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'k', 'm', 'g', 't', 'p', 'e', '%'
fs_options_common [
flag stringnoz[fsconfig_flag_params]
# SELinux options:
context fs_opt["context", stringnoz[selinux_user_context]]
fscontext fs_opt["fscontext", stringnoz[selinux_user_context]]
rootcontext fs_opt["rootcontext", stringnoz[selinux_user_context]]
defcontext fs_opt["defcontext", stringnoz[selinux_user_context]]
seclabel stringnoz["seclabel"]
# Smack options:
smackfsdef fs_opt_str["smackfsdef"]
smackfsfloor fs_opt_str["smackfsfloor"]
smackfshat fs_opt_str["smackfshat"]
smackfsroot fs_opt_str["smackfsroot"]
smackfstransmute fs_opt_str["smackfstransmute"]
# IMA options:
measure stringnoz["measure"]
dont_measure stringnoz["dont_measure"]
appraise stringnoz["appraise"]
dont_appraise stringnoz["dont_appraise"]
audit stringnoz["audit"]
hash stringnoz["hash"]
dont_hash stringnoz["dont_hash"]
permit_directio stringnoz["permit_directio"]
obj_user fs_opt_str["obj_user"]
obj_role fs_opt_str["obj_role"]
obj_type fs_opt_str["obj_type"]
subj_user fs_opt_str["subj_user"]
subj_role fs_opt_str["subj_role"]
subj_type fs_opt_str["subj_type"]
func fs_opt["func", stringnoz[ima_funcs]]
mask fs_opt["mask", stringnoz[ima_masks]]
fsmagic fs_opt_hex["fsmagic", intptr]
fsname fs_opt_str["fsname"]
fsuuid fs_opt["fsuuid", uuid_str]
uid_eq fs_opt_dec["uid", uid]
euid_eq fs_opt_dec["euid", uid]
fowner_eq fs_opt_dec["fowner", uid]
uid_gt fs_opt_nodelim["uid>", fmt[dec, uid]]
euid_gt fs_opt_nodelim["euid>", fmt[dec, uid]]
fowner_gt fs_opt_nodelim["fowner>", fmt[dec, uid]]
uid_lt fs_opt_nodelim["uid<", fmt[dec, uid]]
euid_lt fs_opt_nodelim["euid<", fmt[dec, uid]]
fowner_lt fs_opt_nodelim["fowner<", fmt[dec, uid]]
appraise_type stringnoz["appraise_type=imasig"]
pcr fs_opt_dec["pcr", int64[0:64]]
] [varlen]
uuid_str {
p0 array[flags[hex_chars, int8], 8]
d0 const['-', int8]
p1 array[flags[hex_chars, int8], 4]
d1 const['-', int8]
p2 array[flags[hex_chars, int8], 4]
d2 const['-', int8]
p3 array[flags[hex_chars, int8], 4]
d3 const['-', int8]
p4 array[flags[hex_chars, int8], 8]
}
hex_chars = '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
ima_funcs = "FILE_CHECK", "PATH_CHECK", "MODULE_CHECK", "FIRMWARE_CHECK", "FILE_MMAP", "MMAP_CHECK", "BPRM_CHECK", "CREDS_CHECK", "KEXEC_KERNEL_CHECK", "KEXEC_INITRAMFS_CHECK", "POLICY_CHECK"
ima_masks = "MAY_EXEC", "MAY_WRITE", "MAY_READ", "MAY_APPEND", "^MAY_EXEC", "^MAY_WRITE", "^MAY_READ", "^MAY_APPEND"
msdos_options [
fat fat_options
nodots stringnoz["nodots"]
dots stringnoz["dots"]
] [varlen]
vfat_options [
fat fat_options
iocharset fs_opt_codepage["iocharset"]
rodir stringnoz["rodir"]
utf8no stringnoz["utf8=0"]
utf8 stringnoz["utf8=1"]
uni_xlateno stringnoz["uni_xlate=0"]
uni_xlate stringnoz["uni_xlate=1"]
numtail stringnoz["nonumtail=0"]
nonumtail stringnoz["nnonumtail=1"]
shortname_lower stringnoz["shortname=lower"]
shortname_win95 stringnoz["shortname=win95"]
shortname_winnt stringnoz["shortname=winnt"]
shortname_mixed stringnoz["shortname=mixed"]
] [varlen]
fat_options [
check_relaxed stringnoz["check=relaxed"]
check_strict stringnoz["check=strict"]
check_normal stringnoz["check=normal"]
usefree stringnoz["usefree"]
nocase stringnoz["nocase"]
quiet stringnoz["quiet"]
showexec stringnoz["showexec"]
debug stringnoz["debug"]
sys_immutable stringnoz["sys_immutable"]
flush stringnoz["flush"]
tz_utc stringnoz["tz=UTC"]
errors_continue stringnoz["errors=continue"]
errors_remount stringnoz["errors=remount-ro"]
discard stringnoz["discard"]
nfs stringnoz["nfs"]
nfs_nostale_ro stringnoz["nfs=nostale_ro"]
nfs_stale_rw stringnoz["nfs=stale_rw"]
dos1xfloppy stringnoz["dos1xfloppy"]
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
umask fs_opt_oct["umask", int32]
dmask fs_opt_oct["dmask", int32]
fmask fs_opt_oct["fmask", int32]
allow_utime fs_opt_oct["allow_utime", int32]
time_offset fs_opt_hex["time_offset", int32[-1440:1440]]
codepage fs_opt_cp_num["codepage"]
] [varlen]
xfs_options [
wsync stringnoz["wsync"]
noalign stringnoz["noalign"]
swalloc stringnoz["swalloc"]
nouuid stringnoz["nouuid"]
mtpt stringnoz["mtpt"]
grpid stringnoz["grpid"]
nogrpid stringnoz["nogrpid"]
bsdgroups stringnoz["bsdgroups"]
sysvgroups stringnoz["sysvgroups"]
norecovery stringnoz["norecovery"]
inode64 stringnoz["inode64"]
inode32 stringnoz["inode32"]
ikeep stringnoz["ikeep"]
noikeep stringnoz["noikeep"]
largeio stringnoz["largeio"]
nolargeio stringnoz["nolargeio"]
attr2 stringnoz["attr2"]
noattr2 stringnoz["noattr2"]
filestreams stringnoz["filestreams"]
quota stringnoz["quota"]
noquota stringnoz["noquota"]
lazytime stringnoz["lazytime"]
nolazytime stringnoz["nolazytime"]
usrquota stringnoz["usrquota"]
grpquota stringnoz["grpquota"]
prjquota stringnoz["prjquota"]
uquota stringnoz["uquota"]
gquota stringnoz["gquota"]
pquota stringnoz["pquota"]
uqnoenforce stringnoz["uqnoenforce"]
gqnoenforce stringnoz["gqnoenforce"]
pqnoenforce stringnoz["pqnoenforce"]
qnoenforce stringnoz["qnoenforce"]
discard stringnoz["discard"]
nodiscard stringnoz["nodiscard"]
dax stringnoz["dax"]
dax_inode stringnoz["dax=inode"]
dax_always stringnoz["dax=always"]
dax_never stringnoz["dax=never"]
barrier stringnoz["barrier"]
nobarrier stringnoz["nobarrier"]
logbufs fs_opt_dec["logbufs", int32[-1:8]]
biosize fs_opt_dec["biosize", int32]
sunit fs_opt_hex["sunit", int32]
swidth fs_opt_hex["swidth", int32]
logbsize fs_opt_dec_suffix["logbsize"]
allocsize fs_opt_dec_suffix["allocsize"]
logdev fs_opt_filename["logdev"]
rtdev fs_opt_filename["rtdev"]
] [varlen]
reiserfs_options [
tails_on stringnoz["tails=on"]
tails_off stringnoz["tails=off"]
tails_small stringnoz["tails=small"]
notail stringnoz["notail"]
conv stringnoz["conv"]
noattrs stringnoz["noattrs"]
expose_privroot stringnoz["expose_privroot"]
user_xattr stringnoz["user_xattr"]
nouser_xattr stringnoz["nouser_xattr"]
acl stringnoz["acl"]
noacl stringnoz["noacl"]
replayonly stringnoz["replayonly"]
nolargeio stringnoz["nolargeio"]
usrquota stringnoz["usrquota"]
grpquota stringnoz["grpquota"]
noquota stringnoz["noquota"]
usrjquota stringnoz["usrjquota"]
usrjquota_file stringnoz["usrjquota=syz"]
grpjquota stringnoz["grpjquota"]
commit fs_opt_hex["commit", int32]
resize fs_opt_hex["resize", int32]
resize_auto stringnoz["resize=auto"]
jdev fs_opt_filename["jdev"]
jqfmt_vfsold stringnoz["jqfmt=vfsold"]
jqfmt_vfsv0 stringnoz["jqfmt=vfsv0"]
hash_tea stringnoz["hash=tea"]
hash_rupasov stringnoz["hash=rupasov"]
hash_r5 stringnoz["hash=r5"]
balloc_noborder stringnoz["block-allocator=noborder"]
balloc_border stringnoz["block-allocator=border"]
balloc_no_unhash_reloc stringnoz["block-allocator=no_unhashed_relocation"]
balloc_hashed_reloc stringnoz["block-allocator=hashed_relocation"]
balloc_test4 stringnoz["block-allocator=test4"]
balloc_notest4 stringnoz["block-allocator=notest4"]
barrier_none stringnoz["barrier=none"]
barrier_flush stringnoz["barrier=flush"]
data_ordered stringnoz["data=ordered"]
data_journal stringnoz["data=journal"]
data_writeback stringnoz["data=writeback"]
errors_continue stringnoz["errors=continue"]
errors_ro_remount stringnoz["errors=ro-remount"]
] [varlen]
hfs_options [
quiet stringnoz["quiet"]
umask fs_opt_oct["umask", int32]
file_umask fs_opt_oct["file_umask", int32]
dir_umask fs_opt_oct["dir_umask", int32]
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
part fs_opt_hex["part", int32]
session fs_opt_hex["session", int32]
type fs_opt["type", array[int8, 4]]
creator fs_opt["creator", array[int8, 4]]
codepage fs_opt_codepage["codepage"]
iocharset fs_opt_codepage["iocharset"]
] [varlen]
hfsplus_options [
decompose stringnoz["decompose"]
nodecompose stringnoz["nodecompose"]
barrier stringnoz["barrier"]
nobarrier stringnoz["nobarrier"]
force stringnoz["force"]
umask fs_opt_oct["umask", int32]
type fs_opt["type", array[int8, 4]]
creator fs_opt["creator", array[int8, 4]]
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
part fs_opt_hex["part", int32]
session fs_opt_hex["session", int32]
nls fs_opt_codepage["nls"]
] [varlen]
iso9660_options [
norock stringnoz["norock"]
nojoliet stringnoz["nojoliet"]
unhide stringnoz["unhide"]
hide stringnoz["hide"]
showassoc stringnoz["showassoc"]
cruft stringnoz["cruft"]
utf8 stringnoz["utf8"]
map_acorn stringnoz["map=acorn"]
map_normal stringnoz["map=normal"]
map_off stringnoz["map=off"]
check_relaxed stringnoz["check=relaxed"]
check_strict stringnoz["check=strict"]
overriderock stringnoz["overriderockperm"]
nocompress stringnoz["nocompress"]
session fs_opt_hex["session", int32[0:98]]
sbsector fs_opt_hex["sbsector", int32]
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
mode fs_opt_hex["mode", int32]
dmode fs_opt_hex["dmode", int32]
block fs_opt_hex["block", flags[iso9660_blocks]]
iocharset fs_opt_codepage["iocharset"]
] [varlen]
iso9660_blocks = 512, 1024, 2048
# Note that the "debug" option has been omitted since it's equivalent to "errors=panic".
gfs2_options [
spectator stringnoz["spectator"]
norecovery stringnoz["norecovery"]
ignore_local_fs stringnoz["ignore_local_fs"]
localflocks stringnoz["localflocks"]
localcaching stringnoz["localcaching"]
nodebug stringnoz["nodebug"]
upgrade stringnoz["upgrade"]
acl stringnoz["acl"]
noacl stringnoz["noacl"]
quota_off stringnoz["quota=off"]
quota_account stringnoz["quota=account"]
quota_on stringnoz["quota=on"]
quota_quiet stringnoz["quota=quiet"]
quota stringnoz["quota"]
noquota stringnoz["noquota"]
suiddir stringnoz["suiddir"]
nosuiddir stringnoz["nosuiddir"]
data_writeback stringnoz["data=writeback"]
data_ordered stringnoz["data=ordered"]
meta stringnoz["meta"]
discard stringnoz["discard"]
nodiscard stringnoz["nodiscard"]
errors_withdraw stringnoz["errors=withdraw"]
barrier stringnoz["barrier"]
nobarrier stringnoz["nobarrier"]
rgrplvb stringnoz["rgrplvb"]
norgrplvb stringnoz["norgrplvb"]
loccookie stringnoz["loccookie"]
noloccookie stringnoz["noloccookie"]
commit fs_opt_hex["commit", int32]
statfs_quantum fs_opt_hex["statfs_quantum", int32]
statfs_percent fs_opt_hex["statfs_percent", int32]
quota_quantum fs_opt_hex["quota_quantum", int32]
lockproto_dlm stringnoz["lockproto=dlm"]
lockproto_nolock stringnoz["lockproto=lock_nolock"]
locktable fs_opt_str["locktable"]
hostdata fs_opt_str["hostdata"]
] [varlen]
jfs_options [
integrity stringnoz["integrity"]
nointegrity stringnoz["nointegrity"]
resize stringnoz["resize"]
noquota stringnoz["noquota"]
quota stringnoz["quota"]
usrquota stringnoz["usrquota"]
grpquota stringnoz["grpquota"]
discard stringnoz["discard"]
nodiscard stringnoz["nodiscard"]
iocharset fs_opt_codepage["iocharset"]
errors_continue stringnoz["errors=continue"]
errors_remount stringnoz["errors=remount-ro"]
resize_size fs_opt_hex["resize", int32]
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
umask fs_opt_hex["umask", int32]
discard_size fs_opt_hex["discard", int32]
] [varlen]
btrfs_options [
degraded stringnoz["degraded"]
nodatasum stringnoz["nodatasum"]
datasum stringnoz["datasum"]
nodatacow stringnoz["nodatacow"]
datacow stringnoz["datacow"]
nobarrier stringnoz["nobarrier"]
barrier stringnoz["barrier"]
compress stringnoz["compress"]
compress_force stringnoz["compress-force"]
ssd stringnoz["ssd"]
ssd_spread stringnoz["ssd_spread"]
nossd_spread stringnoz["nossd_spread"]
nossd stringnoz["nossd"]
acl stringnoz["acl"]
noacl stringnoz["noacl"]
notreelog stringnoz["notreelog"]
treelog stringnoz["treelog"]
flushoncommit stringnoz["flushoncommit"]
noflushoncommit stringnoz["noflushoncommit"]
discard stringnoz["discard"]
nodiscard stringnoz["nodiscard"]
discard_sync stringnoz["discard=sync"]
discard_async stringnoz["discard=async"]
fatal_errors_bug stringnoz["fatal_errors=bug"]
space_cache stringnoz["space_cache"]
clear_cache stringnoz["clear_cache"]
user_subvol_rm stringnoz["user_subvol_rm_allowed"]
enospc_debug stringnoz["enospc_debug"]
noenospc_debug stringnoz["noenospc_debug"]
autodefrag stringnoz["autodefrag"]
noautodefrag stringnoz["noautodefrag"]
inode_cache stringnoz["inode_cache"]
noinode_cache stringnoz["noinode_cache"]
nospace_cache stringnoz["nospace_cache"]
usebackuproot stringnoz["usebackuproot"]
skip_balance stringnoz["skip_balance"]
check_int stringnoz["check_int"]
check_int_data stringnoz["check_int_data"]
rescan_uuid_tree stringnoz["rescan_uuid_tree"]
fragment_data stringnoz["fragment=data"]
fragment_metadata stringnoz["fragment=metadata"]
fragment_all stringnoz["fragment=all"]
ref_verify stringnoz["ref_verify"]
metadata_ratio fs_opt_hex["metadata_ratio", int32]
check_int_print_mask fs_opt_hex["check_int_print_mask", int32]
commit fs_opt_hex["commit", int32]
thread_pool fs_opt_hex["thread_pool", int32]
device fs_opt_filename["device"]
subvolid fs_opt_hex["subvolid", int64]
subvol fs_opt_str["subvol"]
max_inline fs_opt_dec_suffix["max_inline"]
compress_algo fs_opt["compress", stringnoz[btrfs_compress_algos]]
compress_force_algo fs_opt["compress-force", stringnoz[btrfs_compress_algos]]
space_cache_v1 stringnoz["space_cache=v1"]
space_cache_v2 stringnoz["space_cache=v2"]
rescue fs_opt["rescue", stringnoz[btrfs_rescue_opts]]
] [varlen]
btrfs_compress_algos = "zlib", "lzo", "zstd", "no"
btrfs_rescue_opts = "usebackuproot", "nologreplay", "ignorebadroots", "ibadroots", "ignoredatacsums", "ignoremetacsums", "ignoresuperflags", "idatacsums", "imetacsums", "isuperflags", "all"
ntfs_options [
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
umask fs_opt_oct["umask", int32]
fmask fs_opt_oct["fmask", int32]
dmask fs_opt_oct["dmask", int32]
mft_zone_multiplier fs_opt_hex["mft_zone_multiplier", int32[-1:4]]
show_sys_files_no stringnoz["show_sys_files=no"]
show_sys_files_yes stringnoz["show_sys_files=yes"]
case_sensitive_no stringnoz["case_sensitive=no"]
case_sensitive_yes stringnoz["case_sensitive=yes"]
disable_sparse_no stringnoz["disable_sparse=no"]
disable_sparse_yes stringnoz["disable_sparse=yes"]
errors_remount stringnoz["errors=remount-ro"]
errors_continue stringnoz["errors=continue"]
errors_recover stringnoz["errors=recover"]
nls fs_opt_codepage["nls"]
utf8 stringnoz["utf8"]
] [varlen]
ntfs3_options [
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
umask fs_opt_oct["umask", int32]
fmask fs_opt_oct["fmask", int32]
dmask fs_opt_oct["dmask", int32]
noacsrules stringnoz["noacsrules"]
hidden stringnoz["hidden"]
nohidden stringnoz["nohidden"]
sys_immutable stringnoz["sys_immutable"]
nosys_immutable stringnoz["nosys_immutable"]
discard stringnoz["discard"]
nodiscard stringnoz["discard"]
force stringnoz["force"]
noforce stringnoz["noforce"]
sparse stringnoz["sparse"]
nosparse stringnoz["nosparse"]
hide_dot_files stringnoz["hide_dot_files"]
nohide_dot_files stringnoz["nohide_dot_files"]
windows_names stringnoz["windows_names"]
nowindows_names stringnoz["windows_names"]
showmeta stringnoz["showmeta"]
noshowmeta stringnoz["noshowmeta"]
prealloc stringnoz["prealloc"]
noprealloc stringnoz["noprealloc"]
acl stringnoz["acl"]
noacl stringnoz["noacl"]
iocharset fs_opt_codepage["iocharset"]
case stringnoz["case"]
nocase stringnoz["nocase"]
] [varlen]
ext4_options [
bsddf stringnoz["bsddf"]
minixdf stringnoz["minixdf"]
grpid stringnoz["grpid"]
bsdgroups stringnoz["bsdgroups"]
nogrpid stringnoz["nogrpid"]
sysvgroups stringnoz["sysvgroups"]
errors_continue stringnoz["errors=continue"]
errors_remount stringnoz["errors=remount-ro"]
nouid32 stringnoz["nouid32"]
debug stringnoz["debug"]
oldalloc stringnoz["oldalloc"]
orlov stringnoz["orlov"]
user_xattr stringnoz["user_xattr"]
nouser_xattr stringnoz["nouser_xattr"]
acl stringnoz["acl"]
noacl stringnoz["noacl"]
norecovery stringnoz["norecovery"]
noload stringnoz["noload"]
nobh stringnoz["nobh"]
bh stringnoz["bh"]
journal_checksum stringnoz["journal_checksum"]
nojournal_checksum stringnoz["nojournal_checksum"]
journal_async_commit stringnoz["journal_async_commit"]
abort stringnoz["abort"]
data_journal stringnoz["data=journal"]
data_ordered stringnoz["data=ordered"]
data_writeback stringnoz["data=writeback"]
data_err_abort stringnoz["data_err=abort"]
data_err_ignore stringnoz["data_err=ignore"]
usrjquota stringnoz["usrjquota="]
grpjquota stringnoz["grpjquota="]
jqfmt_vfsold stringnoz["jqfmt=vfsold"]
jqfmt_vfsv0 stringnoz["jqfmt=vfsv0"]
jqfmt_vfsv1 stringnoz["jqfmt=vfsv1"]
grpquota stringnoz["grpquota"]
noquota stringnoz["noquota"]
quota stringnoz["quota"]
usrquota stringnoz["usrquota"]
prjquota stringnoz["prjquota"]
barrier stringnoz["barrier"]
nobarrier stringnoz["nobarrier"]
i_version stringnoz["i_version"]
dax stringnoz["dax"]
dax_always stringnoz["dax=always"]
dax_inode stringnoz["dax=inode"]
dax_never stringnoz["dax=never"]
delalloc stringnoz["delalloc"]
lazytime stringnoz["lazytime"]
nolazytime stringnoz["nolazytime"]
nodelalloc stringnoz["nodelalloc"]
mblk_io_submit stringnoz["mblk_io_submit"]
nomblk_io_submit stringnoz["nomblk_io_submit"]
block_validity stringnoz["block_validity"]
noblock_validity stringnoz["noblock_validity"]
auto_da_alloc stringnoz["auto_da_alloc"]
noauto_da_alloc stringnoz["noauto_da_alloc"]
dioread_nolock stringnoz["dioread_nolock"]
nodioread_nolock stringnoz["nodioread_nolock"]
dioread_lock stringnoz["dioread_lock"]
discard stringnoz["discard"]
nodiscard stringnoz["nodiscard"]
init_itable stringnoz["init_itable"]
noinit_itable stringnoz["noinit_itable"]
test_dummy_encryption stringnoz["test_dummy_encryption"]
test_dummy_encryption_v1 stringnoz["test_dummy_encryption=v1"]
nombcache stringnoz["nombcache"]
inlinecrypt stringnoz["inlinecrypt"]
mb_optimize_scan fs_opt_hex["mb_optimize_scan", int32[0:1]]
resgid fs_opt_hex["resgid", gid]
resuid fs_opt_hex["resuid", uid]
sb fs_opt_hex["sb", int32]
commit fs_opt_hex["commit", int32]
min_batch_time fs_opt_hex["min_batch_time", int32]
max_batch_time fs_opt_hex["max_batch_time", int32]
journal_dev fs_opt_hex["journal_dev", int32]
barrier_val fs_opt_hex["barrier", int32]
stripe fs_opt_hex["stripe", int32]
debug_want_extra_isize fs_opt_hex["debug_want_extra_isize", int32]
inode_readahead_blks fs_opt_hex["inode_readahead_blks", flags[ext4_inode_readahead_blks]]
journal_ioprio fs_opt_hex["journal_ioprio", int32[0:7]]
auto_da_alloc_val fs_opt_hex["auto_da_alloc", int32]
init_itable_val fs_opt_hex["init_itable", int32]
max_dir_size_kb fs_opt_hex["max_dir_size_kb", int32]
journal_path fs_opt_filename["journal_path"]
grpjquota_path fs_opt_filename["grpjquota"]
usrjquota_path fs_opt_filename["usrjquota"]
] [varlen]
ext4_types = "ext4", "ext3", "ext2"
ext4_inode_readahead_blks = 0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000
f2fs_options [
background_gc_sync stringnoz["background_gc=sync"]
background_gc_off stringnoz["background_gc=off"]
background_gc_on stringnoz["background_gc=on"]
disable_roll_forward stringnoz["disable_roll_forward"]
norecovery stringnoz["norecovery"]
discard stringnoz["discard"]
nodiscard stringnoz["nodiscard"]
noheap stringnoz["no_heap"]
heap stringnoz["heap"]
user_xattr stringnoz["user_xattr"]
nouser_xattr stringnoz["nouser_xattr"]
acl stringnoz["acl"]
noacl stringnoz["noacl"]
six_active_logs stringnoz["active_logs=6"]
four_active_logs stringnoz["active_logs=4"]
two_active_logs stringnoz["active_logs=2"]
disable_ext_identify stringnoz["disable_ext_identify"]
inline_xattr stringnoz["inline_xattr"]
noinline_xattr stringnoz["noinline_xattr"]
inline_xattr_size fs_opt_hex["inline_xattr_size", int32]
inline_data stringnoz["inline_data"]
noinline_data stringnoz["noinline_data"]
inline_dentry stringnoz["inline_dentry"]
noinline_dentry stringnoz["noinline_dentry"]
flush_merge stringnoz["flush_merge"]
noflush_merge stringnoz["noflush_merge"]
barrier stringnoz["barrier"]
nobarrier stringnoz["nobarrier"]
fastboot stringnoz["fastboot"]
extent_cache stringnoz["extent_cache"]
noextent_cache stringnoz["noextent_cache"]
data_flush stringnoz["data_flush"]
reserve_root fs_opt_dec["reserver_root", int32]
adaptive_mode stringnoz["mode=adaptive"]
lfs_mode stringnoz["mode=lfs"]
segment_mode stringnoz["mode=fragment:segment"]
block_mode stringnoz["mode=fragment:block"]
io_bits fs_opt_dec["io_bits", int32[0:256]]
fault_injection fs_opt_dec["fault_injection", int32]
fault_type fs_opt_dec["fault_type", int32]
resgid fs_opt_hex["resgid", gid]
resuid fs_opt_hex["resuid", uid]
lazytime stringnoz["lazytime"]
nolazytime stringnoz["nolazytime"]
quota stringnoz["quota"]
noquota stringnoz["noquota"]
usrquota fs_opt_str["usrquota"]
grpquota fs_opt_str["grpquota"]
prjquota fs_opt_str["prjquota"]
usrjquota fs_opt_str["usrjquota"]
grpjquota fs_opt_str["grpjquota"]
prjjquota fs_opt_str["prjjquota"]
jqfmt_vfsold stringnoz["jqfmt=vfsold"]
jqfmt_vfsv0 stringnoz["jqfmt=vfsv0"]
jqfmt_vfsv1 stringnoz["jqfmt=vfsv1"]
whint_mode_user stringnoz["whint_mode=user-based"]
whint_mode_off stringnoz["whint_mode=off"]
whint_mode_fs stringnoz["whint_mode=fs-based"]
alloc_mode_def stringnoz["alloc_mode=default"]
alloc_mode_reuse stringnoz["alloc_mode=reuse"]
fsync_mode_posix stringnoz["fsync_mode=posix"]
fsync_mode_strict stringnoz["fsync_mode=strict"]
test_dummy_encryption stringnoz["test_dummy_encryption"]
test_dummy_encryption_v1 stringnoz["test_dummy_encryption=v1"]
errors_continue stringnoz["errors=continue"]
errors_remount stringnoz["errors=remount-ro"]
inlinecrypt stringnoz["inlinecrypt"]
checkpoint_diasble stringnoz["checkpoint=disable"]
checkpoint_enable stringnoz["checkpoint=enable"]
checkpoint_merge stringnoz["checkpoint=merge"]
nocheckpoint_merge stringnoz["nocheckpoint_merge"]
compress_chksum stringnoz["compress_chksum"]
compress_cache stringnoz["compress_cache"]
atgc stringnoz["atgc"]
gc_merge stringnoz["gc_merge"]
nogc_merge stringnoz["nogc_merge"]
discard_unit_block stringnoz["discard_unit=block"]
discard_unit_segment stringnoz["discard_unit=segment"]
discard_unit_section stringnoz["discard_unit=section"]
memory_normal stringnoz["memory=normal"]
memory_low stringnoz["memory=low"]
age_extent_cache stringnoz["age_extent_cache"]
] [varlen]
ocfs2_options [
barrier fs_opt_dec["barrier", int32]
err_ro stringnoz["errors=remount-ro"]
intr stringnoz["intr"]
nointr stringnoz["nointr"]
heartbeat_none stringnoz["heartbeat=none"]
heartbeat_local stringnoz["heartbeat=local"]
heartbeat_global stringnoz["heartbeat=global"]
data_ordered stringnoz["data=ordered"]
data_writeback stringnoz["data=writeback"]
atime_quantum fs_opt_dec["atime_quantum", int32]
preferred_slot fs_opt_dec["preferred_slot", int32]
commit fs_opt_dec["commit", int32]
localalloc fs_opt_dec["localalloc", int32]
localflocks stringnoz["localflocks"]
cluster_stack stringnoz["cluster_stack=o2cb"]
user_xattr stringnoz["user_xattr"]
nouser_xattr stringnoz["nouser_xattr"]
inode64 stringnoz["inode64"]
acl stringnoz["acl"]
noacl stringnoz["noacl"]
usrquota stringnoz["usrquota"]
grpquota stringnoz["grpquota"]
coherency_buffered stringnoz["coherency=buffered"]
coherency_full stringnoz["coherency=full"]
resv_level fs_opt_dec["resv_level", int32[0:9]]
dir_resv_level fs_opt_dec["dir_resv_level", int32[0:9]]
journal_async_commit stringnoz["journal_async_commit"]
err_cont stringnoz["errors=continue"]
] [varlen]
bpf_options [
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
mode fs_opt_oct["mode", int32]
] [varlen]
overlay_options [
lowerdir fs_opt_filename["lowerdir"]
upperdir fs_opt_filename["upperdir"]
workdir fs_opt_filename["workdir"]
redirect_dir_on stringnoz["redirect_dir=on"]
redirect_dir_off stringnoz["redirect_dir=off"]
redirect_dir_follow stringnoz["redirect_dir=follow"]
redirect_dir_nofollow stringnoz["redirect_dir=nofollow"]
default_permissions stringnoz["default_permissions"]
index_on stringnoz["index=on"]
index_off stringnoz["index=off"]
uuid_on stringnoz["uuid=on"]
uuid_off stringnoz["uuid=off"]
uuid_auto stringnoz["uuid=auto"]
uuid_null stringnoz["uuid=null"]
nfs_export_on stringnoz["nfs_export=on"]
nfs_export_off stringnoz["nfs_export=off"]
userxattr stringnoz["userxattr"]
xino_on stringnoz["xino=on"]
xino_off stringnoz["xino=off"]
xino_auto stringnoz["xino=auto"]
metacopy_on stringnoz["metacopy=on"]
metacopy_off stringnoz["metacopy=off"]
verity_on stringnoz["verity=on"]
verity_off stringnoz["verity=off"]
verity_require stringnoz["verity=require"]
volatile stringnoz["volatile"]
] [varlen]
binder_options [
max fs_opt_dec["max", int32[0:4]]
stats stringnoz["stats=global"]
] [varlen]
erofs_options [
user_xattr stringnoz["user_xattr"]
nouser_xattr stringnoz["nouser_xattr"]
acl stringnoz["acl"]
noacl stringnoz["noacl"]
fault_injection fs_opt_hex["fault_injection", int32]
cache_strategy_disabled stringnoz["cache_strategy=disabled"]
cache_strategy_readahead stringnoz["cache_strategy=readahead"]
cache_strategy_readaround stringnoz["cache_strategy=readaround"]
dax stringnoz["dax"]
dax_always stringnoz["dax=always"]
dax_never stringnoz["dax=never"]
] [varlen]
exfat_options [
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
umask fs_opt_oct["umask", int32]
dmask fs_opt_oct["dmask", int32]
fmask fs_opt_oct["fmask", int32]
allow_utime fs_opt_oct["allow_utime", int32]
codepage fs_opt_codepage["codepage"]
iocharset fs_opt_codepage["iocharset"]
namecase stringnoz["namecase=1"]
errors_remount stringnoz["errors=remount-ro"]
errors_continue stringnoz["errors=continue"]
utf8 stringnoz["utf8"]
discard stringnoz["discard"]
keep_last_dots stringnoz["keep_last_dots"]
sys_tz stringnoz["sys_tz"]
time_offset fs_opt_hex["time_offset", int32]
zero_size_dir stringnoz["zero_size_dir"]
] [varlen]
# TODO: afs should be configured via /proc/fs/afs/{cells,servers} (see fs/afs/proc.c).
# Without that mounting of afs will fail.
afs_source [
none string["none"]
cell afs_cell_source
] [varlen]
afs_cell_source {
prefix flags[afs_cell_prefix, int8]
cell stringnoz[afs_cells]
volname stringnoz[afs_volnames]
suffix stringnoz[afs_suffixes]
z const[0, int8]
} [packed]
afs_cell_prefix = '%', '#'
afs_cells = "", "syz0:", "syz1:"
afs_volnames = "syz0", "syz1"
afs_suffixes = "", ".readonly", ".backup"
afs_options [
autocell stringnoz["autocell"]
dyn stringnoz["dyn"]
flock_local stringnoz["flock=local"]
flock_openafs stringnoz["flock=openafs"]
flock_strict stringnoz["flock=strict"]
flock_write stringnoz["flock=write"]
] [varlen]
tmpfs_options [
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
mode fs_opt_oct["mode", int32]
nr_blocks fs_opt_dec_suffix["nr_blocks"]
nr_inodes fs_opt_dec_suffix["nr_inodes"]
size fs_opt_dec_suffix["size"]
huge_never stringnoz["huge=never"]
huge_always stringnoz["huge=always"]
huge_within_size stringnoz["huge=within_size"]
huge_advise stringnoz["huge=advise"]
mpol fs_opt["mpol", tmpfs_mpol]
inode32 stringnoz["inode32"]
inode64 stringnoz["indo64"]
noswap stringnoz["noswap"]
quota stringnoz["quota"]
usrquota stringnoz["usrquota"]
grpquota stringnoz["grpquota"]
usrquota_block_hardlimit fs_opt_dec_suffix["usrquota_block_hardlimit"]
usrquota_inode_hardlimit fs_opt_dec_suffix["usrquota_inode_hardlimit"]
grpquota_block_hardlimit fs_opt_dec_suffix["grpquota_block_hardlimit"]
grpquota_inode_hardlimit fs_opt_dec_suffix["grpquota_inode_hardlimit"]
] [varlen]
tmpfs_mpol {
policy stringnoz[tmpfs_mpol_policy]
flags stringnoz[tmpfs_mpol_flags]
nodes optional[tmpfs_mpol_nodes]
} [packed]
tmpfs_mpol_nodes {
colon const[':', int8]
nodes array[flags[tmpfs_mpol_node_chars, int8]]
}
tmpfs_mpol_policy = "default", "prefer", "bind", "interleave", "local"
tmpfs_mpol_flags = "", "=static", "=relative"
tmpfs_mpol_node_chars = '-', ':', '/', ',', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
zonefs_options [
errors_remount_ro stringnoz["errors=remount-ro"]
errors_zone_ro stringnoz["errors=zone-ro"]
errors_zone_offline stringnoz["errors=zone-offline"]
errors_repair stringnoz["errors=repair"]
explicit_open stringnoz["explicit-open"]
] [varlen]
jffs2_options [
compr_none stringnoz["compr=none"]
compr_lzo stringnoz["compr=lzo"]
compr_zlib stringnoz["compr=zlib"]
rp_size fs_opt_dec["rp_size", int32]
] [varlen]
nilfs2_options [
barrier stringnoz["barrier"]
nobarrier stringnoz["nobarrier"]
norecovery stringnoz["norecovery"]
discard stringnoz["discard"]
nodiscard stringnoz["nodiscard"]
snapshot fs_opt_hex["cp", int32[0:3]]
order_relaxed stringnoz["order=relaxed"]
order_strict stringnoz["order=strict"]
errors_continue stringnoz["errors=continue"]
errors_remount_ro stringnoz["errors=remount-ro"]
] [varlen]
squashfs_options [
errors stringnoz["errors=continue"]
threads_str fs_opt["threads", stringnoz[squashfs_thread]]
threads_num fs_opt_dec["threads", int32]
] [varlen]
squashfs_thread = "single", "multi", "percpu"
ubifs_options [
fast_unmount stringnoz["fast_unmount"]
norm_unmount stringnoz["norm_unmount"]
bulk_read stringnoz["bulk_read"]
no_bulk_read stringnoz["no_bulk_read"]
chk_data_crc stringnoz["chk_data_crc"]
no_chk_data_crc stringnoz["no_chk_data_crc"]
compr_none stringnoz["compr=none"]
compr_lzo stringnoz["compr=lzo"]
compr_zlib stringnoz["compr=zlib"]
compr_zstd stringnoz["compr=zstd"]
auth_key fs_opt_str["auth_key"]
auth_hash_name fs_opt["auth_hash_name", stringnoz[ubifs_auth_hash_name]]
] [varlen]
adfs_options [
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
ownmask fs_opt_oct["ownmask", int32]
othmask fs_opt_oct["othmask", int32]
ftsuffix fs_opt_dec["ftsuffix", int32]
] [varlen]
affs_options [
bs fs_opt_hex["bs", flags[affs_bs]]
mode fs_opt_oct["mode", int32]
mufs stringnoz["mufs"]
notruncate stringnoz["nofilenametruncate"]
protect stringnoz["protect"]
reserved fs_opt_dec["reserved", int32]
root fs_opt_dec["root", int32]
setuid fs_opt_hex["setuid", uid]
setgid fs_opt_hex["setgid", gid]
verbose stringnoz["verbose"]
] [varlen]
affs_bs = 512, 1024, 2048, 4096
vxfs_options [
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
iocharset fs_opt_codepage["iocharset"]
debug stringnoz["debug"]
] [varlen]
omfs_options [
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
umask fs_opt_oct["umask", int32]
dmask fs_opt_oct["dmask", int32]
fmask fs_opt_oct["fmask", int32]
] [varlen]
hpfs_options [
help stringnoz["help"]
uid fs_opt_hex["uid", uid]
gid fs_opt_hex["gid", gid]
umask fs_opt_oct["umask", int32]
case_lower stringnoz["case=lower"]
case_asis stringnoz["case=asis"]
check_none stringnoz["check=none"]
check_normal stringnoz["check=normal"]
check_strict stringnoz["check=strict"]
err_cont stringnoz["errors=continue"]
err_ro stringnoz["errors=remount-ro"]
eas_no stringnoz["eas=no"]
eas_ro stringnoz["ear=ro"]
eas_rw stringnoz["eas=rw"]
chkdsk_no stringnoz["chkdsk=no"]
chkdsk_errors stringnoz["chkdsk=errors"]
chkdsk_always stringnoz["chkdsk=always"]
timeshift fs_opt_dec["timeshift", int32]
] [varlen]
qnx6_options [
mmi_fs stringnoz["mmi_fs"]
] [varlen]
# We could use more hash names, but the problem is that alg_hash_name is 0-terminated.
ubifs_auth_hash_name = "crc32", "ghash", "md5", "sha1"
udf_options [
novrs stringnoz["novrs"]
nostrict stringnoz["nostrict"]
unhide stringnoz["unhide"]
undelete stringnoz["undelete"]
noadinicb stringnoz["noadinicb"]
adinicb stringnoz["adinicb"]
shortad stringnoz["shortad"]
longad stringnoz["longad"]
utf8 stringnoz["utf8"]
iocharset fs_opt_codepage["iocharset"]
uid_forget stringnoz["uid=forget"]
uid_ignore stringnoz["uid=ignore"]
gid_forget stringnoz["gid=forget"]
gid_ignore stringnoz["gid=ignore"]
gid fs_opt_dec["gid", gid]
uid fs_opt_dec["uid", uid]
umask fs_opt_oct["umask", int32]
mode fs_opt_oct["mode", int32]
dmode fs_opt_oct["dmode", int32]
bs fs_opt_dec["bs", int32]
session fs_opt_dec["session", int32]
lastblock fs_opt_dec["lastblock", int32]
anchor fs_opt_dec["anchor", int32]
volume fs_opt_dec["volume", int32]
partition fs_opt_dec["partition", int32]
fileset fs_opt_dec["fileset", int32]
rootdir fs_opt_dec["rootdir", int32]
] [varlen]
esdfs_options [
lower fs_opt_str["lower"]
upper fs_opt_str["upper"]
derive fs_opt["derive", stringnoz[esdfs_derive]]
confine stringnoz["confine"]
noconfine stringnoz["noconfine"]
derive_gid stringnoz["derive_gid"]
default_normal stringnoz["default_normal"]
dl_loc fs_opt_str["dl_loc"]
dl_uid fs_opt_oct["dl_uid", uid]
dl_gid fs_opt_oct["dl_gid", gid]
ns_fd fs_opt_oct["ns_fd", fd_namespace]
fsuid fs_opt_oct["fsuid", uid]
fsgid fs_opt_oct["fsgid", gid]
gid fs_opt_oct["gid", gid]
mask fs_opt_oct["mask", int32]
userid fs_opt_oct["userid", uid]
multiuser stringnoz["multiuser"]
] [varlen]
esdfs_derive = "none", "legacy", "unified", "multi", "public"
bcachefs_options [
metadata_checksum fs_opt["metadata_checksum", stringnoz[bcachefs_checksum]]
data_checksum fs_opt["data_checksum", stringnoz[bcachefs_checksum]]
compression fs_opt["compression", stringnoz[bcachefs_compression]]
background_compression fs_opt["background_compression", stringnoz[bcachefs_compression]]
str_hash fs_opt["str_hash", stringnoz[bcachefs_str_hash]]
nocow stringnoz["nocow"]
errors_continue stringnoz["errors=continue"]
errors_fix_safe stringnoz["errors=fix_safe"]
errors_ro stringnoz["error=ro"]
metadata_replicas fs_opt_hex["metadata_replicas", int32[1:4]]
data_replicas fs_opt_hex["data_replicas", int32[1:4]]
metadata_replicas_required fs_opt_hex["metadata_replicas_required", int32[1:4]]
data_replicas_required fs_opt_hex["data_replicas_required", int32[1:4]]
erasure_code stringnoz["erasure_code"]
inodes_32bit stringnoz["inodes_32bit"]
shared_inode_numbers stringnoz["shard_inode_numbers"]
inodes_use_key_cache stringnoz["inodes_use_key_cache"]
btree_node_mem_ptr_optimization stringnoz["btree_node_mem_ptr_optimization"]
gc_reserve_percent fs_opt_hex["gc_reserve_percent", int32[5:21]]
gc_reserve_bytes fs_opt_hex["gc_reserve_bytes", int32]
root_reserve_percent fs_opt_hex["root_reserve_percent", int32[0:100]]
wide_macs stringnoz["wide_macs"]
inline_data stringnoz["inline_data"]
acl stringnoz["acl"]
usrquota stringnoz["usrquota"]
grpquota stringnoz["grpquota"]
prjquota stringnoz["prjquota"]
degraded stringnoz["degraded"]
very_degraded stringnoz["very_degraded"]
no_splitbrain_check stringnoz["no_splitbrain_check"]
discard stringnoz["discard"]
verbose stringnoz["verbose"]
journal_flush_delay fs_opt_hex["journal_flush_delay", int32]
journal_flush_disabled stringnoz["journal_flush_disabled"]
journal_reclaim_delay fs_opt_hex["journal_reclaim_delay", int32]
move_bytes_in_flight fs_opt_hex["move_bytes_in_flight", int32]
move_ios_in_flight fs_opt_hex["move_ios_in_flight", int32[1:1024]]
fsck stringnoz["fsck"]
fsck_memory_usage_percent fs_opt_hex["fsck_memory_usage_percent", int32[20:70]]
fix_errors fs_opt["fix_errors", stringnoz[bcachefs_fix_errors]]
ratelimit_errors stringnoz["ratelimit_errors"]
nochanges stringnoz["nochanges"]
norecovery stringnoz["norecovery"]
recovery_pass_last fs_opt["recovery_pass_last", stringnoz[bcachefs_recovery_pass_last]]
journal_transaction_names stringnoz["journal_transaction_names"]
allocator_stuck_timeout fs_opt_hex["allocator_stuck_timeout", int16]
noexcl stringnoz["noexcl"]
direct_io stringnoz["direct_io"]
sb fs_opt_hex["sb", int32]
read_only stringnoz["read_only"]
reconstruct_alloc stringnoz["reconstruct_alloc"]
version_upgrade fs_opt["version_upgrade", stringnoz[bcachefs_version_upgrade]]
nocow_enabled stringnoz["nocow_enabled"]
no_data_io stringnoz["no_data_io"]
btree_node_prefetch stringnoz["btree_node_prefetch"]
] [varlen]
bcachefs_checksum = "none", "crc32c", "crc64", "xxhash"
bcachefs_compression = "none", "lz4", "gzip", "zstd"
bcachefs_str_hash = "crc32c", "crc64", "siphash"
bcachefs_fix_errors = "exit", "yes", "no", "ask"
bcachefs_version_upgrade = "compatible", "incompatible", "none"
bcachefs_recovery_pass_last = "scan_for_btree_nodes", "check_topology", "accounting_read", "alloc_read", "stripes_read", "initialize_subvolumes", "snapshots_read", "check_allocations", "trans_mark_dev_sbs", "fs_journal_alloc", "set_may_go_rw", "journal_replay", "check_alloc_info", "check_lrus", "check_btree_backpointers", "check_backpointers_to_extents", "check_extents_to_backpointers", "check_alloc_to_lru_refs", "fs_freespace_init", "bucket_gens_init", "reconstruct_snapshots", "check_snapshot_trees", "check_snapshots", "check_subvols", "check_subvol_children", "delete_dead_snapshots", "fs_upgrade_for_subvolumes", "check_inodes", "check_extents", "check_indirect_extents", "check_dirents", "check_xattrs", "check_root", "check_subvolume_structure", "check_directory_structure", "check_nlinks", "resume_logged_ops", "delete_dead_inodes", "fix_reflink_p", "set_fs_needs_rebalance"
cgroup_options [
all stringnoz["all"]
clone_children stringnoz["clone_children"]
cpuset_v2_mode stringnoz["cpuset_v2_mode"]
name fs_opt_str["name"]
none stringnoz["none"]
noprefix stringnoz["noprefix"]
release_agent fs_opt_filename["release_agent"]
xattr stringnoz["xattr"]
favordynmods stringnoz["favordynmods"]
nofavordynmods stringnoz["nofavordynmods"]
subsystem stringnoz[cgroup_subsystems]
] [varlen]
cgroup2_options [
nsdelegate stringnoz["nsdelegate"]
favordynmods stringnoz["favordynmods"]
memory_localevents stringnoz["memory_localevents"]
memory_recursiveprot stringnoz["memory_recursiveprot"]
memory_hugetlb_accounting stringnoz["memory_hugetlb_accounting"]
pids_localevents stringnoz["pids_localevents"]
subsystem stringnoz[cgroup_subsystems]
] [varlen]
ufs_options [
type fs_opt["type", stringnoz[ufs_type]]
onerror fs_opt["onerror", stringnoz[ufs_onerror]]
] [varlen]
ufs_type = "old", "sunx86", "sun", "sunos", "44bsd", "ufs2", "5xbsd", "hp", "nextstep-cd", "nextstep", "openstep"
ufs_onerror = "lock", "umount", "repair"
codepage_nums = "1250", "1251", "1255", "437", "737", "775", "850", "852", "855", "857", "860", "861", "862", "863", "864", "865", "866", "869", "874", "932", "936", "949", "950"
codepages_names = "macceltic", "maccenteuro", "maccroatian", "maccyrillic", "macgaelic", "macgreek", "maciceland", "macinuit", "macroman", "macromanian", "macturkish", "ascii", "default", "cp1250", "cp1251", "cp1255", "cp437", "cp737", "cp775", "cp850", "cp852", "cp855", "cp857", "cp860", "cp861", "cp862", "cp863", "cp864", "cp865", "cp866", "cp869", "cp874", "cp932", "cp936", "cp949", "cp950", "euc-jp", "iso8859-13", "iso8859-14", "iso8859-15", "iso8859-1", "iso8859-2", "iso8859-3", "iso8859-4", "iso8859-5", "iso8859-6", "iso8859-7", "iso8859-9", "koi8-r", "koi8-ru", "koi8-u", "utf8", "none"
mount_flags = MS_BIND, MS_DIRSYNC, MS_MANDLOCK, MS_MOVE, MS_NOATIME, MS_NODEV, MS_NODIRATIME, MS_NOEXEC, MS_NOSUID, MS_RDONLY, MS_RELATIME, MS_REMOUNT, MS_SILENT, MS_STRICTATIME, MS_SYNCHRONOUS, MS_REC, MS_POSIXACL, MS_UNBINDABLE, MS_PRIVATE, MS_SLAVE, MS_SHARED, MS_I_VERSION, MS_LAZYTIME
umount_flags = MNT_FORCE, MNT_DETACH, MNT_EXPIRE, UMOUNT_NOFOLLOW
file_getattr(dfd fd_dir[opt], filename ptr[in, filename], ufattr ptr[out, file_attr], usize len[ufattr], flags flags[at_flags])
file_setattr(dfd fd_dir[opt], filename ptr[in, filename], ufattr ptr[in, file_attr], usize len[ufattr], flags flags[at_flags])
file_attr {
fa_xflags flags[file_attr_flags, int64]
fa_extsize int32
fa_nextents int32
fa_projid int32
fa_cowextsize int32
}
file_attr_flags = FS_XFLAG_REALTIME, FS_XFLAG_PREALLOC, FS_XFLAG_IMMUTABLE, FS_XFLAG_APPEND, FS_XFLAG_SYNC, FS_XFLAG_NOATIME, FS_XFLAG_NODUMP, FS_XFLAG_RTINHERIT, FS_XFLAG_PROJINHERIT, FS_XFLAG_NOSYMLINKS, FS_XFLAG_EXTSIZE, FS_XFLAG_EXTSZINHERIT, FS_XFLAG_NODEFRAG, FS_XFLAG_FILESTREAM, FS_XFLAG_DAX, FS_XFLAG_COWEXTSIZE, FS_XFLAG_HASATTR
]
|
| 7/2 |
2026/05/19 15:55 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 41140
output: 46
thoughts: 255
Thoughts: **Analyzing a Deadlock in the JFS Filesystem**
Okay, so we're looking at a bug related to `syz_mount_image$jfs`. The core issue seems to be a deadlock. The stack traces suggest it's between `jfs_ip->commit_mutex` and `log->loglock`. We have CPU0 hitting a sequence that includes `jfs_umount`, `iput`, `write_inode_now`, `jfs_write_inode`, and finally `jfs_commit_inode`. CPU1, on the other hand, is running `jfs_unlink`, which leads to `txCommit`, `txLog`, `dtLog`, and `lmLog`.
So, the game plan is clear: we need to figure out how to trigger `jfs_unlink` on one CPU and `jfs_umount` on another CPU concurrently to expose this deadlock. The trace suggests that `jfs_umount` is happening when the JFS filesystem is unmounted. But the flow from `jfs_umount` is where it gets interesting. `jfs_umount` calls `iput`, which then calls `write_inode_now`, and that leads to `jfs_commit_inode`. This means that `jfs_commit_inode` *must* be taking that `jfs_ip->commit_mutex`. Hmm, but does `jfs_umount` lock `log->loglock` *before* it calls `iput`? That's the crux of the problem. That's the likely scenario. I'm going to look at the `jfs_umount` code in `fs/jfs/jfs_umount.c` to confirm this assumption and start to dig into the locking order.
|
| 8/2 |
2026/05/19 15:55 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_umount.c IncludeLines:true Name:jfs_umount]
Results: map[SourceCode: 27: /*
28: * NAME: jfs_umount(vfsp, flags, crp)
29: *
30: * FUNCTION: vfs_umount()
31: *
32: * PARAMETERS: vfsp - virtual file system pointer
33: * flags - unmount for shutdown
34: * crp - credential
35: *
36: * RETURN : EBUSY - device has open files
37: */
38: int jfs_umount(struct super_block *sb)
39: {
40: struct jfs_sb_info *sbi = JFS_SBI(sb);
41: struct inode *ipbmap = sbi->ipbmap;
42: struct inode *ipimap = sbi->ipimap;
43: struct inode *ipaimap = sbi->ipaimap;
44: struct inode *ipaimap2 = sbi->ipaimap2;
45: struct jfs_log *log;
46: int rc = 0;
47:
48: jfs_info("UnMount JFS: sb:0x%p", sb);
49:
50: /*
51: * update superblock and close log
52: *
53: * if mounted read-write and log based recovery was enabled
54: */
55: if ((log = sbi->log))
56: /*
57: * Wait for outstanding transactions to be written to log:
58: */
59: jfs_flush_journal(log, 2);
60:
61: /*
62: * Hold log lock so write_special_inodes (lmLogSync) cannot see
63: * this sbi with a NULL inode pointer while iterating log->sb_list.
64: */
65: if (log)
66: LOG_LOCK(log);
67: /*
68: * close fileset inode allocation map (aka fileset inode)
69: */
70: diUnmount(ipimap, 0);
71:
72: diFreeSpecial(ipimap);
73: sbi->ipimap = NULL;
74:
75: /*
76: * close secondary aggregate inode allocation map
77: */
78: if (ipaimap2) {
79: diUnmount(ipaimap2, 0);
80: diFreeSpecial(ipaimap2);
81: sbi->ipaimap2 = NULL;
82: }
83:
84: /*
85: * close aggregate inode allocation map
86: */
87: diUnmount(ipaimap, 0);
88: diFreeSpecial(ipaimap);
89: sbi->ipaimap = NULL;
90:
91: /*
92: * close aggregate block allocation map
93: */
94: dbUnmount(ipbmap, 0);
95:
96: diFreeSpecial(ipbmap);
97: sbi->ipbmap = NULL;
98:
99: /*
100: * Make sure all metadata makes it to disk before we mark
101: * the superblock as clean
102: */
103: filemap_write_and_wait(sbi->direct_inode->i_mapping);
104:
105: if (log)
106: LOG_UNLOCK(log);
107:
108: /*
109: * ensure all file system file pages are propagated to their
110: * home blocks on disk (and their in-memory buffer pages are
111: * invalidated) BEFORE updating file system superblock state
112: * (to signify file system is unmounted cleanly, and thus in
113: * consistent state) and log superblock active file system
114: * list (to signify skip logredo()).
115: */
116: if (log) { /* log = NULL if read-only mount */
117: updateSuper(sb, FM_CLEAN);
118:
119: /*
120: * close log:
121: *
122: * remove file system from log active file system list.
123: */
124: rc = lmLogClose(sb);
125: }
126: jfs_info("UnMount JFS Complete: rc = %d", rc);
127: return rc;
128: }
SourceFile:fs/jfs/jfs_umount.c]
|
| 9/2 |
2026/05/19 15:55 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 43153
output: 42
thoughts: 202
Thoughts: **Analyzing a Potential JFS Deadlock**
Okay, let's break this down. My initial observation is focused on a potential locking conflict within the JFS filesystem during an unmount operation. Specifically, I see that `jfs_umount` acquires `LOG_LOCK(log)` early on, at line 66. This seems standard for maintaining log consistency during an unmount.
Then, the critical sequence unfolds. `jfs_umount` calls `diFreeSpecial(ipimap)` at line 72. This function, in turn, ultimately calls `iput(ip)`. The chain continues: `iput` calls `iput_final`, which then calls `write_inode_now`. That's where things get interesting, `write_inode_now` calls `writeback_single_inode` which then calls `jfs_write_inode`. Finally, `jfs_write_inode` calls `jfs_commit_inode`. Crucially, `jfs_commit_inode` takes `mutex_lock(&jfs_ip->commit_mutex)`.
So, what we have is CPU0 holding `log->loglock` – likely to ensure atomic updates to the log – and then waiting for `jfs_ip->commit_mutex`. This is a potential point of contention.
Now, the context of a deadlock is crucial. We have CPU0 in this state, and, let's assume CPU1 is simultaneously executing `jfs_unlink`. Given the interaction, I need to understand how the `jfs_unlink` function itself interacts with these locks to determine if a circular dependency is possible. Therefore, I need to check `jfs_unlink` in `fs/jfs/namei.c`.
|
| 10/2 |
2026/05/19 15:55 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/namei.c IncludeLines:true Name:jfs_unlink]
Results: map[SourceCode: 444: /*
445: * NAME: jfs_unlink(dip, dentry)
446: *
447: * FUNCTION: remove a link to object <vp> named by <name>
448: * from parent directory <dvp>
449: *
450: * PARAMETER: dip - inode of parent directory
451: * dentry - dentry of object to be removed
452: *
453: * RETURN: errors from subroutines
454: *
455: * note:
456: * temporary file: if one or more processes have the file open
457: * when the last link is removed, the link will be removed before
458: * unlink() returns, but the removal of the file contents will be
459: * postponed until all references to the files are closed.
460: *
461: * JFS does NOT support unlink() on directories.
462: *
463: */
464: static int jfs_unlink(struct inode *dip, struct dentry *dentry)
465: {
466: int rc;
467: tid_t tid; /* transaction id */
468: struct inode *ip = d_inode(dentry);
469: ino_t ino;
470: struct component_name dname; /* object name */
471: struct inode *iplist[2];
472: struct tblock *tblk;
473: s64 new_size = 0;
474: int commit_flag;
475:
476: jfs_info("jfs_unlink: dip:0x%p name:%pd", dip, dentry);
477:
478: /* Init inode for quota operations. */
479: rc = dquot_initialize(dip);
480: if (rc)
481: goto out;
482: rc = dquot_initialize(ip);
483: if (rc)
484: goto out;
485:
486: if ((rc = get_UCSname(&dname, dentry)))
487: goto out;
488:
489: IWRITE_LOCK(ip, RDWRLOCK_NORMAL);
490:
491: tid = txBegin(dip->i_sb, 0);
492:
493: mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT);
494: mutex_lock_nested(&JFS_IP(ip)->commit_mutex, COMMIT_MUTEX_CHILD);
495:
496: iplist[0] = dip;
497: iplist[1] = ip;
498:
499: /*
500: * delete the entry of target file from parent directory
501: */
502: ino = ip->i_ino;
503: if ((rc = dtDelete(tid, dip, &dname, &ino, JFS_REMOVE))) {
504: jfs_err("jfs_unlink: dtDelete returned %d", rc);
505: if (rc == -EIO)
506: txAbort(tid, 1); /* Marks FS Dirty */
507: txEnd(tid);
508: mutex_unlock(&JFS_IP(ip)->commit_mutex);
509: mutex_unlock(&JFS_IP(dip)->commit_mutex);
510: IWRITE_UNLOCK(ip);
511: goto out1;
512: }
513:
514: ASSERT(ip->i_nlink);
515:
516: inode_set_mtime_to_ts(dip,
517: inode_set_ctime_to_ts(dip, inode_set_ctime_current(ip)));
518: mark_inode_dirty(dip);
519:
520: /* update target's inode */
521: inode_dec_link_count(ip);
522:
523: /*
524: * commit zero link count object
525: */
526: if (ip->i_nlink == 0) {
527: assert(!test_cflag(COMMIT_Nolink, ip));
528: /* free block resources */
529: if ((new_size = commitZeroLink(tid, ip)) < 0) {
530: txAbort(tid, 1); /* Marks FS Dirty */
531: txEnd(tid);
532: mutex_unlock(&JFS_IP(ip)->commit_mutex);
533: mutex_unlock(&JFS_IP(dip)->commit_mutex);
534: IWRITE_UNLOCK(ip);
535: rc = new_size;
536: goto out1;
537: }
538: tblk = tid_to_tblock(tid);
539: tblk->xflag |= COMMIT_DELETE;
540: tblk->u.ip = ip;
541: }
542:
543: /*
544: * Incomplete truncate of file data can
545: * result in timing problems unless we synchronously commit the
546: * transaction.
547: */
548: if (new_size)
549: commit_flag = COMMIT_SYNC;
550: else
551: commit_flag = 0;
552:
553: /*
554: * If xtTruncate was incomplete, commit synchronously to avoid
555: * timing complications
556: */
557: rc = txCommit(tid, 2, &iplist[0], commit_flag);
558:
559: txEnd(tid);
560:
561: mutex_unlock(&JFS_IP(ip)->commit_mutex);
562: mutex_unlock(&JFS_IP(dip)->commit_mutex);
563:
564: while (new_size && (rc == 0)) {
565: tid = txBegin(dip->i_sb, 0);
566: mutex_lock(&JFS_IP(ip)->commit_mutex);
567: new_size = xtTruncate_pmap(tid, ip, new_size);
568: if (new_size < 0) {
569: txAbort(tid, 1); /* Marks FS Dirty */
570: rc = new_size;
571: } else
572: rc = txCommit(tid, 2, &iplist[0], COMMIT_SYNC);
573: txEnd(tid);
574: mutex_unlock(&JFS_IP(ip)->commit_mutex);
575: }
576:
577: if (ip->i_nlink == 0)
578: set_cflag(COMMIT_Nolink, ip);
579:
580: IWRITE_UNLOCK(ip);
581:
582: /*
583: * Truncating the directory index table is not guaranteed. It
584: * may need to be done iteratively
585: */
586: if (test_cflag(COMMIT_Stale, dip)) {
587: if (dip->i_size > 1)
588: jfs_truncate_nolock(dip, 0);
589:
590: clear_cflag(COMMIT_Stale, dip);
591: }
592:
593: out1:
594: free_UCSname(&dname);
595: out:
596: jfs_info("jfs_unlink: rc:%d", rc);
597: return rc;
598: }
SourceFile:fs/jfs/namei.c]
|
| 11/2 |
2026/05/19 15:55 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 46054
output: 38
thoughts: 1169
Thoughts: **Analyzing a Potential JFS Filesystem Deadlock**
Okay, so I've been digging into this JFS issue, and it looks like a classic AB-BA deadlock scenario. Here's what's happening from my perspective:
I'm focusing on the `jfs_unlink` function. I see that it grabs `JFS_IP(dip)->commit_mutex` and then `JFS_IP(ip)->commit_mutex`. Eventually, this function calls `txCommit`, which, through a series of function calls (`txLog`, `dtLog`, `lmLog`), ultimately tries to acquire `log->loglock`.
Now, here's the kicker: I know that `jfs_ip->commit_mutex` and `log->loglock` can be held in the reverse order. Specifically, `umount` can grab `log->loglock`, then `jfs_ip->commit_mutex`. This creates the potential for a deadlock where one CPU holds the commit mutex and waits for the log lock, while another holds the log lock and waits for the commit mutex. This is bad.
To reproduce this, I figure the steps are: 1. Mount a JFS filesystem. 2. Create a file. 3. Concurrently: one thread `umount` the filesystem and the other thread `unlink` the file.
However, I immediately hit a snag. `umount` usually returns `EBUSY` if there are open files. But then I realize that `unlink` doesn't require the file itself to be open, just that its directory be open or accessed via a path. Still, if Thread B is unlinking, it has a reference to the dentry and inode. Thread A doing umount may check if the filesystem is busy.
I then start thinking about how `umount` works. It has to call `generic_shutdown_super`, which calls `shrink_dcache_for_umount`, which could potentially wait for references to be dropped. But wait, `umount` checks `sb->s_active`, which protects against exactly what I am thinking. If other references exist, it could return EBUSY.
Digging further, I see that the `jfs_umount` is reached via `generic_shutdown_super` -> `kill_block_super` -> `jfs_put_super` -> `jfs_umount`. This implies that `generic_shutdown_super` is only called when *the last* reference to the superblock is dropped. That means the `umount` system call drops the mount reference. It returns `EBUSY` if there are other references (like open files). If `generic_shutdown_super` *is* called, there are no active references to the superblock!
This is where it gets confusing! How can `jfs_unlink` be running concurrently with `generic_shutdown_super`? I would assume there's a reference. Looking at the stack traces helps clarify.
CPU1: `do_syscall_64` -> `__x64_sys_unlink` -> `filename_unlinkat` -> `vfs_unlink` -> `jfs_unlink`.
CPU0: `task_work_run` -> `cleanup_mnt` -> `deactivate_super` -> `kill_block_super` -> `jfs_put_super` -> `jfs_umount`
I see `cleanup_mnt` is asynchronous after the last mount reference is dropped. So if `unlink` is running, it must hold a reference to the mount, right?
Then I remember that `filename_unlinkat` calls `user_path_parent`, which gets a reference to the mount and the dentry. It then calls `vfs_unlink`, and *then* drops the reference.
This is a key point: if `unlink` drops the reference, and it was the LAST reference to the mount, then `cleanup_mnt` is scheduled. But, `unlink` hasn't finished calling `vfs_unlink` yet, so `cleanup_mnt` for the SAME superblock should not be running.
Wait... could CPU0 be unmounting a DIFFERENT mount of the same superblock, like a bind mount? But `deactivate_super` is only called when the LAST mount of the superblock is dropped, AND there are no other active references (open files).
I then check `sb->s_active` which is an atomic counter. `deactivate_super` decrements it. If it reaches 0, it calls `kill_block_super`. I also remember that `filename_unlinkat` calls `mnt_want_write` which increments `sb->s_writers`, which is important for writers (not active references).
Now I remember that `user_
|
| 12/2 |
2026/05/19 15:55 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/super.c IncludeLines:true Name:deactivate_super]
Results: map[SourceCode: 497: /**
498: * deactivate_super - drop an active reference to superblock
499: * @s: superblock to deactivate
500: *
501: * Variant of deactivate_locked_super(), except that superblock is *not*
502: * locked by caller. If we are going to drop the final active reference,
503: * lock will be acquired prior to that.
504: */
505: void deactivate_super(struct super_block *s)
506: {
507: if (!atomic_add_unless(&s->s_active, -1, 1)) {
508: __super_lock_excl(s);
509: deactivate_locked_super(s);
510: }
511: }
SourceFile:fs/super.c]
|
| 13/2 |
2026/05/19 15:55 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 48545
output: 20
thoughts: 754
Thoughts: **Analyzing a Potential JFS Lockdep Deadlock**
Okay, let's break this down. My initial thought is, based on the lockdep report, that we're seeing a potential deadlock in JFS. Specifically, the report flags dependencies involving `jfs_ip->commit_mutex` and `log->loglock`.
First, if `s->s_active` is 1, a superblock is considered active, and it locks the super and calls `deactivate_locked_super`, which decrements `s_active` and calls `kill_sb`. So, if CPU1 is executing `jfs_unlink`, it *must* hold some reference to the superblock, specifically via `s_active`. The question then becomes, can CPU0 be unmounting a *different* superblock?
My initial thought was that CPU0 might be unmounting `sb1` while CPU1 is unlinking in `sb2`. However, the lockdep report shows this dependency: `&jfs_ip->commit_mutex` --> `&jfs_ip->commit_mutex/1` --> `&(log)->loglock`. I need to consider if these are different superblocks, but might share the same `log`. This is where JFS's external journal comes into play. Does JFS even support sharing the journal this way? If it does, then the deadlock scenario is possible.
Now, `jfs_umount` takes `log->loglock`. If two JFS filesystems share a log, then `log->loglock` is shared! Wait, does JFS even allow different superblocks sharing the same log? My current understanding is that it doesn't.
But then, the lockdep analysis works on *lock classes*. The relevant lock class here is `&(log)->loglock`. Even if different superblocks and different logs are involved, lockdep considers *all* instances of `log->loglock` as the same class, and similarly for the `commit_mutex` instances. Thus, even if CPU0 is doing `umount(sb1)` and CPU1 is doing `unlink(sb2)`, lockdep will still flag a dependency.
But wait! If CPU0 is doing `umount(sb1)`, it acquires `log1->loglock`, and then `iput` is called, which goes through `jfs_commit_inode` to acquire `jfs_ip1->commit_mutex`. This establishes the dependency: `loglock` -> `commit_mutex`.
Meanwhile, if CPU1 is doing `unlink(sb2)`, it first acquires `jfs_ip2->commit_mutex`, and then `txCommit` acquires `log2->loglock`. This establishes the dependency: `commit_mutex` -> `loglock`.
Lockdep sees this and flags a potential deadlock! It doesn't know the superblocks are different, or it's assuming the scenario *could* happen on the same superblock (which is impossible because of `s_active`), OR it's a real deadlock if they CAN be the same `sb`.
Crucially, can `iput` be called from `jfs_umount` for the *same* superblock while another thread is executing `unlink`? No, because `jfs_umount` is only called when `s_active` reaches 0. However, can `iput` be called from *somewhere else* while holding `log->loglock`? This is the core question. Looking at `jfs_umount`, I see that it calls `diFreeSpecial(ipimap)`, which *does* call `iput(ip)`. Is there any other code path that holds `log->loglock` and *also* calls `iput`? I need to search for that. I'll search for uses of `LOG_LOCK` in conjunction with `iput` to definitively answer this question.
|
| 14/2 |
2026/05/19 15:55 |
tool |
grepper |
0m
Error:
Args: map[Expression:LOG_LOCK.*iput]
Results:
|
| 15/2 |
2026/05/19 15:56 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 50161
output: 43
thoughts: 611
Thoughts: **Lockdep Investigation: JFS Filesystem Deadlock**
Okay, let's re-examine `jfs_umount`. The code shows it acquires `log->loglock` and then calls `diUnmount`, which eventually calls `iput`. This implies a lock order of `loglock` -> `commit_mutex`.
Now, looking at `jfs_unlink`, I see that it grabs `commit_mutex` *before* calling `txCommit`. `txCommit` then ends up calling `lmLog`, which *also* takes `log->loglock`. This creates a `commit_mutex` -> `loglock` dependency.
Ah, so the lockdep warning is likely triggered simply by executing `jfs_umount` and `jfs_unlink` (or anything that hits `txCommit` while holding `commit_mutex`) at any point during the boot process. Lockdep remembers these dependencies, so we don't even need concurrent execution!
Therefore, the reproducer should be straightforward:
1. Mount a JFS filesystem.
2. Create a file.
3. Unlink the file. (This should establish the `commit_mutex` -> `loglock` dependency)
4. Unmount the JFS filesystem. (This should establish the `loglock` -> `commit_mutex` dependency)
With these steps in the correct order, lockdep should flag the circular dependency.
So, this simple code should do the trick:
```c
mount("jfs", ...);
open("file", O_CREAT);
unlink("file");
umount("jfs");
```
But wait, I need to make sure that the `ipimap` inode is dirty. `jfs_umount` calls `iput` on `ipimap` (the inode allocation map), which calls `iput_final` and then `jfs_commit_inode` ONLY if the inode is dirty. Creating and unlinking a file should allocate and free an inode, which modifies `ipimap`. So `ipimap` should be dirty during unmount. This means that when `jfs_umount` is called, it calls `diUnmount(ipimap, 0)`, which might actually flush this dirty state? We will need to check `diUnmount` to verify, but the theory stands.
|
| 16/2 |
2026/05/19 15:56 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_imap.c IncludeLines:true Name:diUnmount]
Results: map[SourceCode: 162: /*
163: * NAME: diUnmount()
164: *
165: * FUNCTION: write to disk the incore inode map control structures for
166: * a fileset or aggregate at unmount time.
167: *
168: * PARAMETERS:
169: * ipimap - pointer to inode map inode for the aggregate or fileset.
170: *
171: * RETURN VALUES:
172: * 0 - success
173: * -ENOMEM - insufficient free virtual memory.
174: * -EIO - i/o error.
175: */
176: int diUnmount(struct inode *ipimap, int mounterror)
177: {
178: struct inomap *imap = JFS_IP(ipimap)->i_imap;
179:
180: /*
181: * update the on-disk inode map control structure
182: */
183:
184: if (!(mounterror || isReadOnly(ipimap)))
185: diSync(ipimap);
186:
187: /*
188: * Invalidate the page cache buffers
189: */
190: truncate_inode_pages(ipimap->i_mapping, 0);
191:
192: /*
193: * free in-memory control structure
194: */
195: kfree(imap);
196: JFS_IP(ipimap)->i_imap = NULL;
197:
198: return (0);
199: }
SourceFile:fs/jfs/jfs_imap.c]
|
| 17/2 |
2026/05/19 15:56 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 51839
output: 42
thoughts: 23
Thoughts: Here's my thought process, as it relates to this code snippet:
**Debugging the Unmount Process**
Okay, so I'm tracing through this unmount logic. `diUnmount` is the function that's being called, and I see it immediately kicks off `diSync` with `ipimap` as its argument. Right, so `diSync` is clearly the critical piece here. I need to understand what it's doing during the unmount operation. I'm going to dig into `diSync` to see what it's all about. Let's see what's happening.
|
| 18/2 |
2026/05/19 15:56 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_imap.c IncludeLines:true Name:diSync]
Results: map[SourceCode: 202: /*
203: * diSync()
204: */
205: int diSync(struct inode *ipimap)
206: {
207: struct dinomap_disk *dinom_le;
208: struct inomap *imp = JFS_IP(ipimap)->i_imap;
209: struct metapage *mp;
210: int index;
211:
212: /*
213: * write imap global conrol page
214: */
215: /* read the on-disk inode map control structure */
216: mp = get_metapage(ipimap,
217: IMAPBLKNO << JFS_SBI(ipimap->i_sb)->l2nbperpage,
218: PSIZE, 0);
219: if (mp == NULL) {
220: jfs_err("diSync: get_metapage failed!");
221: return -EIO;
222: }
223:
224: /* copy the in-memory version to the on-disk version */
225: dinom_le = (struct dinomap_disk *) mp->data;
226: dinom_le->in_freeiag = cpu_to_le32(imp->im_freeiag);
227: dinom_le->in_nextiag = cpu_to_le32(imp->im_nextiag);
228: dinom_le->in_numinos = cpu_to_le32(atomic_read(&imp->im_numinos));
229: dinom_le->in_numfree = cpu_to_le32(atomic_read(&imp->im_numfree));
230: dinom_le->in_nbperiext = cpu_to_le32(imp->im_nbperiext);
231: dinom_le->in_l2nbperiext = cpu_to_le32(imp->im_l2nbperiext);
232: for (index = 0; index < MAXAG; index++) {
233: dinom_le->in_agctl[index].inofree =
234: cpu_to_le32(imp->im_agctl[index].inofree);
235: dinom_le->in_agctl[index].extfree =
236: cpu_to_le32(imp->im_agctl[index].extfree);
237: dinom_le->in_agctl[index].numinos =
238: cpu_to_le32(imp->im_agctl[index].numinos);
239: dinom_le->in_agctl[index].numfree =
240: cpu_to_le32(imp->im_agctl[index].numfree);
241: }
242:
243: /* write out the control structure */
244: write_metapage(mp);
245:
246: /*
247: * write out dirty pages of imap
248: */
249: filemap_write_and_wait(ipimap->i_mapping);
250:
251: diWriteSpecial(ipimap, 0);
252:
253: return (0);
254: }
SourceFile:fs/jfs/jfs_imap.c]
|
| 19/2 |
2026/05/19 15:56 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 53010
output: 43
thoughts: 27
Thoughts: Here's a summary of my thought process, as if I were the one thinking it:
**Tracing Down a Write Operation**
Okay, so `diSync` is calling `diWriteSpecial` with the `ipimap` and a zero value as arguments. That immediately piques my interest. It looks like we're writing something specific to the disk image. I need to understand what this `diWriteSpecial` function is doing. Let's dive into the code for `diWriteSpecial` and see what's happening under the hood, and determine the exact purpose of this write. We need to figure out what information is being written and to where, and why it's considered "special." I need to fully understand this operation within the larger context of the disk image management.
|
| 20/2 |
2026/05/19 15:56 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_imap.c IncludeLines:true Name:diWriteSpecial]
Results: map[SourceCode: 500: void diWriteSpecial(struct inode *ip, int secondary)
501: {
502: struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb);
503: uint address;
504: struct dinode *dp;
505: ino_t inum = ip->i_ino;
506: struct metapage *mp;
507:
508: if (secondary)
509: address = addressPXD(&sbi->ait2) >> sbi->l2nbperpage;
510: else
511: address = AITBL_OFF >> L2PSIZE;
512:
513: ASSERT(inum < INOSPEREXT);
514:
515: address += inum >> 3; /* 8 inodes per 4K page */
516:
517: /* read the page of fixed disk inode (AIT) in raw mode */
518: mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1);
519: if (mp == NULL) {
520: jfs_err("diWriteSpecial: failed to read aggregate inode extent!");
521: return;
522: }
523:
524: /* get the pointer to the disk inode of interest */
525: dp = (struct dinode *) (mp->data);
526: dp += inum % 8; /* 8 inodes per 4K page */
527:
528: /* copy on-disk inode to in-memory inode */
529: copy_to_dinode(dp, ip);
530: memcpy(&dp->di_xtroot, &JFS_IP(ip)->i_xtroot, 288);
531:
532: if (inum == FILESYSTEM_I)
533: dp->di_gengen = cpu_to_le32(sbi->gengen);
534:
535: /* write the page */
536: write_metapage(mp);
537: }
SourceFile:fs/jfs/jfs_imap.c]
|
| 21/2 |
2026/05/19 15:56 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 53881
output: 43
thoughts: 66
Thoughts: **Analyzing the Disk Unmount Sequence**
Okay, so I'm tracing the inode write process and how unmounting is handled. First, `diWriteSpecial` – that's the function that's responsible for getting the inode onto the disk, correct? Right. Now, I have to remember that `diUnmount` *doesn't* automatically trigger an `iput` call. That's a crucial point to keep in mind.
So, digging deeper into the JFS file system, `jfs_umount` calls `diUnmount` specifically with the `ipimap` argument and a zero value. After that, it calls `diFreeSpecial(ipimap)`. Now, the interesting part is what happens within `diFreeSpecial`. I need to understand that sequence more completely. I'll need to check the internals of `diFreeSpecial` to understand how the inodes are freed. Let me see what that reveals.
|
| 22/2 |
2026/05/19 15:56 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_imap.c IncludeLines:true Name:diFreeSpecial]
Results: map[SourceCode: 539: /*
540: * NAME: diFreeSpecial()
541: *
542: * FUNCTION: Free allocated space for special inode
543: */
544: void diFreeSpecial(struct inode *ip)
545: {
546: if (ip == NULL) {
547: jfs_err("diFreeSpecial called with NULL ip!");
548: return;
549: }
550: filemap_write_and_wait(ip->i_mapping);
551: truncate_inode_pages(ip->i_mapping, 0);
552: iput(ip);
553: }
SourceFile:fs/jfs/jfs_imap.c]
|
| 23/2 |
2026/05/19 15:56 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 54418
output: 42
thoughts: 748
Thoughts: **Analyzing a Potential Lockdep Issue in JFS Unmount**
Okay, so I've been tracing the lock acquisition sequence within the JFS file system, specifically around unmounting. It's clear that `diFreeSpecial` calls `iput(ip)`, which, if it's the last reference, triggers `iput_final`. This in turn calls `write_inode_now`, leading to `jfs_commit_inode`. Crucially, `jfs_commit_inode` takes the `jfs_ip->commit_mutex`. Now, the `jfs_umount` function also comes into play here, and it’s the key. `jfs_umount` *definitely* grabs `log->loglock` and *then* `jfs_ip->commit_mutex`.
So, the issue is potentially a lockdep problem. To reproduce this, I think all we need is a simple sequence: mount JFS, create a file, unlink that file, and then unmount JFS. Unlinking will call `jfs_unlink` which grabs `commit_mutex` and *then* `loglock`. Unmounting will call `jfs_umount` which grabs `loglock` and *then* `commit_mutex`.
Wait a minute... even if those operations happen sequentially, lockdep will still complain! It's tracking the *classes* of the locks. If one thread does the following sequence:
```
lock(commit_mutex);
lock(loglock);
unlock(loglock);
unlock(commit_mutex);
```
And another thread does the reverse:
```
lock(loglock);
lock(commit_mutex);
unlock(commit_mutex);
unlock(loglock);
```
Lockdep will flag a circular dependency, even if they never run concurrently. The bug report is helpful, too. It seems to show exactly this:
```
CPU0 CPU1
---- ----
lock(&(log)->loglock);
lock(&jfs_ip->commit_mutex/1);
lock(&(log)->loglock);
lock(&jfs_ip->commit_mutex);
```
That's just how lockdep illustrates the potential for deadlock, not necessarily a concurrent execution.
So, a very straightforward, *sequential* program should expose this: mount, create file, unlink, unmount.
Now, let's try to write a Syzkaller program to trigger this. I'm thinking of using `syz_mount_image$jfs` to mount a JFS image. I can use either an empty image or a valid one. I see that `syz_mount_image$jfs` will mount it, but I'll need to unmount it. `syz_mount_image` returns a directory fd. I can `fchdir` into it and do the file operations. The question is how to unmount it in Syzkaller! `syz_mount_image` doesn't seem to have a specific way to unmount. However, the executor *might* be unmounting it at the end of the test. Wait, if the executor unmounts at the end, it *will* trigger `jfs_umount`. Bingo! I should look at the implementation of `syz_mount_image` in `executor/common_linux.h` to confirm the executor's behavior.
|
| 24/2 |
2026/05/19 15:56 |
tool |
codesearch-definition-source |
0m
Error:
Args: map[ContextFile:executor/common_linux.h IncludeLines:true Name:syz_mount_image]
Results: map[SourceCode: SourceFile:]
|
| 25/2 |
2026/05/19 15:56 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 55962
output: 20
thoughts: 55
Thoughts: Okay, here's my take on those thoughts, framed as my own mental process, given my expertise:
**Diving into the `syz_mount_image` Mystery**
Alright, so `syz_mount_image`... that function call, I seem to recall it hanging out in `executor/common_linux.h`. But my spidey-sense is tingling – it could very well be a macro, or a conditionally compiled symbol, or perhaps even something completely different. I need to be precise. Time to dig in and verify. Let's see... I'll start by searching the header file itself. Need to confirm exactly *how* `syz_mount_image` is defined within `executor/common_linux.h`. Gotta make sure I'm dealing with the *real* deal here, not some preprocessor trickery.
|
| 26/2 |
2026/05/19 15:56 |
tool |
grepper |
0m
Error:
Args: map[Expression:syz_mount_image]
Results:
|
| 27/2 |
2026/05/19 15:56 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 56232
output: 17
thoughts: 51
Thoughts: **Locating the Implementation of `syz_mount_image`**
Okay, so I'm trying to figure out where exactly `syz_mount_image` is defined. My initial assumption is that it's probably somewhere in the `executor/` directory, likely in either a `.h` or `.c` file related to common Linux executor functions. It's a pretty standard naming convention. So, I should probably search for `mount_image` within that directory to pinpoint the exact location. That should quickly tell me if it's in `executor/common_linux.h` or maybe `executor/common_linux.c`, or possibly another file entirely, but `executor/` is definitely the place to start.
|
| 28/2 |
2026/05/19 15:56 |
tool |
grepper |
0m
Args: map[Expression:mount_image]
Results: map[Output:tools/testing/selftests/bpf/vmtest.sh=169=recompile_kernel()
--
tools/testing/selftests/bpf/vmtest.sh-179-
tools/testing/selftests/bpf/vmtest.sh:180:mount_image()
tools/testing/selftests/bpf/vmtest.sh-181-{
--
tools/testing/selftests/bpf/vmtest.sh-187-
tools/testing/selftests/bpf/vmtest.sh:188:unmount_image()
tools/testing/selftests/bpf/vmtest.sh-189-{
--
tools/testing/selftests/bpf/vmtest.sh=195=update_selftests()
--
tools/testing/selftests/bpf/vmtest.sh-203- # Mount the image and copy the selftests to the image.
tools/testing/selftests/bpf/vmtest.sh:204: mount_image
tools/testing/selftests/bpf/vmtest.sh-205- sudo rm -rf "${mount_dir}/root/bpf"
tools/testing/selftests/bpf/vmtest.sh-206- sudo cp -r "${selftests_dir}" "${mount_dir}/root"
tools/testing/selftests/bpf/vmtest.sh:207: unmount_image
tools/testing/selftests/bpf/vmtest.sh-208-}
--
tools/testing/selftests/bpf/vmtest.sh=210=update_init_script()
--
tools/testing/selftests/bpf/vmtest.sh-216-
tools/testing/selftests/bpf/vmtest.sh:217: mount_image
tools/testing/selftests/bpf/vmtest.sh-218-
--
tools/testing/selftests/bpf/vmtest.sh=245=EOF
--
tools/testing/selftests/bpf/vmtest.sh-249- sudo chmod a+x "${init_script}"
tools/testing/selftests/bpf/vmtest.sh:250: unmount_image
tools/testing/selftests/bpf/vmtest.sh-251-}
--
tools/testing/selftests/bpf/vmtest.sh=253=create_vm_image()
--
tools/testing/selftests/bpf/vmtest.sh-264-
tools/testing/selftests/bpf/vmtest.sh:265: mount_image
tools/testing/selftests/bpf/vmtest.sh-266- load_rootfs "${mount_dir}"
tools/testing/selftests/bpf/vmtest.sh:267: unmount_image
tools/testing/selftests/bpf/vmtest.sh-268-}
--
tools/testing/selftests/bpf/vmtest.sh=300=copy_logs()
--
tools/testing/selftests/bpf/vmtest.sh-305-
tools/testing/selftests/bpf/vmtest.sh:306: mount_image
tools/testing/selftests/bpf/vmtest.sh-307- sudo cp ${log_file} "${OUTPUT_DIR}"
--
tools/testing/selftests/bpf/vmtest.sh-309- sudo rm -f ${log_file}
tools/testing/selftests/bpf/vmtest.sh:310: unmount_image
tools/testing/selftests/bpf/vmtest.sh-311-}
--
tools/testing/selftests/bpf/vmtest.sh=359=catch()
--
tools/testing/selftests/bpf/vmtest.sh-365- # clobber the error code we intend to return.
tools/testing/selftests/bpf/vmtest.sh:366: unmount_image || true
tools/testing/selftests/bpf/vmtest.sh-367- if [[ -f "${exit_status_file}" ]]; then
--
tools/testing/selftests/filesystems/fat/run_fat_tests.sh=19=cleanup()
tools/testing/selftests/filesystems/fat/run_fat_tests.sh-20-{
tools/testing/selftests/filesystems/fat/run_fat_tests.sh:21: mountpoint -q "${MNT_PATH}" && unmount_image
tools/testing/selftests/filesystems/fat/run_fat_tests.sh-22- rm -rf "${TMP_DIR}"
--
tools/testing/selftests/filesystems/fat/run_fat_tests.sh=26=create_loopback()
--
tools/testing/selftests/filesystems/fat/run_fat_tests.sh-34-
tools/testing/selftests/filesystems/fat/run_fat_tests.sh:35:mount_image()
tools/testing/selftests/filesystems/fat/run_fat_tests.sh-36-{
--
tools/testing/selftests/filesystems/fat/run_fat_tests.sh=55=rename_exchange_subdir_test()
--
tools/testing/selftests/filesystems/fat/run_fat_tests.sh-70-
tools/testing/selftests/filesystems/fat/run_fat_tests.sh:71:unmount_image()
tools/testing/selftests/filesystems/fat/run_fat_tests.sh-72-{
--
tools/testing/selftests/filesystems/fat/run_fat_tests.sh=76=create_loopback
tools/testing/selftests/filesystems/fat/run_fat_tests.sh:77:mount_image
tools/testing/selftests/filesystems/fat/run_fat_tests.sh-78-rename_exchange_test
tools/testing/selftests/filesystems/fat/run_fat_tests.sh=79=rename_exchange_subdir_test
tools/testing/selftests/filesystems/fat/run_fat_tests.sh:80:unmount_image
tools/testing/selftests/filesystems/fat/run_fat_tests.sh-81-
]
|
| 29/2 |
2026/05/19 15:56 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 58054
output: 20
thoughts: 118
Thoughts: **My Line of Reasoning**
Okay, so I'm looking at how `syz_mount_image` is handled, and I vaguely recall seeing its implementation hanging around in `executor/common_linux.h`. But perhaps it's been renamed to something more descriptive, like `setup_mount_image` or something similar, and my memory is failing me. Let's just lean on the regular, tried-and-true `mount` syscall for now – seems simpler to implement. The plan is to create a loop device, format that bad boy as JFS, and then get it mounted.
Wait a second...I'm getting a flash of something now. Syzkaller... it has a `syz_mount_image$jfs` option. That's for when you're working with compressed images and getting them mounted. Shoot, let's just go back and double-check `executor/common_linux.h` and make absolutely sure I didn't miss something obvious about `syz_mount_image`. Gotta be thorough, especially when there are potentially built-in features to leverage.
|
| 30/2 |
2026/05/19 15:56 |
tool |
grepper |
0m
Error:
Args: map[Expression:syz_mount_image]
Results:
|
| 31/2 |
2026/05/19 15:56 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 58442
output: 19
thoughts: 1324
Thoughts: **Analyzing the JFS Bug Reproduction**
Okay, first things first, I need to get my bearings. I was initially looking in the kernel source tree, but the tools I need are for syzkaller, not the kernel itself. Right, focus!
So, `syz_mount_image` is a *pseudo*-syscall, specific to syzkaller. That's good; it means I can just use it directly in my syzkaller program. Great, I see the definition:
```
syz_mount_image$jfs(fs ptr[in, string["jfs"]], dir ptr[in, filename], flags flags[mount_flags], opts ptr[in, fs_options[jfs_options]], chdir bool8, size len[img], img ptr[in, compressed_image]) fd_dir
```
Hold on, it takes a *compressed* image. I don't have a compressed JFS image readily available. Can I get around this with a loop device and `mount`? Syzkaller does have `loop_filename` like `/dev/loop0`. But then I'd need to format it as JFS, and I can't just run `mkfs.jfs` from within a syzkaller program. This seems like a dead end.
Wait a second. The standard way to mount filesystems in syzkaller *is* `syz_mount_image`. And what if I pass an empty image? No, that won't work, JFS needs a valid superblock. Then the other option, `mount$loop` wouldn't work either.
Okay, let's step back and look at the bug report. It says: `"syz-executor/5628 is trying to acquire lock:"`. This is key. The fuzzer triggered the bug. The fuzzer must have used `syz_mount_image$jfs` with a *mutated* JFS image. But I don't need a perfectly *valid* JFS image, I just need *any* JFS image that will trigger this.
Syzkaller provides seed images for `syz_mount_image`. If I just use `syz_mount_image$jfs` in a reproducer, will syzkaller automatically use a seed image? Maybe, or can I set it to `AUTO`?
But, if I leave it as `AUTO` the default image will be an empty image, which will fail.
Ok, what if I pass specific, but invalid, values to the parameters of `syz_mount_image$jfs`?
I can't just write a reproducer that relies on the fuzzer providing a seed image. Reproducers need to be self-contained.
Ah, if I use `mount` with loop, I can create the JFS and mount.
But I still need the JFS image.
I could try to construct a minimal JFS image, but that's binary and complex. Is there a simple way?
Wait, the bug report again:
`"syz-executor/5628 is trying to acquire lock:"`
`jfs_umount`
This means it *successfully* mounted JFS! How did the fuzzer manage that? Using `syz_mount_image$jfs` with a compressed image.
If I'm writing a syz program, can I use `syz_mount_image$jfs` and just let syzkaller fill in the image? No, if I provide a syz program to `reproduce-crash`, it executes it as is. If the image is empty, it will fail to mount.
Can I use `mount` with `tmpfs`? No, the bug is in JFS, not the mount itself.
Is there a way to *get* a JFS image?
If I pass `0` for size and `0` for image pointer to `syz_mount_image`, what happens? Let's check syzkaller's behavior, does it default to a seed image in such cases?
No, syzkaller doesn't have default images built into the executor. The executor *receives* the image from the fuzzer.
Wait, the fuzzer has seed images in `sys/linux/fs_image.go` or similar. I don't have that source code here!
What about just using `mount` with an existing block device like `/dev/sda1`? No, the VM doesn't have a JFS partition.
Okay, I'm stuck. How do I write a filesystem reproducer *without* having the image?
Ah, right! Usually, syzkaller reproducers for filesystem bugs include the hex-encoded compressed
|
| 32/2 |
2026/05/19 15:57 |
tool |
grepper |
0m
Error:
Args: map[Expression:jfs.*\.img]
Results:
|
| 33/2 |
2026/05/19 15:57 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 60824
output: 19
thoughts: 17
Thoughts: Okay, here's my attempt at summarizing that thought process, tailored for an expert audience:
**Kernel Exploration: `mkfs.jfs` Inquiry**
Right, let's see. My initial thought is to dive into the kernel source directly, specifically targeting anything related to `mkfs.jfs`. I need to figure out the current state of JFS support, how it's implemented, and potentially, if there are any recent changes or ongoing development efforts I should be aware of. I'm assuming that a search like `mkfs.jfs` in the kernel source, or likely a broader search around JFS itself, will give me a good entry point. That should immediately flag where the filesystem-specific utilities interface with the kernel's JFS driver components. Perhaps there is a specific file or directory responsible for formatting and utility interaction. I can probably begin to understand its integration with the broader kernel filesystem infrastructure from there. This approach is a much quicker route to getting the lay of the land than blindly searching documentation, though I'll circle back to that after getting an overview.
|
| 34/2 |
2026/05/19 15:57 |
tool |
grepper |
0m
Args: map[Expression:mkfs\.jfs]
Results: map[Output:Documentation/process/changes.rst=264=The following utilities are available:
--
Documentation/process/changes.rst-268-
Documentation/process/changes.rst:269:- ``mkfs.jfs`` - create a JFS formatted partition.
Documentation/process/changes.rst-270-
--
Documentation/translations/it_IT/process/changes.rst=253=Sono disponibili i seguenti strumenti:
--
Documentation/translations/it_IT/process/changes.rst-257-
Documentation/translations/it_IT/process/changes.rst:258:- ``mkfs.jfs`` - crea una partizione formattata secondo JFS
Documentation/translations/it_IT/process/changes.rst-259-
--
Documentation/translations/pt_BR/process/changes.rst=266=utilitários estão disponíveis:
--
Documentation/translations/pt_BR/process/changes.rst-270-
Documentation/translations/pt_BR/process/changes.rst:271:- ``mkfs.jfs`` - cria uma partição formatada em JFS.
Documentation/translations/pt_BR/process/changes.rst-272-
]
|
| 35/2 |
2026/05/19 15:57 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 61382
output: 18
thoughts: 631
Thoughts: **My Syzkaller Debugging Process**
Okay, so I'm trying to figure out how to trigger this lockdep warning related to JFS. No pre-existing test images, so I'm thinking, does the `syz_mount_image` call, specifically the `jfs` variant, have a default image built-in? Let me quickly check the definition in `filesystem.txt`. Ah, right, `syz_mount_image` takes an image parameter... but what happens if I *don't* provide one?
Ah, right, it's a lockdep warning. That points to a locking order issue, and I need a way to reliably trigger the related umount and unlink calls within JFS. Since I need a JFS filesystem, how else could I create one, apart from using a pre-existing image? Then I realized, hey, I'm working with a VM. Can I run `mkfs.jfs` *inside* the VM, within the syzkaller context? The `reproduce-crash` tool runs the syz program within a VM environment. Could I somehow execute an external command like `mkfs.jfs` from a syz program?
Syzkaller does have pseudo-syscalls... wait, there's no `syz_execute_func` for arbitrary commands. Never mind. But wait, does the VM *actually* have `mkfs.jfs` installed? If so, I could potentially use `execve` to execute `/sbin/mkfs.jfs`! I need to be able to call `execve`! Let's examine if that is possible within a syz program.
Okay, here's a rough draft `execve` call. But there's an immediate roadblock. It hits me: the fuzzer is designed to isolate the environment, so arbitrary binary execution with `execve` wouldn't be allowed. Wait, am I wrong? Syzkaller programs *can* use `execve`! The catch is, the binary I call must actually exist within the VM!
This is where it gets interesting: does the syzkaller VM, specifically, include `mkfs.jfs`? Usually, the standard syzkaller images (like 'bullseye') have `jfsutils` installed. So I'll write a simple syz program to attempt using `execve` to run `/sbin/mkfs.jfs`. Hmm, but is `execve` even defined in `sys.txt`? Gotta check that.
|
| 36/2 |
2026/05/19 15:57 |
tool |
read-description |
0m
Args:
Results: map[Output:# Copyright 2015 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.
# Description of syscall arguments. See README.md for details.
include <linux/socket.h>
include <linux/ptrace.h>
include <linux/resource.h>
include <linux/stat.h>
include <linux/mman.h>
include <linux/time.h>
include <linux/mount.h>
include <linux/fs.h>
include <linux/eventpoll.h>
include <linux/signalfd.h>
include <linux/eventfd.h>
include <linux/timerfd.h>
include <linux/personality.h>
include <linux/wait.h>
include <linux/user.h>
include <linux/un.h>
include <linux/ioctl.h>
include <linux/fadvise.h>
include <linux/falloc.h>
include <linux/kexec.h>
include <linux/elf.h>
include <linux/fiemap.h>
include <linux/kd.h>
include <linux/vt.h>
include <linux/if_alg.h>
include <linux/nfc.h>
include <linux/sockios.h>
include <linux/net_tstamp.h>
include <linux/termios.h>
include <linux/fcntl.h>
include <linux/sched.h>
include <linux/mqueue.h>
include <linux/mempolicy.h>
include <linux/in.h>
include <linux/ip.h>
include <linux/tcp.h>
include <linux/udp.h>
include <linux/kcmp.h>
include <linux/nfs.h>
include <linux/syslog.h>
include <linux/exportfs.h>
include <linux/splice.h>
include <linux/filelock.h>
include <fs/overlayfs/overlayfs.h>
include <uapi/linux/memfd.h>
include <uapi/linux/module.h>
include <linux/ioprio.h>
include <linux/membarrier.h>
include <uapi/linux/kcov.h>
include <uapi/linux/membarrier.h>
include <uapi/linux/capability.h>
include <uapi/linux/seccomp.h>
include <uapi/linux/wait.h>
include <uapi/linux/watch_queue.h>
include <kernel/sched/sched.h>
include <uapi/linux/close_range.h>
include <uapi/linux/netfilter/xt_cgroup.h>
include <fs/smb/client/cifsglob.h>
include <xen/interface/io/xs_wire.h>
include <uapi/linux/prctl.h>
include <asm/prctl.h>
include <linux/reboot.h>
include <linux/swap.h>
resource fd[int32]: -1
resource fd_dir[fd]: AT_FDCWD
# alignptr/align32/align64/padto64 can be used when ABI uses int64/intptr to hold a smaller type.
# E.g. pid/uid stored as intptr/int64.
type alignptr[T] {
v T
} [align[PTR_SIZE]]
type align32[T] {
v T
} [align[4]]
type align64[T] {
v T
} [align[8]]
type padto32[T] {
v T
} [size[4]]
type padto64[T] {
v T
} [size[8]]
type signalno int32[0:65]
type signalnoptr intptr[0:65]
# syz_execute_func caused multiple problems:
# 1. First it lead to corpus explosion. The program used existing values in registers
# to pollute output area. We tried to zero registers (though, not reliably).
# 2. It lead to explosion again. The exact mechanics are unknown, here is one sample:
# syz_execute_func(&(0x7f0000000440)="f2af91930f0124eda133fa20430fbafce842f66188d0d4
# 430fc7f314c1ab5bf9e2f9660f3a0fae5e090000ba023c1fb63ac4817d73d74ec482310d46f44
# 9f216c863fa438036a91bdbae95aaaa420f383c02c401405c6bfd49d768d768f833fefbab6464
# 660f38323c8f26dbc1a1fe5ff6f6df0804f4c4efa59c0f01c4288ba6452e000054c4431d5cc100")
# 3. The code can also execute syscalls (and it is know to), but it's not subject to
# target.SanitizeCall. As the result it can do things that programs are not supposed to do.
# 4. Besides linux, corpus explosion also happens on freebsd and is clearly attributable
# to syz_execute_func based on corpus contents. Mechanics are also not known.
# It also did not cause finding of any new bugs (at least not that I know of).
# So it's disabled on all OSes until we figure out how to resolve all these problems.
syz_execute_func(text ptr[in, text[target]]) (disabled)
# Exclude /sys/power/state as reported in https://lkml.org/lkml/2021/5/27/653
openat$sysfs(fd const[AT_FDCWD], dir ptr[in, glob["/sys/**/*:-/sys/power/state"]], flags flags[open_flags], mode flags[open_mode]) fd
open(file ptr[in, filename], flags flags[open_flags], mode flags[open_mode]) fd (automatic_helper)
# Just so that we have something that creates fd_dir resources.
open$dir(file ptr[in, filename], flags flags[open_flags], mode flags[open_mode]) fd_dir (automatic_helper)
openat$dir(fd const[AT_FDCWD], file ptr[in, filename], flags flags[open_flags], mode flags[open_mode]) fd_dir (automatic_helper)
openat(fd fd_dir[opt], file ptr[in, filename], flags flags[open_flags], mode flags[open_mode]) fd
openat2$dir(fd const[AT_FDCWD], file ptr[in, filename], how ptr[in, open_how], size bytesize[how]) fd_dir (automatic_helper)
openat2(fd fd_dir[opt], file ptr[in, filename], how ptr[in, open_how], size bytesize[how]) fd
creat(file ptr[in, filename], mode flags[open_mode]) fd
close(fd fd)
read(fd fd, buf buffer[out], count len[buf])
pread64(fd fd, buf buffer[out], count len[buf], pos fileoff)
readv(fd fd, vec ptr[in, array[iovec_out]], vlen len[vec])
preadv(fd fd, vec ptr[in, array[iovec_out]], vlen len[vec], off_low int32, off_high int32)
preadv2(fd fd, vec ptr[in, array[iovec_out]], vlen len[vec], off_low int32, off_high int32, flags flags[rwf_flags])
write(fd fd, buf buffer[in], count len[buf])
pwrite64(fd fd, buf buffer[in], count len[buf], pos fileoff)
writev(fd fd, vec ptr[in, array[iovec_in]], vlen len[vec])
pwritev(fd fd, vec ptr[in, array[iovec_in]], vlen len[vec], off_low int32, off_high int32)
pwritev2(fd fd, vec ptr[in, array[iovec_in]], vlen len[vec], off_low int32, off_high int32, flags flags[rwf_flags])
# lseek can return negative offsets when the file has FMODE_UNSIGNED_OFFSET flag:
# https://elixir.bootlin.com/linux/v6.11-rc7/source/fs/read_write.c#L56
# It's unclear how it's then even possible to distinguish error from valid offset, but it's not our problem.
# We just have to ignore return values of lseek.
lseek(fd fd, offset fileoff, whence flags[seek_whence]) (ignore_return)
copy_file_range(fd_in fd, off_in ptr[inout, fileoff[int64], opt], fd_out fd, off_out ptr[inout, fileoff[int64], opt], len intptr, flags flags[copy_file_range_flags])
rwf_flags = RWF_DSYNC, RWF_HIPRI, RWF_SYNC, RWF_NOWAIT, RWF_APPEND
copy_file_range_flags = 0
dup(oldfd fd) fd
dup2(oldfd fd, newfd fd) fd
dup3(oldfd fd, newfd fd, flags flags[dup_flags]) fd
pipe(pipefd ptr[out, pipefd])
pipe2(pipefd ptr[out, pipefd], flags flags[pipe_flags])
tee(fdin fd, fdout fd, len intptr, f flags[splice_flags])
splice(fdin fd, offin ptr[in, fileoff[int64]], fdout fd, offout ptr[in, fileoff[int64]], len intptr, f flags[splice_flags])
vmsplice(fd fd, vec ptr[in, array[iovec_in]], vlen len[vec], f flags[splice_flags])
sendfile(fdout fd, fdin fd, off ptr[inout, fileoff[intptr], opt], count intptr)
sendfile64(fdout fd, fdin fd, off ptr[inout, fileoff[int64], opt], count intptr)
cachestat_range {
off fileoff[int64]
len int64
}
cachestat {
nr_cache int64
nr_dirty int64
nr_writeback int64
nr_evicted int64
nr_recently_evicted int64
}
stat(file ptr[in, filename], statbuf ptr[out, stat])
lstat(file ptr[in, filename], statbuf ptr[out, stat])
fstat(fd fd, statbuf ptr[out, stat])
newfstatat(dfd const[AT_FDCWD], file ptr[in, filename], statbuf ptr[out, stat], flag flags[statx_flags])
stat64(file ptr[in, filename], statbuf ptr[out, stat64])
lstat64(file ptr[in, filename], statbuf ptr[out, stat64])
fstat64(fd fd, statbuf ptr[out, stat64])
fstatat64(dfd const[AT_FDCWD], file ptr[in, filename], statbuf ptr[out, stat64], flag flags[statx_flags])
statx(fd fd_dir, file ptr[in, filename], flags flags[statx_flags], mask flags[statx_mask], statxbuf ptr[out, statx])
cachestat(fd fd, cstat_range ptr[in, cachestat_range], cstat ptr[out, cachestat], flags const[0])
poll(fds ptr[in, array[pollfd]], nfds len[fds], timeout int32)
ppoll(fds ptr[in, array[pollfd]], nfds len[fds], tsp ptr[in, timespec], sigmask ptr[in, sigset_t], size len[sigmask])
select(n len[inp], inp ptr[inout, fd_set], outp ptr[inout, fd_set], exp ptr[inout, fd_set], tvp ptr[inout, timeval])
pselect6(n len[inp], inp ptr[inout, fd_set], outp ptr[inout, fd_set], exp ptr[inout, fd_set], tvp ptr[inout, timespec], sig ptr[in, sigset_size])
resource fd_epoll[fd]
epoll_create(size int32) fd_epoll
epoll_create1(flags flags[epoll_flags]) fd_epoll
epoll_ctl$EPOLL_CTL_ADD(epfd fd_epoll, op const[EPOLL_CTL_ADD], fd fd, ev ptr[in, epoll_event])
epoll_ctl$EPOLL_CTL_MOD(epfd fd_epoll, op const[EPOLL_CTL_MOD], fd fd, ev ptr[in, epoll_event])
epoll_ctl$EPOLL_CTL_DEL(epfd fd_epoll, op const[EPOLL_CTL_DEL], fd fd)
epoll_wait(epfd fd_epoll, events ptr[out, array[epoll_event]], maxevents len[events], timeout int32)
epoll_pwait(epfd fd_epoll, events ptr[out, array[epoll_event]], maxevents len[events], timeout int32, sigmask ptr[in, sigset_t], size bytesize[sigmask])
epoll_pwait2(epfd fd_epoll, events ptr[out, array[epoll_event]], maxevents len[events], timeout ptr[in, timespec], sigmask ptr[in, sigset_t], size bytesize[sigmask])
resource fd_timer[fd]
signalfd(fd fd, mask ptr[in, sigset_t], size len[mask]) fd
signalfd4(fd fd, mask ptr[in, sigset_t], size len[mask], flags flags[signalfd_flags]) fd
timerfd_create(clockid flags[clock_type], flags flags[timerfd_create_flags]) fd_timer
timerfd_settime(fd fd_timer, flags flags[timerfd_settime_flags], new ptr[in, itimerspec], old ptr[out, itimerspec])
timerfd_gettime(fd fd_timer, cur ptr[out, itimerspec])
ioctl$TFD_IOC_SET_TICKS(fd fd_timer, cmd const[TFD_IOC_SET_TICKS], arg ptr[in, int64])
resource fd_event[fd]
eventfd(initval int32) fd_event
eventfd2(initval int32, flags flags[eventfd_flags]) fd_event
read$eventfd(fd fd_event, val ptr[out, int64], len len[val])
write$eventfd(fd fd_event, val ptr[in, int64], len len[val])
brk(brk intptr)
mmap(addr vma, len len[addr], prot flags[mmap_prot], flags flags[mmap_flags], fd fd, offset intptr[0:0xffffffff, 0x1000])
munmap(addr vma, len len[addr])
mremap(addr vma, len len[addr], newlen len[newaddr], flags flags[mremap_flags], newaddr vma)
remap_file_pages(addr vma, size len[addr], prot flags[mmap_prot], pgoff intptr, flags flags[mmap_flags])
mprotect(addr vma, len len[addr], prot flags[mmap_prot])
msync(addr vma, len len[addr], f flags[msync_flags])
madvise(addr vma, len len[addr], advice flags[madvise_flags])
process_madvise(pidfd fd_pidfd, vec ptr[in, array[iovec_in]], vlen len[vec], advice flags[madvise_flags], flags const[0])
process_mrelease(pidfd fd_pidfd, flags const[0])
fadvise64(fd fd, offset fileoff, len intptr, advice flags[fadvise_flags])
readahead(fd fd, off intptr, count intptr)
mbind(addr vma, len len[addr], mode flags[mbind_mode], nodemask ptr[in, int64], maxnode intptr, flags flags[mbind_flags])
move_pages(pid pid, nr len[pages], pages ptr[in, array[vma]], nodes ptr[in, array[int32], opt], status ptr[out, array[int32]], flags flags[move_pages_flags])
migrate_pages(pid pid, maxnode intptr, old ptr[in, int64], new ptr[in, int64])
set_mempolicy(mode flags[mbind_mode], nodemask ptr[in, int64], maxnode intptr)
get_mempolicy(mode ptr[out, int32], nodemask ptr[out, int64], maxnode intptr, addr vma, flags flags[mempolicy_flags])
set_mempolicy_home_node(addr vma, len len[addr], home_node intptr[0:3], flags const[0])
mincore(addr vma, size len[addr], vec buffer[out])
mlock(addr vma, size len[addr])
mlock2(addr vma, size len[addr], flags flags[mlock_flags])
munlock(addr vma, size len[addr])
mlockall(flags flags[mlockall_flags])
munlockall()
kcmp(pid1 pid, pid2 pid, type flags[kcmp_flags], fd1 fd, fd2 fd)
kcmp$KCMP_EPOLL_TFD(pid1 pid, pid2 pid, type const[KCMP_EPOLL_TFD], fd1 fd, idx2 ptr[in, kcmp_epoll_slot])
resource fd_memfd[fd]
memfd_create(name ptr[in, string], flags flags[memfd_flags]) fd_memfd
memfd_flags = MFD_CLOEXEC, MFD_ALLOW_SEALING, MFD_HUGETLB
_ = MFD_HUGE_SHIFT, MFD_HUGE_MASK, MFD_HUGE_64KB, MFD_HUGE_512KB, MFD_HUGE_1MB, MFD_HUGE_2MB, MFD_HUGE_8MB, MFD_HUGE_16MB
memfd_secret(flags flags[memfd_secret_flags]) fd
memfd_secret_flags = O_CLOEXEC
resource pkey[int32]: -1
pkey_alloc(flags const[0], val flags[pkey_flags]) pkey
pkey_free(key pkey)
pkey_mprotect(addr vma, len len[addr], prot flags[mmap_prot], key pkey)
syz_pkey_set(key pkey, val flags[pkey_flags])
pkey_flags = PKEY_DISABLE_ACCESS, PKEY_DISABLE_WRITE
restart_syscall()
# Almighty!
ioctl(fd fd, cmd int32, arg buffer[in])
ioctl$int_in(fd fd, cmd flags[ioctl_int_in], v ptr[in, int64])
ioctl$int_out(fd fd, cmd flags[ioctl_int_out], v ptr[out, intptr])
ioctl$FIOCLEX(fd fd, cmd const[FIOCLEX])
ioctl$FIONCLEX(fd fd, cmd const[FIONCLEX])
ioctl$FITHAW(fd fd, cmd const[FITHAW])
# FIFREEZE is enabled in sandbox mode only because it can easily kill the machine.
ioctl$FIFREEZE(fd fd, cmd const[FIFREEZE]) (snapshot)
fcntl$dupfd(fd fd, cmd flags[fcntl_dupfd], arg fd) fd
fcntl$getflags(fd fd, cmd flags[fcntl_getflags])
fcntl$setflags(fd fd, cmd const[F_SETFD], flags flags[fcntl_flags])
fcntl$setstatus(fd fd, cmd const[F_SETFL], flags flags[fcntl_status])
fcntl$lock(fd fd, cmd flags[fcntl_lock], lock ptr[in, flock])
fcntl$getown(fd fd, cmd const[F_GETOWN]) pid (automatic_helper)
fcntl$setown(fd fd, cmd const[F_SETOWN], pid pid)
fcntl$getownex(fd fd, cmd const[F_GETOWN_EX], arg ptr[out, f_owner_ex])
fcntl$setownex(fd fd, cmd const[F_SETOWN_EX], arg ptr[in, f_owner_ex])
fcntl$setsig(fd fd, cmd const[F_SETSIG], sig signalnoptr)
fcntl$setlease(fd fd, cmd const[F_SETLEASE], typ flags[flock_type])
fcntl$notify(fd fd, cmd const[F_NOTIFY], typ flags[fcntl_notify])
fcntl$setpipe(fd fd, cmd const[F_SETPIPE_SZ], sz intptr)
fcntl$addseals(fd fd, cmd const[F_ADD_SEALS], seals flags[seal_types])
fcntl$F_GET_RW_HINT(fd fd, cmd const[F_GET_RW_HINT], hint ptr[out, int64])
fcntl$F_GET_FILE_RW_HINT(fd fd, cmd const[F_GET_FILE_RW_HINT], hint ptr[out, int64])
fcntl$F_SET_RW_HINT(fd fd, cmd const[F_SET_RW_HINT], hint ptr[in, flags[fcntl_rw_hint, int64]])
fcntl$F_SET_FILE_RW_HINT(fd fd, cmd const[F_SET_FILE_RW_HINT], hint ptr[in, flags[fcntl_rw_hint, int64]])
# Only some commands break return values.
# When/if we have stricter enforcement of arguments, we may remove some of breaks_returns attributes.
ptrace(req flags[ptrace_req], pid pid) (breaks_returns)
ptrace$peek(req flags[ptrace_req_peek], pid pid, addr ptr[out, intptr]) (breaks_returns)
ptrace$poke(req flags[ptrace_req_poke], pid pid, addr ptr[out, intptr], data intptr) (breaks_returns)
ptrace$peekuser(req const[PTRACE_PEEKUSR], pid pid, addr intptr) (breaks_returns)
ptrace$pokeuser(req const[PTRACE_POKEUSR], pid pid, addr intptr, data intptr) (breaks_returns)
ptrace$getregs(req flags[ptrace_req_getregs], pid pid, ignored intptr, data buffer[out]) (breaks_returns)
ptrace$getregset(req const[PTRACE_GETREGSET], pid pid, what flags[pthread_regset], data ptr[in, iovec_out]) (breaks_returns)
ptrace$setregs(req flags[ptrace_req_setregs], pid pid, ignored intptr, data buffer[in]) (breaks_returns)
ptrace$setregset(req const[PTRACE_SETREGSET], pid pid, what flags[pthread_regset], data ptr[in, iovec_in]) (breaks_returns)
ptrace$getsig(req const[PTRACE_GETSIGINFO], pid pid, ignored intptr, data ptr[out, siginfo]) (breaks_returns)
ptrace$setsig(req const[PTRACE_SETSIGINFO], pid pid, ignored intptr, data ptr[in, siginfo]) (breaks_returns)
ptrace$setopts(req flags[ptrace_req_setopts], pid pid, ignored intptr, flags flags[ptrace_options]) (breaks_returns)
ptrace$getenv(req const[PTRACE_GETEVENTMSG], pid pid, ignored intptr, data ptr[out, intptr]) (breaks_returns)
ptrace$cont(req flags[ptrace_req_cont], pid pid, ignored intptr, data intptr) (breaks_returns)
ptrace$PTRACE_SECCOMP_GET_FILTER(req const[PTRACE_SECCOMP_GET_FILTER], pid pid, addr intptr, data ptr[out, array[int8]]) (breaks_returns)
ptrace$PTRACE_SECCOMP_GET_METADATA(req const[PTRACE_SECCOMP_GET_METADATA], pid pid, addr len[data], data ptr[in, seccomp_metadata]) (breaks_returns)
ptrace$PTRACE_SETSIGMASK(req const[PTRACE_SETSIGMASK], pid pid, size bytesize[data], data ptr[in, sigset_t]) (breaks_returns)
ptrace$PTRACE_GETSIGMASK(req const[PTRACE_GETSIGMASK], pid pid, size bytesize[data], data ptr[out, sigset_t]) (breaks_returns)
ptrace$ARCH_GET_FS(req const[PTRACE_ARCH_PRCTL], pid pid, arg ptr[out, intptr], code const[ARCH_GET_FS]) (breaks_returns)
ptrace$ARCH_GET_GS(req const[PTRACE_ARCH_PRCTL], pid pid, arg ptr[out, intptr], code const[ARCH_GET_GS]) (breaks_returns)
ptrace$ARCH_SET_GS(req const[PTRACE_ARCH_PRCTL], pid pid, arg ptr[out, intptr], code const[ARCH_SET_GS]) (breaks_returns)
ptrace$ARCH_GET_CPUID(req const[PTRACE_ARCH_PRCTL], pid pid, arg const[0], code const[ARCH_GET_CPUID]) (breaks_returns)
ptrace$ARCH_SET_CPUID(req const[PTRACE_ARCH_PRCTL], pid pid, arg boolptr, code const[ARCH_SET_CPUID]) (breaks_returns)
ptrace$ARCH_MAP_VDSO_X32(req const[PTRACE_ARCH_PRCTL], pid pid, arg intptr, code const[ARCH_MAP_VDSO_X32]) (breaks_returns)
ptrace$ARCH_MAP_VDSO_32(req const[PTRACE_ARCH_PRCTL], pid pid, arg intptr, code const[ARCH_MAP_VDSO_32]) (breaks_returns)
ptrace$ARCH_MAP_VDSO_64(req const[PTRACE_ARCH_PRCTL], pid pid, arg intptr, code const[ARCH_MAP_VDSO_64]) (breaks_returns)
ptrace$ARCH_SHSTK_STATUS(req const[PTRACE_ARCH_PRCTL], pid pid, res ptr[out, intptr], cmd const[ARCH_SHSTK_STATUS]) (breaks_returns)
ptrace$ARCH_SHSTK_LOCK(req const[PTRACE_ARCH_PRCTL], pid pid, features flags[shadow_stack_features], cmd const[ARCH_SHSTK_LOCK]) (breaks_returns)
ptrace$ARCH_SHSTK_UNLOCK(req const[PTRACE_ARCH_PRCTL], pid pid, features flags[shadow_stack_features], cmd const[ARCH_SHSTK_UNLOCK]) (breaks_returns)
ptrace$ARCH_SHSTK_ENABLE(req const[PTRACE_ARCH_PRCTL], pid pid, features flags[shadow_stack_features], cmd const[ARCH_SHSTK_ENABLE]) (breaks_returns)
ptrace$ARCH_SHSTK_DISABLE(req const[PTRACE_ARCH_PRCTL], pid pid, features flags[shadow_stack_features], cmd const[ARCH_SHSTK_DISABLE]) (breaks_returns)
ptrace$ARCH_GET_UNTAG_MASK(req const[PTRACE_ARCH_PRCTL], pid pid, arg ptr[out, intptr], cmd const[ARCH_GET_UNTAG_MASK]) (breaks_returns)
ptrace$ARCH_GET_MAX_TAG_BITS(req const[PTRACE_ARCH_PRCTL], pid pid, arg ptr[out, intptr], cmd const[ARCH_GET_MAX_TAG_BITS]) (breaks_returns)
ptrace$ARCH_ENABLE_TAGGED_ADDR(req const[PTRACE_ARCH_PRCTL], pid pid, arg intptr[1:6], cmd const[ARCH_ENABLE_TAGGED_ADDR]) (breaks_returns)
ptrace$ARCH_FORCE_TAGGED_SVA(req const[PTRACE_ARCH_PRCTL], pid pid, arg const[0], cmd const[ARCH_FORCE_TAGGED_SVA]) (breaks_returns)
map_shadow_stack(addr vma, size bytesize[addr], flags boolptr)
seccomp_metadata {
filter_off int64
flags const[0, int64]
}
ptrace_peeksiginfo_args {
off int64
flags flags[ptrace_peeksiginfo_flags, int32]
nr len[syscall:data, int32]
}
ptrace$peeksig(req const[PTRACE_PEEKSIGINFO], pid pid, args ptr[in, ptrace_peeksiginfo_args], data ptr[out, array[siginfo]])
capget(hdr ptr[in, cap_header], data ptr[in, cap_data])
capset(hdr ptr[in, cap_header], data ptr[in, cap_data])
resource fd_mq[fd]
mq_open(name ptr[in, string], flags flags[mq_open_flags], mode flags[open_mode], attr ptr[in, mq_attr]) fd_mq
mq_timedsend(mqd fd_mq, msg buffer[in], msglen len[msg], prio intptr, timeout ptr[in, timespec, opt])
mq_timedreceive(mqd fd_mq, msg buffer[out], msglen len[msg], prio intptr, timeout ptr[in, timespec, opt])
mq_notify(mqd fd_mq, notif ptr[in, sigevent])
mq_getsetattr(mqd fd_mq, attr ptr[in, mq_attr], oldattr ptr[out, mq_attr, opt])
mq_unlink(name ptr[in, string])
mknod(file ptr[in, filename], mode flags[mknod_mode], dev int32)
mknod$loop(file ptr[in, filename], mode flags[mknod_mode], dev proc[1792, 2])
mknodat$loop(dirfd fd_dir, file ptr[in, filename], mode flags[mknod_mode], dev proc[1792, 2])
mknodat$null(dirfd fd_dir, file ptr[in, filename], mode flags[mknod_mode], dev const[0x103])
mknodat(dirfd fd_dir, file ptr[in, filename], mode flags[mknod_mode], dev int32)
chmod(file ptr[in, filename], mode flags[open_mode])
fchmod(fd fd, mode flags[open_mode])
fchmodat(dirfd fd_dir, file ptr[in, filename], mode flags[open_mode])
chown(file ptr[in, filename], uid uid, gid gid)
lchown(file ptr[in, filename], uid uid, gid gid)
fchown(fd fd, uid uid, gid gid)
fchownat(dirfd fd_dir, file ptr[in, filename], uid uid, gid gid, flags flags[at_flags])
fallocate(fd fd, mode flags[fallocate_mode], off intptr, len intptr)
faccessat(dirfd fd_dir, pathname ptr[in, filename], mode flags[open_mode])
faccessat2(dirfd fd_dir, pathname ptr[in, filename], mode flags[open_mode], flags flags[faccessat_flags])
utime(filename ptr[in, filename], times ptr[in, utimbuf])
utimes(filename ptr[in, filename], times ptr[in, itimerval])
futimesat(dir fd_dir, pathname ptr[in, filename], times ptr[in, itimerval])
utimensat(dir fd_dir, pathname ptr[in, filename], times ptr[in, itimerval], flags flags[utimensat_flags])
# Small trick - syzkaller cannot give the proper stack pointer to clone(), but we can do it with the aid of pseudo syscalls.
syz_clone(flags flags[clone_flags], stack buffer[in], stack_len bytesize[stack], parentid ptr[out, int32], childtid ptr[out, int32], tls buffer[in]) pid (automatic_helper)
syz_clone3(args ptr[in, clone_args], size bytesize[args]) pid (automatic_helper)
# We need these disabled definitions to simplify the presence and the NR checking.
clone(flags flags[clone_flags], sp buffer[in], parentid ptr[out, int32], childtid ptr[out, int32], tls buffer[in]) (breaks_returns, disabled)
clone3(args ptr[in, clone_args], size bytesize[args]) pid (breaks_returns, disabled)
clone_args {
flags flags[clone3_flags, int64]
pidfd ptr64[out, fd_pidfd]
child_tid ptr64[out, pid]
parent_tid ptr64[out, pid]
exit_signal align64[signalno]
stack ptr64[out, array[int8]]
stack_size bytesize[stack, int64]
tls ptr64[out, array[int8]]
set_tid ptr64[in, array[pid]]
set_tid_size len[set_tid, int64]
cgroup align64[fd_cgroup]
}
resource pid[int32]: 0, -1
resource uid[int32]: 0, -1, 0xee00, 0xee01
resource gid[int32]: 0, -1, 0xee00, 0xee01
getgid() gid (automatic_helper)
getegid() gid (automatic_helper)
setuid(uid uid)
setgid(gid gid)
getuid() uid (automatic_helper)
geteuid() uid (automatic_helper)
setpgid(pid pid, pgid pid)
getpgid(pid pid) pid (automatic_helper)
getpgrp(pid pid) pid (automatic_helper)
getpid() pid (automatic_helper)
gettid() pid (automatic_helper)
setreuid(ruid uid, euid uid)
setregid(rgid gid, egid gid)
setresuid(ruid uid, euid uid, suid uid)
setresgid(rgid gid, egid gid, sgid gid)
getresuid(ruid ptr[out, uid], euid ptr[out, uid], suid ptr[out, uid])
getresgid(rgid ptr[out, gid], egid ptr[out, gid], sgid ptr[out, gid])
setfsuid(fsuid uid)
setfsgid(fsgid gid)
getgroups(size len[list], list ptr[inout, array[gid]])
setgroups(size len[list], list ptr[in, array[gid]])
personality(persona flags[personality_flags])
# Don't mess with parent (fuzzer). If we ptrace attach to it, it will hang.
# If we setrlimit for parent, it will misbehave. Killing - the same. Nothing good.
#getppid() pid
#getsid(pid pid) pid
#setsid() pid
link(old ptr[in, filename], new ptr[in, filename])
linkat(oldfd fd_dir, old ptr[in, filename], newfd fd_dir, new ptr[in, filename], flags flags[linkat_flags])
symlinkat(old ptr[in, filename], newfd fd_dir, new ptr[in, filename])
symlink(old ptr[in, filename], new ptr[in, filename])
unlink(path ptr[in, filename])
unlinkat(fd fd_dir, path ptr[in, filename], flags flags[unlinkat_flags])
readlink(path ptr[in, filename], buf buffer[out], siz len[buf])
readlinkat(fd fd_dir, path ptr[in, filename], buf buffer[out], siz len[buf])
rename(old ptr[in, filename], new ptr[in, filename])
renameat(oldfd fd_dir, old ptr[in, filename], newfd fd_dir, new ptr[in, filename])
renameat2(oldfd fd_dir, old ptr[in, filename], newfd fd_dir, new ptr[in, filename], flags flags[renameat2_flags])
mkdir(path ptr[in, filename], mode flags[open_mode])
mkdirat(fd fd_dir[opt], path ptr[in, filename], mode flags[open_mode])
rmdir(path ptr[in, filename])
truncate(file ptr[in, filename], len intptr)
ftruncate(fd fd, len intptr)
flock(fd fd, op flags[flock_op])
fsync(fd fd)
fdatasync(fd fd)
sync()
syncfs(fd fd)
sync_file_range(fd fd, off intptr, nbytes intptr, flags flags[sync_file_flags])
lookup_dcookie(cookie intptr, buf buffer[out], len len[buf])
getdents(fd fd_dir, ent buffer[out], count len[ent])
getdents64(fd fd_dir, ent buffer[out], count len[ent])
name_to_handle_at(fd fd_dir, file ptr[in, filename], handle ptr[in, file_handle], mnt ptr[out, int32], flags flags[name_to_handle_at_flags])
open_by_handle_at(mountdirfd fd, handle ptr[in, file_handle], flags flags[open_flags])
chroot(dir ptr[in, filename])
getcwd(buf buffer[out], size len[buf])
chdir(dir ptr[in, filename])
fchdir(fd fd)
pivot_root(new_root ptr[in, filename], put_old ptr[in, filename])
sysfs$1(option const[1], fsname ptr[in, string])
sysfs$2(option const[2], fsindex intptr, fsname buffer[out])
sysfs$3(option const[3])
statfs(path ptr[in, filename], buf buffer[out])
fstatfs(fd fd, buf buffer[out])
uselib(lib ptr_binfmt_file)
init_module(mod ptr[in, binfmt_elf64], len len[mod], args ptr[in, string])
finit_module(fd fd_binfmt, args ptr[in, string], flags flags[finit_module_flags])
delete_module(name ptr[in, string], flags flags[delete_module_flags])
kexec_load(entry intptr, nr_segments len[segments], segments ptr[in, array[kexec_segment]], flags flags[kexec_load_flags])
syslog(cmd flags[syslog_cmd], buf ptr[out, array[int8], opt], len len[buf])
uname(buf buffer[out])
sysinfo(info buffer[out])
ustat(dev intptr, buf ptr[out, ustat])
acct(filename ptr[in, filename, opt])
getrusage(who flags[rusage_who], usage ptr[out, rusage])
getrlimit(res flags[rlimit_type], rlim ptr[out, rlimit])
setrlimit(res flags[rlimit_type], rlim ptr[in, rlimit])
prlimit64(pid pid, res flags[rlimit_type], new ptr[in, rlimit, opt], old ptr[out, rlimit, opt])
iopl(level int8)
ioperm(from intptr, num intptr, on intptr)
ioprio_get$pid(which flags[ioprio_which_pid], who pid)
ioprio_get$uid(which flags[ioprio_which_uid], who uid)
ioprio_set$pid(which flags[ioprio_which_pid], who pid, ioprio flags[ioprio_priorities])
ioprio_set$uid(which flags[ioprio_which_uid], who uid, ioprio flags[ioprio_priorities])
# NEED: we can express the construction of integers using structs with flags
# and bitfields, which are normally obtained using a combination of bitwise
# operations with the help of macros. However, structs can't be directly passed
# as a syscall argument; therefore, such constructions can't be directly passed either.
# One example is ioprio argument for ioprio_set, where we could have expressed the
# construction less messy. For now, some subset of valid values are enumerated as
# in ioprio_priorities.
# ioprio priority values are obtained using IOPRIO_PRIO_VALUE(class, data) macro.
# the behaviour of the macro is mimicked below and some priority values are enumerated.
ioprio_priorities = IOPRIO_CLASS_NONE_PRIO, IOPRIO_CLASS_IDLE_PRIO, IOPRIO_CLASS_RT_HIGH_PRIO, IOPRIO_CLASS_BE_HIGH_PRIO, IOPRIO_CLASS_RT_MID_PRIO, IOPRIO_CLASS_BE_MID_PRIO, IOPRIO_CLASS_RT_LOW_PRIO, IOPRIO_CLASS_BE_LOW_PRIO
# The classes RT and BE take data values from the range [0:7]. Use a subset of the available
# values (0, 4, 7) to ease collisions, and to avoid redundancy. The classes NONE and IDLE
# have only one valid priority value each with data set to 0.
define IOPRIO_CLASS_NONE_PRIO (IOPRIO_CLASS_NONE << IOPRIO_CLASS_SHIFT)
define IOPRIO_CLASS_IDLE_PRIO (IOPRIO_CLASS_IDLE << IOPRIO_CLASS_SHIFT)
define IOPRIO_CLASS_RT_HIGH_PRIO (IOPRIO_CLASS_RT << IOPRIO_CLASS_SHIFT)
define IOPRIO_CLASS_BE_HIGH_PRIO (IOPRIO_CLASS_BE << IOPRIO_CLASS_SHIFT)
define IOPRIO_CLASS_RT_MID_PRIO ((IOPRIO_CLASS_RT << IOPRIO_CLASS_SHIFT) + 4)
define IOPRIO_CLASS_BE_MID_PRIO ((IOPRIO_CLASS_BE << IOPRIO_CLASS_SHIFT) + 4)
define IOPRIO_CLASS_RT_LOW_PRIO ((IOPRIO_CLASS_RT << IOPRIO_CLASS_SHIFT) + 7)
define IOPRIO_CLASS_BE_LOW_PRIO ((IOPRIO_CLASS_BE << IOPRIO_CLASS_SHIFT) + 7)
resource timerid[int32]
timer_create(id flags[clock_id], ev ptr[in, sigevent], timerid ptr[out, timerid])
timer_gettime(timerid timerid, setting ptr[out, itimerspec])
timer_getoverrun(timerid timerid)
timer_settime(timerid timerid, flags flags[timer_flags], new ptr[in, itimerspec], old ptr[out, itimerspec, opt])
timer_delete(timerid timerid)
time(t ptr[out, intptr])
clock_gettime(id flags[clock_id], tp ptr[out, timespec])
clock_settime(id flags[clock_id], tp ptr[in, timespec])
clock_adjtime(id flags[clock_id], tx ptr[in, timex])
clock_getres(id flags[clock_id], tp ptr[out, timespec])
clock_nanosleep(id flags[clock_id], flags flags[timer_flags], rqtp ptr[in, timespec], rmtp ptr[out, timespec, opt])
rt_sigaction(sig signalno, act ptr[in, sigaction], oact ptr[out, sigaction, opt], sigsetsize len[fake], fake ptr[out, sigset_t])
rt_sigprocmask(how flags[sigprocmask_how], nset ptr[in, sigset_t], oset ptr[out, sigset_t, opt], sigsetsize len[nset])
rt_sigreturn()
rt_sigpending(set ptr[out, sigset_t], sigsetsize len[set])
rt_sigtimedwait(these ptr[in, sigset_t], info ptr[out, siginfo, opt], ts ptr[in, timespec], sigsetsize len[these])
rt_sigsuspend(new ptr[in, sigset_t], sigsetsize len[new])
rt_sigqueueinfo(pid pid, sig signalno, info ptr[in, siginfo])
rt_tgsigqueueinfo(gid pid, tid pid, sig signalno, info ptr[in, siginfo])
sigaltstack(ss ptr[in, sigaltstack], oss ptr[out, sigaltstack, opt])
tgkill(gid pid, tid pid, sig signalno)
tkill(tid pid, sig signalno)
pause()
alarm(seconds intptr)
nanosleep(req ptr[in, timespec], rem ptr[out, timespec, opt])
getitimer(which flags[getitimer_which], cur ptr[out, itimerval])
setitimer(which flags[getitimer_which], new ptr[in, itimerval], old ptr[out, itimerval, opt])
exit(code intptr)
exit_group(code intptr)
waitid(which flags[waitid_which], pid pid, infop ptr[out, siginfo, opt], options flags[wait_options], ru ptr[out, rusage, opt])
waitid$P_PIDFD(which const[P_PIDFD], pidfd fd_pidfd, infop ptr[out, siginfo, opt], options flags[wait_options], ru ptr[out, rusage, opt])
wait4(pid pid, status ptr[out, int32, opt], options flags[wait_options], ru ptr[out, rusage, opt])
times(buf ptr[out, tms])
# Can send signals to all processes (pid=-1) so it's enabled only in snapshot mode.
kill(pid pid, sig signalno) (snapshot)
set_thread_area(info ptr[in, user_desc])
get_thread_area(info ptr[in, user_desc])
modify_ldt$read(func const[0], buf buffer[out], len len[buf])
modify_ldt$write(func const[1], buf ptr[in, user_desc], len len[buf])
modify_ldt$read_default(func const[2], buf buffer[out], len len[buf])
modify_ldt$write2(func const[17], buf ptr[in, user_desc], len len[buf])
process_vm_readv(pid pid, loc_vec ptr[in, array[iovec_out]], loc_vlen len[loc_vec], rem_vec ptr[in, array[iovec_out]], rem_vlen len[rem_vec], flags const[0])
process_vm_writev(pid pid, loc_vec ptr[in, array[iovec_out]], loc_vlen len[loc_vec], rem_vec ptr[in, array[iovec_out]], rem_vlen len[rem_vec], flags const[0])
set_tid_address(tidptr ptr[out, int32])
getpriority(which flags[priority_which], who pid)
setpriority(which flags[priority_which], who pid, prio intptr)
sched_getscheduler(pid pid)
sched_setscheduler(pid pid, policy flags[sched_policy], prio ptr[in, int32])
sched_rr_get_interval(pid pid, tp ptr[out, timespec])
sched_getparam(pid pid, prio ptr[out, int32])
sched_setparam(pid pid, prio ptr[in, int32])
sched_getaffinity(pid pid, cpusetsize len[mask], mask ptr[out, int64])
sched_setaffinity(pid pid, cpusetsize len[mask], mask ptr[in, int64])
sched_getattr(pid pid, attr ptr[out, sched_attr], size len[attr], flags const[0])
sched_setattr(pid pid, attr ptr[in, sched_attr], flags const[0])
sched_yield()
getrandom(buf buffer[out], len len[buf], flags flags[getrandom_flags])
reboot(magic1 const[LINUX_REBOOT_MAGIC1], magic2 const[LINUX_REBOOT_MAGIC2], cmd flags[reboot_commands], arg const[0]) (snapshot)
reboot_commands = LINUX_REBOOT_CMD_RESTART, LINUX_REBOOT_CMD_HALT, LINUX_REBOOT_CMD_CAD_ON, LINUX_REBOOT_CMD_CAD_OFF, LINUX_REBOOT_CMD_POWER_OFF, LINUX_REBOOT_CMD_RESTART2, LINUX_REBOOT_CMD_SW_SUSPEND, LINUX_REBOOT_CMD_KEXEC
swapon(specialfile ptr[in, filename], swap_flags flags[swap_flags]) (snapshot)
swapoff(specialfile ptr[in, filename]) (snapshot)
swap_flags = SWAP_FLAG_PRIO_MASK, SWAP_FLAG_PREFER, SWAP_FLAG_DISCARD, SWAP_FLAG_DISCARD_ONCE, SWAP_FLAG_DISCARD_PAGES
sethostname(name ptr[in, array[int8]], len bytesize[name]) (snapshot)
setdomainname(name ptr[in, array[int8]], len bytesize[name]) (snapshot)
gettimeofday(tv ptr[out, timeval], tz ptr[out, timezone])
settimeofday(tv ptr[out, timeval], tz ptr[out, timezone]) (snapshot)
adjtimex(txc_p ptr[in, __kernel_timex]) (snapshot)
timezone {
tz_minuteswest int32
tz_dsttime int32
}
__kernel_timex {
modes flags[adjtimex_modes, int32]
pad0 const[0, int32]
offset int64
freq int64
maxerror int64
esterror int64
status int32
pad1 const[0, int32]
constant int64
precision int64
tolerance int64
int timeval
tick int64
ppsfreq int64
jitter int64
shift int32
pad2 const[0, int32]
stabil int64
jitcnt int64
calcnt int64
errcnt int64
stbcnt int64
tai int32
pad3 array[const[0, int32], 11]
}
adjtimex_modes = ADJ_OFFSET, ADJ_FREQUENCY, ADJ_MAXERROR, ADJ_ESTERROR, ADJ_STATUS, ADJ_TIMECONST, ADJ_TAI, ADJ_SETOFFSET, ADJ_MICRO, ADJ_NANO, ADJ_TICK
membarrier(cmd flags[membarrier_cmd], flags const[0])
membarrier_cmd = MEMBARRIER_CMD_GLOBAL, MEMBARRIER_CMD_GLOBAL_EXPEDITED, MEMBARRIER_CMD_PRIVATE_EXPEDITED, MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED, MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE, MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE, MEMBARRIER_CMD_QUERY, MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED, MEMBARRIER_CMD_SHARED
rseq(rseq ptr[in, rseq], rseq_len bytesize[rseq], flags boolptr, sig const[0])
rseq {
cpu_id_start const[0, int32]
cpu_id const[0, int32]
rseq_cs ptr64[in, rseq_cs, opt]
flags flags[rseq_cs_flags, int32]
} [align[32]]
rseq_cs {
version const[0, int32]
flags flags[rseq_cs_flags, int32]
start_ip int64
post_commit_offset int64
abort_ip int64
} [align[32]]
rseq_cs_flags = RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT, RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL, RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE
# start/end are unused for now, no definition of SYS_RISCV_FLUSH_ICACHE_LOCAL in uapi headers.
riscv_flush_icache(start const[0], end const[0], flags bool32)
syz_open_procfs(pid pid, file ptr[in, string[procfs_proc_file]]) fd
# TODO: some of net files are only available in the init namespace (e.g. bluetooth bnep and hci).
# We could find some way to open these files in the init namespace
# esp. taking into account that we create bluetooth sockets in init namespace.
procfs_proc_file = "auxv", "cmdline", "environ", "autogroup", "cgroup", "clear_refs", "comm", "coredump_filter", "cpuset", "gid_map", "io", "limits", "loginuid", "maps", "mountinfo", "mounts", "mountstats", "numa_maps", "oom_adj", "oom_score", "oom_score_adj", "pagemap", "personality", "projid_map", "sched", "schedstat", "sessionid", "setgroups", "smaps", "smaps_rollup", "totmaps", "stack", "stat", "statm", "status", "syscall", "timers", "uid_map", "wchan", "map_files", "attr", "attr/current", "attr/exec", "attr/fscreate", "attr/keycreate", "attr/prev", "attr/sockcreate", "ns", "children", "task", "fd", "fd/3", "fd/4", "fdinfo", "fdinfo/3", "fdinfo/4", "net", "net/anycast6", "net/arp", "net/bnep", "net/connector", "net/dev", "net/dev_mcast", "net/dev_snmp6", "net/fib_trie", "net/fib_triestat", "net/hci", "net/icmp", "net/icmp6", "net/if_inet6", "net/igmp", "net/igmp6", "net/ip6_flowlabel", "net/ip6_mr_cache", "net/ip6_mr_vif", "net/ip6_tables_matches", "net/ip6_tables_names", "net/ip6_tables_targets", "net/ip_mr_cache", "net/ip_mr_vif", "net/ip_tables_matches", "net/ip_tables_names", "net/ip_tables_targets", "net/ipv6_route", "net/l2cap", "net/llc/core", "net/llc/socket", "net/mcfilter", "net/mcfilter6", "net/netfilter", "net/netlink", "net/netstat", "net/nfsfs", "net/packet", "net/protocols", "net/psched", "net/ptype", "net/raw", "net/raw6", "net/rfcomm", "net/route", "net/rpc", "net/rt6_stats", "net/rt_acct", "net/rt_cache", "net/sco", "net/sctp", "net/snmp", "net/snmp6", "net/sockstat", "net/sockstat6", "net/softnet_stat", "net/stat", "net/tcp", "net/tcp6", "net/udp", "net/udp6", "net/udplite", "net/udplite6", "net/unix", "net/wireless", "net/xfrm_stat", "net/ip_vs", "net/ip_vs_stats", "net/ip_vs_stats_percpu", "net/nf_conntrack", "net/nf_conntrack_expect", "net/vlan/config", "net/vlan/vlan0", "net/vlan/vlan1", "net/kcm", "net/psched", "timerslack_ns"
openat$procfs(fd const[AT_FDCWD], file ptr[in, string[procfs_file]], flags const[O_RDONLY], mode const[0]) fd
procfs_file = "/proc/keys", "/proc/key-users", "/proc/crypto", "/proc/consoles", "/proc/cgroups", "/proc/zoneinfo", "/proc/vmstat", "/proc/vmallocinfo", "/proc/tty/drivers", "/proc/tty/ldiscs", "/proc/timer_list", "/proc/sysvipc/sem", "/proc/sysvipc/msg", "/proc/sysvipc/shm", "/proc/stat", "/proc/slabinfo", "/proc/schedstat", "/proc/partitions", "/proc/meminfo", "/proc/mdstat", "/proc/locks", "/proc/diskstats", "/proc/cpuinfo", "/proc/consoles", "/proc/bus/input/devices", "/proc/bus/input/handlers", "/proc/asound/seq/clients", "/proc/asound/seq/clients", "/proc/asound/seq/timer", "/proc/asound/timers"
resource fd_yama_ptrace_scope[fd]
# 0 - YAMA_SCOPE_DISABLED
# 1 - YAMA_SCOPE_RELATIONAL
# 2 - YAMA_SCOPE_CAPABILITY
# 3 - YAMA_SCOPE_NO_ATTACH
yama_modes = "0", "1", "2", "3"
openat$yama_ptrace_scope(fd const[AT_FDCWD], file ptr[in, string["/proc/sys/kernel/yama/ptrace_scope"]], flags const[O_RDWR], mode const[0]) fd_yama_ptrace_scope
write$yama_ptrace_scope(fd fd_yama_ptrace_scope, data ptr[in, string[yama_modes]], count len[data])
# Write into some interesting sysct's and sysfs/procfs files.
resource fd_sysctl[fd]
openat$sysctl(fd const[AT_FDCWD], file ptr[in, string[sysctl_file]], flags const[O_WRONLY], mode const[0]) fd_sysctl
write$sysctl(fd fd_sysctl, val ptr[in, string[sysctl_value]], len len[val])
sysctl_file = "/sys/kernel/mm/ksm/run", "/proc/sys/vm/compact_memory", "/proc/sys/vm/drop_caches", "/proc/sys/net/ipv4/tcp_timestamps", "/proc/sys/net/ipv4/tcp_sack", "/proc/sys/net/ipv4/tcp_dsack", "/proc/sys/net/ipv4/tcp_window_scaling", "/proc/sys/net/ipv4/tcp_syncookies", "/proc/sys/net/ipv4/tcp_recovery", "/proc/sys/net/ipv4/tcp_mtu_probing", "/proc/sys/net/ipv4/tcp_rfc1337", "/proc/self/clear_refs"
# Most of these values are suitable for all sysctl_file files.
sysctl_value = "0", "1", "2", "3", "4", "5", "6", "7"
# Write to this file triggers khugepaged scan.
# We don't want to write small values as we only want the explicitly triggered scan.
resource fd_khugepaged_scan[fd]
openat$khugepaged_scan(fd const[AT_FDCWD], file ptr[in, string["/sys/kernel/mm/transparent_hugepage/khugepaged/scan_sleep_millisecs"]], flags const[O_WRONLY], mode const[0]) fd_khugepaged_scan
write$khugepaged_scan(fd fd_khugepaged_scan, val ptr[in, string["1000000"]], len len[val])
resource fd_tcp_congestion[fd]
openat$tcp_congestion(fd const[AT_FDCWD], file ptr[in, string["/proc/sys/net/ipv4/tcp_congestion_control"]], flags const[O_WRONLY], mode const[0]) fd_tcp_congestion
write$tcp_congestion(fd fd_tcp_congestion, val ptr[in, string[tcp_congestion]], len len[val])
tcp_congestion = "reno", "bbr", "bic", "cdg", "cubic", "dctcp", "westwood", "highspeed", "hybla", "htcp", "vegas", "nv", "veno", "scalable", "lp", "yeah", "illinois"
resource fd_tcp_mem[fd]
openat$tcp_mem(fd const[AT_FDCWD], file ptr[in, string[tcp_mem_files]], flags const[O_WRONLY], mode const[0]) fd_tcp_mem
write$tcp_mem(fd fd_tcp_mem, val ptr[in, tcp_mem_values], len len[val])
tcp_mem_files = "/proc/sys/net/ipv4/tcp_rmem", "/proc/sys/net/ipv4/tcp_wmem"
tcp_mem_values {
v0 fmt[oct, int64]
sp0 const[' ', int8]
v1 fmt[oct, int64]
sp1 const[' ', int8]
v2 fmt[oct, int64]
z const[0, int8]
} [packed]
# /proc/self/reclaim is ChromeOS-specific:
# https://chromium.googlesource.com/chromiumos/third_party/kernel/+/4c3ad28b9c913%5E%21/
resource fd_proc_reclaim[fd]
openat$proc_reclaim(fd const[AT_FDCWD], file ptr[in, string["/proc/self/reclaim"]], flags const[O_WRONLY], mode const[0]) fd_proc_reclaim
write$proc_reclaim(fd fd_proc_reclaim, val ptr[in, string[proc_reclaim_vals]], len len[val])
proc_reclaim_vals = "file", "anon", "all"
resource fd_pidfd[fd]
openat$pidfd(fd const[AT_FDCWD], file ptr[in, string["/proc/self"]], flags flags[open_flags], mode const[0]) fd_pidfd
openat$thread_pidfd(fd const[AT_FDCWD], file ptr[in, string["/proc/thread-self"]], flags flags[open_flags], mode const[0]) fd_pidfd
pidfd_send_signal(fd fd_pidfd, sig signalno, info ptr[in, siginfo], flags const[0])
# pidfd_open is dangerous, so we use syz_pidfd_open instead.
pidfd_open(pid pid, flags const[0]) fd_pidfd (disabled)
syz_pidfd_open(pid pid, flags const[0]) fd_pidfd
pidfd_getfd(pidfd fd_pidfd, fd fd, flags const[0]) fd
close_range(fd fd, max_fd fd, flags flags[close_range_flags])
# Uncomment on your own account.
#syz_open_dev$char(dev const[0xc], major intptr, minor intptr) fd
#syz_open_dev$block(dev const[0xb], major intptr, minor intptr) fd
# /dev/console known to cause problems on at least two different kernels.
# It can turn off all output or produce massive amounts of garbage on console.
# Disable it for now.
#syz_open_dev$console(dev ptr[in, string["/dev/console"]], id const[0], flags flags[open_flags]) fd
resource fd_autofs[fd]
# These devices are relatively safe (don't reboot and don't corrupt kernel memory).
# They need a more comprehensive support. But let at least open them for now,
# maybe fuzzer will be able to skrew them in a useful way.
# TODO: all these devices returning just fd need proper interface descriptions.
openat$vcs(fd const[AT_FDCWD], file ptr[in, string["/dev/vcs"]], flags flags[open_flags], mode const[0]) fd
syz_open_dev$vcsn(dev ptr[in, string["/dev/vcs#"]], id intptr, flags flags[open_flags]) fd
openat$vcsa(fd const[AT_FDCWD], file ptr[in, string["/dev/vcsa"]], flags flags[open_flags], mode const[0]) fd
syz_open_dev$vcsa(dev ptr[in, string["/dev/vcsa#"]], id intptr, flags flags[open_flags]) fd
openat$vcsu(fd const[AT_FDCWD], file ptr[in, string["/dev/vcsu"]], flags flags[open_flags], mode const[0]) fd
syz_open_dev$vcsu(dev ptr[in, string["/dev/vcsu#"]], id intptr, flags flags[open_flags]) fd
syz_open_dev$ircomm(dev ptr[in, string["/dev/ircomm#"]], id intptr, flags flags[open_flags]) fd
syz_open_dev$audion(dev ptr[in, string["/dev/audio#"]], id intptr, flags flags[open_flags]) fd
openat$null(fd const[AT_FDCWD], file ptr[in, string["/dev/null"]], flags flags[open_flags], mode const[0]) fd
openat$zero(fd const[AT_FDCWD], file ptr[in, string["/dev/zero"]], flags flags[open_flags], mode const[0]) fd
openat$full(fd const[AT_FDCWD], file ptr[in, string["/dev/full"]], flags flags[open_flags], mode const[0]) fd
openat$irnet(fd const[AT_FDCWD], file ptr[in, string["/dev/irnet"]], flags flags[open_flags], mode const[0]) fd
openat$hwrng(fd const[AT_FDCWD], file ptr[in, string["/dev/hwrng"]], flags flags[open_flags], mode const[0]) fd
openat$hpet(fd const[AT_FDCWD], file ptr[in, string["/dev/hpet"]], flags flags[open_flags], mode const[0]) fd
openat$autofs(fd const[AT_FDCWD], file ptr[in, string["/dev/autofs"]], flags flags[open_flags], mode const[0]) fd_autofs
openat$keychord(fd const[AT_FDCWD], file ptr[in, string["/dev/keychord"]], flags flags[open_flags], mode const[0]) fd
openat$zygote(fd const[AT_FDCWD], file ptr[in, string["/dev/socket/zygote"]], flags flags[open_flags], mode const[0]) fd
openat$pktcdvd(fd const[AT_FDCWD], file ptr[in, string["/dev/pktcdvd/control"]], flags flags[open_flags], mode const[0]) fd
openat$lightnvm(fd const[AT_FDCWD], file ptr[in, string["/dev/lightnvm/control"]], flags flags[open_flags], mode const[0]) fd
openat$xenevtchn(fd const[AT_FDCWD], file ptr[in, string["/dev/xen/evtchn"]], flags flags[open_flags], mode const[0]) fd
openat$dlm_control(fd const[AT_FDCWD], file ptr[in, string["/dev/dlm-control"]], flags flags[open_flags], mode const[0]) fd
openat$dlm_monitor(fd const[AT_FDCWD], file ptr[in, string["/dev/dlm-monitor"]], flags flags[open_flags], mode const[0]) fd
openat$dlm_plock(fd const[AT_FDCWD], file ptr[in, string["/dev/dlm_plock"]], flags flags[open_flags], mode const[0]) fd
openat$btrfs_control(fd const[AT_FDCWD], file ptr[in, string["/dev/btrfs-control"]], flags flags[open_flags], mode const[0]) fd
openat$ubi_ctrl(fd const[AT_FDCWD], file ptr[in, string["/dev/ubi_ctrl"]], flags flags[open_flags], mode const[0]) fd
openat$cachefiles(fd const[AT_FDCWD], file ptr[in, string["/dev/cachefiles"]], flags flags[open_flags], mode const[0]) fd
openat$ndctl0(fd const[AT_FDCWD], file ptr[in, string["/dev/ndctl0"]], flags flags[open_flags], mode const[0]) fd
openat$nmem0(fd const[AT_FDCWD], file ptr[in, string["/dev/nmem0"]], flags flags[open_flags], mode const[0]) fd
openat$nvram(fd const[AT_FDCWD], file ptr[in, string["/dev/nvram"]], flags flags[open_flags], mode const[0]) fd
openat$ocfs2_control(fd const[AT_FDCWD], file ptr[in, string["/dev/ocfs2_control"]], flags flags[open_flags], mode const[0]) fd
openat$nvme_fabrics(fd const[AT_FDCWD], file ptr[in, string["/dev/nvme-fabrics"]], flags flags[open_flags], mode const[0]) fd
pipefd {
rfd fd
wfd fd
}
type iovec[DIR, T] {
addr ptr[DIR, T]
len len[addr, intptr]
}
type iovec_in iovec[in, array[int8]]
type iovec_out iovec[out, array[int8]]
type iovec_inout iovec[inout, array[int8]]
stat {
st_dev intptr
st_ino intptr
st_mode int32
st_nlink int32
st_uid uid
st_gid gid
st_rdev intptr
__pad1 const[0, intptr]
st_size intptr
st_blksize int32
__pad2 const[0, int32]
st_blocks intptr
st_atime intptr
st_atime_nsec intptr
st_mtime intptr
st_mtime_nsec intptr
st_ctime intptr
st_ctime_nsec intptr
__unused4 const[0, int32]
__unused5 const[0, int32]
}
statx {
mask int32
blksize int32
attributes int64
nlink int32
uid uid
gid gid
mode int16
__spare0 int16
ino int64
size int64
blocks int64
__spare1 int64
atime statx_timestamp
btime statx_timestamp
ctime statx_timestamp
mtime statx_timestamp
rdev_major int32
rdev_minor int32
dev_major int32
dev_minor int32
__spare2 array[int64, 14]
}
define STAT64_SIZE sizeof(struct stat64)
type stat64 array[int8, STAT64_SIZE]
pollfd {
fd fd
events flags[pollfd_events, int16]
revents const[0, int16]
}
sigset_t {
mask array[intptr, _NSIG_WORDS]
}
sigset_size {
ss ptr[inout, sigset_t]
len len[ss, intptr]
}
resource time_sec[intptr]
resource time_nsec[intptr]
resource time_usec[intptr]
# prog knowns about this struct type
timespec {
sec time_sec
nsec time_nsec
}
# prog knowns about this struct type
timeval {
sec time_sec
usec time_usec
}
statx_timestamp {
sec int64
nsec int32
__reserved int32
}
itimerspec {
interv timespec
value timespec
}
itimerval {
interv timeval
value timeval
}
utimbuf {
actime intptr
modtime intptr
}
sigevent {
val const[0, intptr]
signo signalno
notify flags[sigev_notify, int32]
u sigevent_u
} [size[SIGEVENT_SIZE]]
sigevent_u [
tid pid
thr sigevent_thread
]
define SIGEVENT_SIZE sizeof(struct sigevent)
sigevent_thread {
# NEED: this is function pointer and pthread_attr_t (?)
func buffer[in]
attr buffer[in]
}
cap_header {
var flags[cap_version, int32]
pid pid
}
cap_data {
eff0 int32
perm0 int32
inher0 int32
eff1 int32
perm1 int32
inher1 int32
}
epoll_event {
ev flags[epoll_ev, int32]
data const[0, int64]
# TODO: this packed only on amd64
} [packed]
# TODO: fd_set needs to be a separate type
fd_set {
mask0 int64
mask1 int64
mask2 int64
mask3 int64
mask4 int64
mask5 int64
mask6 int64
mask7 int64
}
sock_fprog {
len len[filter, int16]
filter ptr[in, array[sock_filter]]
}
sock_filter {
code int16
jt int8
jf int8
k int32
}
file_handle [
raw file_handle_raw
shmem file_handle_t[1, fid_shmem]
fuse file_handle_t[0x81, fid_fuse]
fuse_with_parent file_handle_t[0x82, fid_fuse_with_parent]
nfs file_handle_t[36, fid_nfs]
FILEID_INO32_GEN file_handle_t[FILEID_INO32_GEN, fid_FILEID_INO32_GEN]
FILEID_INO32_GEN_PARENT file_handle_t[FILEID_INO32_GEN_PARENT, fid_FILEID_INO32_GEN_PARENT]
FILEID_UDF_WITHOUT_PARENT file_handle_t[FILEID_UDF_WITHOUT_PARENT, fid_FILEID_UDF_WITHOUT_PARENT]
FILEID_UDF_WITH_PARENT file_handle_t[FILEID_UDF_WITH_PARENT, fid_FILEID_UDF_WITH_PARENT]
FILEID_BTRFS_WITH_PARENT file_handle_t[FILEID_BTRFS_WITH_PARENT, btrfs_fid]
FILEID_BTRFS_WITH_PARENT_ROOT file_handle_t[FILEID_BTRFS_WITH_PARENT, btrfs_fid]
FILEID_BTRFS_WITHOUT_PARENT file_handle_t[FILEID_BTRFS_WITH_PARENT, btrfs_fid]
ceph_nfs_snapfh file_handle_t[FILEID_BTRFS_WITH_PARENT, ceph_nfs_snapfh]
ceph_nfs_fh file_handle_t[FILEID_INO32_GEN, ceph_nfs_fh]
ceph_nfs_confh file_handle_t[FILEID_INO32_GEN_PARENT, ceph_nfs_confh]
GFS2_SMALL_FH_SIZE file_handle_t[GFS2_SMALL_FH_SIZE, fid_GFS2_SMALL_FH_SIZE]
GFS2_LARGE_FH_SIZE file_handle_t[GFS2_LARGE_FH_SIZE, fid_GFS2_LARGE_FH_SIZE]
OVL_FILEID_V0 file_handle_t[OVL_FILEID_V0, ovl_fb]
OVL_FILEID_V1 file_handle_t[OVL_FILEID_V1, ovl_fh]
FILEID_NILFS_WITHOUT_PARENT file_handle_t[FILEID_NILFS_WITHOUT_PARENT, nilfs_fid]
FILEID_NILFS_WITH_PARENT file_handle_t[FILEID_NILFS_WITH_PARENT, nilfs_fid]
reiserfs_2 file_handle_t[2, fid_reiserfs_2]
reiserfs_3 file_handle_t[3, fid_reiserfs_3]
reiserfs_4 file_handle_t[4, fid_reiserfs_4]
reiserfs_5 file_handle_t[5, fid_reiserfs_5]
reiserfs_6 file_handle_t[6, fid_reiserfs_6]
xfs file_handle_t[0x81, xfs_fid64]
xfs_parent file_handle_t[0x82, xfs_fid64]
orangefs file_handle_t[1, fid_orangefs]
orangefs_parent file_handle_t[2, fid_orangefs_parent]
isofs file_handle_t[1, isofs_fid]
isofs_parent file_handle_t[2, isofs_fid]
ocfs2 file_handle_t[1, fid_ocfs2]
ocfs2_parent file_handle_t[2, fid_ocfs2_parent]
] [varlen]
file_handle_raw {
handle_bytes bytesize[f_handle, int32]
handle_type flags[fid_type, int32]
f_handle align32[array[int8]]
}
type file_handle_t[TYPE, FID] {
handle_bytes bytesize[f_handle, int32]
handle_type const[TYPE, int32]
f_handle FID
}
fid_shmem {
gen int32
ino int64
} [packed]
fid_fuse {
nodeid_hi int32
nodeid_lo int32
generation int32
}
fid_fuse_with_parent {
base fid_fuse
parent_fid fid_fuse
} [packed]
fid_FILEID_INO32_GEN {
ino int32
gen int32
}
fid_FILEID_INO32_GEN_PARENT {
base fid_FILEID_INO32_GEN
parent_ino int32
parent_gen int32
}
fid_FILEID_UDF_WITHOUT_PARENT {
block int32
partref int16
parent_partref int16
generation int32
}
fid_FILEID_UDF_WITH_PARENT {
base fid_FILEID_UDF_WITHOUT_PARENT
parent_block int32
parent_generation int32
}
btrfs_fid {
objectid int64
root_objectid int64
gen int32
parent_objectid int64
parent_gen int32
parent_root_objectid int64
} [packed]
ceph_nfs_snapfh {
ino int64
snapid int64
parent_ino int64
hash int32
} [packed]
ceph_nfs_fh {
ino int64
}
ceph_nfs_confh {
ino int64
parent_ino int64
}
fid_GFS2_SMALL_FH_SIZE {
no_formal_ino_hi int32be
no_formal_ino_lo int32be
no_addr_hi int32be
no_addr_lo int32be
}
fid_GFS2_LARGE_FH_SIZE {
base fid_GFS2_SMALL_FH_SIZE
parent_fid fid_GFS2_SMALL_FH_SIZE
}
define GFS2_SMALL_FH_SIZE 4
define GFS2_LARGE_FH_SIZE 8
fid_nfs {
fileid_hi int32
fileid_lo int32
type int32
# The total size is encoded in file_handle.handle_type, so we make this const size.
size const[NFS_MAXFHSIZE, int16]
data array[int8, NFS_MAXFHSIZE]
} [align[4]]
fid_reiserfs_2 {
objectid int32
dir_id int32
}
fid_reiserfs_3 {
objectid int32
dir_id int32
generation int32
}
fid_reiserfs_4 {
objectid int32
dir_id int32
parent_objectid int32
parent_dir_id int32
}
fid_reiserfs_5 {
objectid int32
dir_id int32
generation int32
parent_objectid int32
parent_dir_id int32
}
fid_reiserfs_6 {
objectid int32
dir_id int32
generation int32
parent_objectid int32
parent_dir_id int32
parent_generation int32
}
xfs_fid64 {
ino int64
gen int32
parent_ino int64
parent_gen int32
} [align[4]]
fid_orangefs {
khandle array[int8, 16]
fs_id int32
}
fid_orangefs_parent {
base fid_orangefs
parent_fid fid_orangefs
}
nilfs_fid {
cno int64
ino int64
gen int32
parent_gen int32
parent_ino int64
} [packed]
isofs_fid {
block int32
offset int16
parent_offset int16
generation int32
parent_block int32
parent_generation int32
}
fid_ocfs2 {
blkno_hi int32
blkno_lo int32
generation int32
}
fid_ocfs2_parent {
base fid_ocfs2
parent_fid fid_ocfs2
}
fid_type = FILEID_ROOT, FILEID_INO32_GEN, FILEID_INO32_GEN_PARENT, FILEID_BTRFS_WITHOUT_PARENT, FILEID_BTRFS_WITH_PARENT, FILEID_BTRFS_WITH_PARENT_ROOT, FILEID_UDF_WITHOUT_PARENT, FILEID_UDF_WITH_PARENT, FILEID_NILFS_WITHOUT_PARENT, FILEID_NILFS_WITH_PARENT, FILEID_FAT_WITHOUT_PARENT, FILEID_FAT_WITH_PARENT, FILEID_LUSTRE, FILEID_KERNFS
mq_attr {
mq_flags intptr
mq_maxmsg intptr
mq_msgsize intptr
mq_curmsgs intptr
__reserved array[const[0, intptr], 4]
}
kexec_segment {
buf buffer[in]
sz len[buf, intptr]
# TODO: this is address in kernel
mem intptr
memsz intptr
}
rusage {
utime timeval
stime timeval
maxrss intptr
ixrss intptr
idrss intptr
isrss intptr
minflt intptr
majflt intptr
nswap intptr
inblock intptr
oublock intptr
msgsnd intptr
msgrcv intptr
signals intptr
nvcsw intptr
nivcsw intptr
}
rlimit {
soft intptr
hard intptr
}
sigaction {
sa_handler ptr[in, text[target]]
sa_flags flags[sigaction_flags, intptr]
sa_restorer ptr[in, text[target]]
sa_mask sigset_t
}
sigaltstack {
ss_sp ptr[out, array[int8]]
ss_flags flags[sigaltstack_flags, int32]
ss_size bytesize[ss_sp, intptr]
}
sigaltstack_flags = SS_ONSTACK, SS_DISABLE, SS_AUTODISARM
tms {
utime intptr
stime intptr
cutime intptr
cstime intptr
}
siginfo {
signo signalno
errno int32
code int32
} [size[SIGINFO_SIZE]]
define SIGINFO_SIZE sizeof(struct siginfo)
timex {
stuff0 intptr
stuff1 intptr
stuff2 intptr
stuff3 intptr
stuff4 intptr
stuff5 intptr
stuff6 intptr
stuff7 intptr
stuff8 intptr
stuff9 intptr
stuff10 intptr
stuff11 intptr
stuff12 intptr
stuff13 intptr
stuff14 intptr
stuff15 intptr
stuff16 intptr
stuff17 intptr
stuff18 intptr
stuff19 intptr
stuff20 intptr
stuff21 intptr
stuff22 intptr
stuff23 intptr
stuff24 intptr
stuff25 intptr
}
ustat {
f_tfree int32
f_tinode intptr
f_fname array[int8, 6]
f_fpack array[int8, 6]
}
user_desc {
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_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, -1
user_desc_limits = 0, 1024, 4096, 8192, 16384, -1
sched_attr {
size bytesize[parent, int32]
sched_policy flags[sched_policy, int32]
sched_flags flags[sched_attr_flags, int64]
sched_nice int32
sched_priority int32
sched_runtime int64
sched_deadline int64
sched_period int64
sched_util_min int32
sched_util_max int32
}
sched_policy = SCHED_NORMAL, SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_IDLE, SCHED_DEADLINE
sched_attr_flags = SCHED_FLAG_RESET_ON_FORK, SCHED_FLAG_RECLAIM, SCHED_FLAG_DL_OVERRUN, SCHED_FLAG_KEEP_POLICY, SCHED_FLAG_KEEP_PARAMS, SCHED_FLAG_UTIL_CLAMP_MIN, SCHED_FLAG_UTIL_CLAMP_MAX, SCHED_FLAG_SUGOV
flock {
type flags[flock_type, int16]
whence flags[seek_whence, int16]
start intptr
len intptr
pid pid
}
f_owner_ex {
type flags[f_owner_type, int32]
pid pid
}
ucred {
pid pid
uid uid
gid gid
}
kcmp_epoll_slot {
efd fd_epoll
tfd fd
toff int32
}
open_how {
flags flags[open_flags, int64]
mode flags[open_mode, int64]
resolve flags[resolve_flags, int64]
}
# Not providing O_WRONLY means O_RDONLY.
open_flags = O_WRONLY, O_RDWR, O_APPEND, FASYNC, O_CLOEXEC, O_CREAT, O_DIRECT, O_DIRECTORY, O_EXCL, O_LARGEFILE, O_NOATIME, O_NOCTTY, O_NOFOLLOW, O_NONBLOCK, O_PATH, O_SYNC, O_TRUNC, __O_TMPFILE
open_mode = S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH
resolve_flags = RESOLVE_CACHED, RESOLVE_BENEATH, RESOLVE_IN_ROOT, RESOLVE_NO_MAGICLINKS, RESOLVE_NO_SYMLINKS, RESOLVE_NO_XDEV
madvise_flags = MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, MADV_WILLNEED, MADV_DONTNEED, MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK, MADV_HWPOISON, MADV_SOFT_OFFLINE, MADV_MERGEABLE, MADV_UNMERGEABLE, MADV_HUGEPAGE, MADV_NOHUGEPAGE, MADV_DONTDUMP, MADV_DODUMP, MADV_WIPEONFORK, MADV_KEEPONFORK, MADV_COLD, MADV_PAGEOUT, MADV_POPULATE_READ, MADV_POPULATE_WRITE, MADV_COLLAPSE
fadvise_flags = POSIX_FADV_NORMAL, POSIX_FADV_SEQUENTIAL, POSIX_FADV_RANDOM, POSIX_FADV_NOREUSE, POSIX_FADV_WILLNEED, POSIX_FADV_DONTNEED
move_pages_flags = MPOL_MF_MOVE, MPOL_MF_MOVE_ALL
msync_flags = MS_ASYNC, MS_SYNC, MS_INVALIDATE
mmap_prot = PROT_EXEC, PROT_READ, PROT_WRITE, PROT_SEM, PROT_GROWSDOWN, PROT_GROWSUP
mmap_flags = MAP_SHARED, MAP_PRIVATE, MAP_32BIT, MAP_ANONYMOUS, MAP_DENYWRITE, MAP_EXECUTABLE, MAP_FILE, MAP_FIXED, MAP_GROWSDOWN, MAP_HUGETLB, MAP_LOCKED, MAP_NONBLOCK, MAP_NORESERVE, MAP_POPULATE, MAP_STACK, MAP_UNINITIALIZED, MAP_SHARED_VALIDATE, MAP_SYNC, MAP_FIXED_NOREPLACE
mremap_flags = MREMAP_MAYMOVE, MREMAP_FIXED, MREMAP_DONTUNMAP
mbind_mode = MPOL_DEFAULT, MPOL_BIND, MPOL_INTERLEAVE, MPOL_PREFERRED, MPOL_F_STATIC_NODES, MPOL_F_RELATIVE_NODES
mbind_flags = MPOL_MF_STRICT, MPOL_MF_MOVE, MPOL_MF_MOVE_ALL
pipe_flags = O_NONBLOCK, O_CLOEXEC, O_DIRECT, O_NOTIFICATION_PIPE
mlock_flags = MLOCK_ONFAULT
mlockall_flags = MCL_CURRENT, MCL_FUTURE, MCL_ONFAULT
dup_flags = O_CLOEXEC
splice_flags = SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT
seek_whence = SEEK_SET, SEEK_CUR, SEEK_END, SEEK_DATA, SEEK_HOLE
signalfd_flags = SFD_NONBLOCK, SFD_CLOEXEC
eventfd_flags = EFD_CLOEXEC, EFD_NONBLOCK, EFD_SEMAPHORE
timerfd_create_flags = TFD_NONBLOCK, TFD_CLOEXEC
timerfd_settime_flags = TFD_TIMER_ABSTIME, TFD_TIMER_CANCEL_ON_SET
clock_type = CLOCK_REALTIME, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC_RAW, CLOCK_BOOTTIME, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID, CLOCK_REALTIME_ALARM, CLOCK_BOOTTIME_ALARM
sigev_notify = SIGEV_NONE, SIGEV_SIGNAL, SIGEV_THREAD, SIGEV_THREAD_ID
cap_version = _LINUX_CAPABILITY_VERSION_1, _LINUX_CAPABILITY_VERSION_2, _LINUX_CAPABILITY_VERSION_3
epoll_flags = EPOLL_CLOEXEC
epoll_ev = POLLIN, POLLOUT, POLLRDHUP, POLLPRI, POLLERR, POLLHUP, EPOLLET, EPOLLONESHOT, EPOLLEXCLUSIVE, EPOLLWAKEUP
pollfd_events = POLLIN, POLLPRI, POLLOUT, POLLERR, POLLHUP, POLLNVAL, POLLRDNORM, POLLRDBAND, POLLWRNORM, POLLWRBAND, POLLMSG, POLLREMOVE, POLLRDHUP, POLLFREE, POLL_BUSY_LOOP
mknod_mode = S_IFREG, S_IFCHR, S_IFBLK, S_IFIFO, S_IFSOCK, S_ISUID, S_ISGID, S_ISVTX, open_mode
at_flags = AT_EMPTY_PATH, AT_SYMLINK_NOFOLLOW, AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, AT_EMPTY_PATH
fallocate_mode = FALLOC_FL_KEEP_SIZE, FALLOC_FL_PUNCH_HOLE, FALLOC_FL_COLLAPSE_RANGE, FALLOC_FL_ZERO_RANGE, FALLOC_FL_INSERT_RANGE, FALLOC_FL_UNSHARE_RANGE, FALLOC_FL_NO_HIDE_STALE
linkat_flags = AT_EMPTY_PATH, AT_SYMLINK_FOLLOW
unlinkat_flags = AT_REMOVEDIR
renameat2_flags = RENAME_EXCHANGE, RENAME_NOREPLACE, RENAME_WHITEOUT
flock_op = LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB
statx_flags = AT_SYMLINK_NOFOLLOW, AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, AT_EMPTY_PATH, AT_STATX_SYNC_TYPE, AT_STATX_SYNC_AS_STAT, AT_STATX_FORCE_SYNC, AT_STATX_DONT_SYNC
statx_mask = 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
name_to_handle_at_flags = AT_EMPTY_PATH, AT_SYMLINK_FOLLOW, AT_HANDLE_FID
mq_open_flags = O_WRONLY, O_RDWR, O_NONBLOCK, O_CREAT, O_EXCL, O_CREAT
finit_module_flags = MODULE_INIT_IGNORE_MODVERSIONS, MODULE_INIT_IGNORE_VERMAGIC
delete_module_flags = O_NONBLOCK, O_TRUNC
kexec_load_flags = KEXEC_ON_CRASH, KEXEC_PRESERVE_CONTEXT, KEXEC_ARCH_386, KEXEC_ARCH_X86_64, KEXEC_ARCH_PPC, KEXEC_ARCH_PPC64, KEXEC_ARCH_IA_64, KEXEC_ARCH_ARM, KEXEC_ARCH_S390, KEXEC_ARCH_SH, KEXEC_ARCH_MIPS, KEXEC_ARCH_MIPS_LE, KEXEC_ARCH_DEFAULT
faccessat_flags = AT_EACCESS, AT_SYMLINK_NOFOLLOW, AT_EMPTY_PATH
sync_file_flags = SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE, SYNC_FILE_RANGE_WAIT_AFTER
kcmp_flags = KCMP_FILE, KCMP_FILES, KCMP_FS, KCMP_IO, KCMP_SIGHAND, KCMP_SYSVSEM, KCMP_VM
rusage_who = RUSAGE_SELF, RUSAGE_CHILDREN, RUSAGE_THREAD
rlimit_type = RLIMIT_AS, RLIMIT_CORE, RLIMIT_CPU, RLIMIT_DATA, RLIMIT_FSIZE, RLIMIT_LOCKS, RLIMIT_MEMLOCK, RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_NOFILE, RLIMIT_NPROC, RLIMIT_RSS, RLIMIT_RTPRIO, RLIMIT_RTTIME, RLIMIT_SIGPENDING, RLIMIT_STACK
# The ones that disable console output are intentionally omitted.
syslog_cmd = SYSLOG_ACTION_CLOSE, SYSLOG_ACTION_OPEN, SYSLOG_ACTION_READ, SYSLOG_ACTION_READ_ALL, SYSLOG_ACTION_READ_CLEAR, SYSLOG_ACTION_SIZE_UNREAD, SYSLOG_ACTION_SIZE_BUFFER
ioprio_which_pid = IOPRIO_WHO_PROCESS, IOPRIO_WHO_PGRP
ioprio_which_uid = IOPRIO_WHO_USER
personality_flags = PER_LINUX, PER_SVR4, PER_SVR3, PER_OSR5, PER_WYSEV386, PER_ISCR4, PER_BSD, PER_XENIX, PER_LINUX32, PER_IRIX32, PER_IRIXN32, PER_IRIX64, PER_RISCOS, PER_SOLARIS, PER_UW7, PER_OSF4, PER_HPUX, ADDR_NO_RANDOMIZE, MMAP_PAGE_ZERO, ADDR_COMPAT_LAYOUT, READ_IMPLIES_EXEC, ADDR_LIMIT_32BIT, SHORT_INODE, WHOLE_SECONDS, STICKY_TIMEOUTS, ADDR_LIMIT_3GB
clock_id = CLOCK_REALTIME, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC_RAW, CLOCK_BOOTTIME, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID
sigprocmask_how = SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK
getitimer_which = ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF
wait_options = WNOHANG, WUNTRACED, WCONTINUED, WEXITED, WSTOPPED, WCONTINUED, WNOHANG, WNOWAIT, __WCLONE, __WALL, __WNOTHREAD
waitid_which = P_PID, P_PGID, P_ALL
sigaction_flags = SA_NOCLDSTOP, SA_NOCLDWAIT, SA_NODEFER, SA_ONSTACK, SA_RESETHAND, SA_RESTART, SA_SIGINFO
timer_flags = TIMER_ABSTIME
utimensat_flags = AT_SYMLINK_NOFOLLOW
priority_which = PRIO_PROCESS, PRIO_PGRP, PRIO_USER
mempolicy_flags = MPOL_F_MEMS_ALLOWED, MPOL_F_ADDR, MPOL_F_NODE
ptrace_req = PTRACE_LISTEN, PTRACE_KILL, PTRACE_INTERRUPT, PTRACE_ATTACH, PTRACE_DETACH
ptrace_req_peek = PTRACE_PEEKTEXT, PTRACE_PEEKDATA
ptrace_req_poke = PTRACE_POKETEXT, PTRACE_POKEDATA
ptrace_req_getregs = PTRACE_GETREGS, PTRACE_GETFPREGS
ptrace_req_setregs = PTRACE_SETREGS, PTRACE_SETFPREGS
ptrace_req_setopts = PTRACE_SETOPTIONS, PTRACE_SEIZE
ptrace_req_cont = PTRACE_CONT, PTRACE_SYSCALL, PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP
pthread_regset = NT_PRSTATUS, NT_PRFPREG, NT_PRPSINFO, NT_TASKSTRUCT, NT_AUXV, NT_386_TLS, NT_386_IOPERM, NT_X86_XSTATE
ptrace_options = PTRACE_O_EXITKILL, PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEEXIT, PTRACE_O_TRACEFORK, PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEVFORK, PTRACE_O_TRACEVFORKDONE
fcntl_dupfd = F_DUPFD, F_DUPFD_CLOEXEC
fcntl_getflags = F_GETFD, F_GETFL, F_GETSIG, F_GETLEASE, F_GETPIPE_SZ, F_GET_SEALS
fcntl_lock = F_SETLK, F_SETLKW, F_GETLK, F_OFD_GETLK, F_OFD_SETLK, F_OFD_SETLKW
fcntl_flags = FD_CLOEXEC
fcntl_status = O_APPEND, FASYNC, O_DIRECT, O_NOATIME, O_NONBLOCK
flock_type = F_RDLCK, F_WRLCK, F_UNLCK
f_owner_type = F_OWNER_TID, F_OWNER_PID, F_OWNER_PGRP
fcntl_notify = DN_MULTISHOT, DN_ACCESS, DN_MODIFY, DN_CREATE, DN_DELETE, DN_RENAME, DN_ATTRIB
seal_types = F_SEAL_SEAL, F_SEAL_SHRINK, F_SEAL_GROW, F_SEAL_WRITE
ioctl_int_in = FIONBIO, FIOASYNC
ioctl_int_out = FIOQSIZE, FIGETBSZ
fcntl_rw_hint = RWF_WRITE_LIFE_NOT_SET, RWH_WRITE_LIFE_NONE, RWH_WRITE_LIFE_SHORT, RWH_WRITE_LIFE_MEDIUM, RWH_WRITE_LIFE_LONG, RWH_WRITE_LIFE_EXTREME
fiemap_flags = FIEMAP_FLAG_SYNC, FIEMAP_FLAG_XATTR, FIEMAP_FLAG_CACHE
fiemap_extent_flags = FIEMAP_EXTENT_LAST, FIEMAP_EXTENT_UNKNOWN, FIEMAP_EXTENT_DELALLOC, FIEMAP_EXTENT_ENCODED, FIEMAP_EXTENT_DATA_ENCRYPTED, FIEMAP_EXTENT_NOT_ALIGNED, FIEMAP_EXTENT_DATA_INLINE, FIEMAP_EXTENT_DATA_TAIL, FIEMAP_EXTENT_UNWRITTEN, FIEMAP_EXTENT_MERGED, FIEMAP_EXTENT_SHARED
getrandom_flags = GRND_NONBLOCK, GRND_RANDOM
clone_flags = CLONE_VM, CLONE_FS, CLONE_FILES, CLONE_SIGHAND, CLONE_PTRACE, CLONE_VFORK, CLONE_PARENT, CLONE_THREAD, CLONE_NEWNS, CLONE_SYSVSEM, CLONE_SETTLS, CLONE_PARENT_SETTID, CLONE_CHILD_CLEARTID, CLONE_UNTRACED, CLONE_CHILD_SETTID, CLONE_NEWCGROUP, CLONE_NEWUTS, CLONE_NEWIPC, CLONE_NEWUSER, CLONE_NEWPID, CLONE_NEWNET, CLONE_IO, CLONE_PIDFD, CLONE_NEWTIME
clone3_flags = CLONE_CLEAR_SIGHAND, CLONE_INTO_CGROUP, clone_flags
ptrace_peeksiginfo_flags = PTRACE_PEEKSIGINFO_SHARED
close_range_flags = CLOSE_RANGE_UNSHARE
# Consts for target.SpecialFileLenghts.
_ = SMB_PATH_MAX, XT_CGROUP_PATH_MAX, XENSTORE_REL_PATH_MAX
# misc
_ = KCOV_INIT_TRACE, KCOV_ENABLE, KCOV_DISABLE, KCOV_TRACE_PC, KCOV_TRACE_CMP, PTRACE_TRACEME, SYSLOG_ACTION_CONSOLE_ON, SYSLOG_ACTION_CONSOLE_OFF, SYSLOG_ACTION_CONSOLE_LEVEL, SYSLOG_ACTION_CLEAR, __NR_mmap2
# Hardcode KCOV_REMOTE_ENABLE value for amd64 until new kcov patches reach mainline.
define KCOV_REMOTE_ENABLE 1075340134
# Not yet implemented syscalls:
# umask
# vhangup
# _sysctl
# nfsservctl
# getcpu
# Probably no sense in calling these.
# Also affect system-wide state, so not reproducible anyway.
# sched_get_priority_max
# sched_get_priority_min
]
|
| 37/2 |
2026/05/19 15:57 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 88556
output: 22
thoughts: 249
Thoughts: **Analyzing JFS Image Mounting in Syzkaller**
Okay, so `syz_mount_image$jfs` takes an `img ptr[in, compressed_image]` argument. Right, that makes sense. If I were to craft a Syz program like:
```
syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
```
...would that leverage a seed image for the JFS? Ah, no, the fuzzer utilizes seed images during generation and mutation. Reproduction, however, relies on the exact bytes within the program. If I pass `0x0` as the image pointer, that'll translate to either a NULL pointer or an empty image. And, of course, that would cause the mount operation to fail.
So, could I just try using the standard `mount` command with an empty image? No, that's not going to work either, JFS requires a valid superblock.
Hmm, so how *else* can I obtain a usable JFS image for this kind of testing? Maybe I could use `codesearch-dir-index` and scour the kernel tree to see if there are any example JFS images I can leverage, or at least use as a starting point.
|
| 38/2 |
2026/05/19 15:57 |
tool |
codesearch-dir-index |
0m
Args:
Results: map[Files:[acl.c file.c inode.c ioctl.c jfs_acl.h jfs_btree.h jfs_debug.c jfs_debug.h jfs_dinode.h jfs_discard.c jfs_discard.h jfs_dmap.c jfs_dmap.h jfs_dtree.c jfs_dtree.h jfs_extent.c jfs_extent.h jfs_filsys.h jfs_imap.c jfs_imap.h jfs_incore.h jfs_inode.c jfs_inode.h jfs_lock.h jfs_logmgr.c jfs_logmgr.h jfs_metapage.c jfs_metapage.h jfs_mount.c jfs_superblock.h jfs_txnmgr.c jfs_txnmgr.h jfs_types.h jfs_umount.c jfs_unicode.c jfs_unicode.h jfs_xattr.h jfs_xtree.c jfs_xtree.h namei.c resize.c super.c symlink.c xattr.c] Subdirs:<nil>]
|
| 39/2 |
2026/05/19 15:57 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 89560
output: 102
thoughts: 96
Thoughts: **JFS Image Generation and Lockdep Triggering**
Okay, so there aren't any readily available images for JFS. That's a hurdle. But wait, I could potentially create a minimal JFS image from scratch, right? I know the superblock is 4096 bytes, so I could start there. Hmm, hold on... crafting a *valid* JFS image by hand is a notoriously complex task. Not worth the effort for what I am trying to achieve.
Okay, so generating a image by hand may be too complex. Is there another way to trigger this `lockdep` warning?
What if I leverage `reproduce-crash`? I could try to reproduce the crash using a program that specifically uses `syz_mount_image$jfs`, but without providing any image data. Let's try that, it seems simpler to execute than creating a full image.
|
| 40/2 |
2026/05/19 15:57 |
tool |
reproduce-crash |
1m
Args: map[ReproSyz:syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
]
Results: map[CoverageID: ReproducedBugTitle: ReproducedCrashReport:]
|
| 41/2 |
2026/05/19 15:59 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 89978
output: 44
thoughts: 792
Thoughts: **Debugging a JFS Filesystem Vulnerability**
Okay, so the program didn't crash directly, which is good, but now I need to figure out how to reproduce the bug. I was thinking about using `syz_mount_image$jfs` with the `AUTO` option, but then I realized that would just pass an empty string, which won't work as a JFS image. Hmm, could Syzkaller be leveraging some sort of seed image capability with `syz_mount_image`? No, that's only during generation, so I'm not going to get any use out of that.
I don't have access to the Syzkaller repository right now, so searching for a JFS image there is out. The key question is how to trigger `jfs_commit_inode`. It looks like that's called from `jfs_write_inode`, so how can I trigger *that*? Ah, right, `jfs_write_inode` is called when the VFS wants to write a dirty inode. But I still need a JFS filesystem mounted, and how am I supposed to do that without an image? I'm not aware of any bug report or existing reproducer that might help.
Could I use `execve` to run `mkfs.jfs`? Let's give it a try with a Syz program that calls `mkfs.jfs`. Okay, so first, I'd need to open `/dev/loop0`. I was thinking I'd need to write some data to the loop device, but no, it is a block device, so it needs a backing file. Wait, Syzkaller already handles the setup of `/dev/loop0` with `syz_mount_image` internally? That makes this much easier. I can use a file! Great.
I can *create* an image file. Then run `mkfs.jfs ./img` on it. But I can't just run it. How do I actually trigger it? Wait, `execve` is not in `sys.txt`! Let me quickly double-check... yep, it's not there. So I can't use `execve` to call `mkfs.jfs`.
How did the fuzzer even trigger this initially? Right, it used `syz_mount_image$jfs` with a *mutated* JFS image. Maybe I can find a small JFS image online? No internet access, so that won't work. Could I use `mount` directly on a loop device and maybe JFS isn't strict about the superblock? No, JFS does check the magic number, which is "JFS1". Time to look at `jfs_mount.c` to see what it checks.
|
| 42/2 |
2026/05/19 15:59 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_mount.c IncludeLines:true Name:jfs_mount]
Results: map[SourceCode: 57: /*
58: * NAME: jfs_mount(sb)
59: *
60: * FUNCTION: vfs_mount()
61: *
62: * PARAMETER: sb - super block
63: *
64: * RETURN: -EBUSY - device already mounted or open for write
65: * -EBUSY - cvrdvp already mounted;
66: * -EBUSY - mount table full
67: * -ENOTDIR- cvrdvp not directory on a device mount
68: * -ENXIO - device open failure
69: */
70: int jfs_mount(struct super_block *sb)
71: {
72: int rc = 0; /* Return code */
73: struct jfs_sb_info *sbi = JFS_SBI(sb);
74: struct inode *ipaimap = NULL;
75: struct inode *ipaimap2 = NULL;
76: struct inode *ipimap = NULL;
77: struct inode *ipbmap = NULL;
78:
79: /*
80: * read/validate superblock
81: * (initialize mount inode from the superblock)
82: */
83: if ((rc = chkSuper(sb))) {
84: goto out;
85: }
86:
87: ipaimap = diReadSpecial(sb, AGGREGATE_I, 0);
88: if (ipaimap == NULL) {
89: jfs_err("jfs_mount: Failed to read AGGREGATE_I");
90: rc = -EIO;
91: goto out;
92: }
93: sbi->ipaimap = ipaimap;
94:
95: jfs_info("jfs_mount: ipaimap:0x%p", ipaimap);
96:
97: /*
98: * initialize aggregate inode allocation map
99: */
100: if ((rc = diMount(ipaimap))) {
101: jfs_err("jfs_mount: diMount(ipaimap) failed w/rc = %d", rc);
102: goto err_ipaimap;
103: }
104:
105: /*
106: * open aggregate block allocation map
107: */
108: ipbmap = diReadSpecial(sb, BMAP_I, 0);
109: if (ipbmap == NULL) {
110: rc = -EIO;
111: goto err_umount_ipaimap;
112: }
113:
114: jfs_info("jfs_mount: ipbmap:0x%p", ipbmap);
115:
116: sbi->ipbmap = ipbmap;
117:
118: /*
119: * initialize aggregate block allocation map
120: */
121: if ((rc = dbMount(ipbmap))) {
122: jfs_err("jfs_mount: dbMount failed w/rc = %d", rc);
123: goto err_ipbmap;
124: }
125:
126: /*
127: * open the secondary aggregate inode allocation map
128: *
129: * This is a duplicate of the aggregate inode allocation map.
130: *
131: * hand craft a vfs in the same fashion as we did to read ipaimap.
132: * By adding INOSPEREXT (32) to the inode number, we are telling
133: * diReadSpecial that we are reading from the secondary aggregate
134: * inode table. This also creates a unique entry in the inode hash
135: * table.
136: */
137: if ((sbi->mntflag & JFS_BAD_SAIT) == 0) {
138: ipaimap2 = diReadSpecial(sb, AGGREGATE_I, 1);
139: if (!ipaimap2) {
140: jfs_err("jfs_mount: Failed to read AGGREGATE_I");
141: rc = -EIO;
142: goto err_umount_ipbmap;
143: }
144: sbi->ipaimap2 = ipaimap2;
145:
146: jfs_info("jfs_mount: ipaimap2:0x%p", ipaimap2);
147:
148: /*
149: * initialize secondary aggregate inode allocation map
150: */
151: if ((rc = diMount(ipaimap2))) {
152: jfs_err("jfs_mount: diMount(ipaimap2) failed, rc = %d",
153: rc);
154: goto err_ipaimap2;
155: }
156: } else
157: /* Secondary aggregate inode table is not valid */
158: sbi->ipaimap2 = NULL;
159:
160: /*
161: * mount (the only/single) fileset
162: */
163: /*
164: * open fileset inode allocation map (aka fileset inode)
165: */
166: ipimap = diReadSpecial(sb, FILESYSTEM_I, 0);
167: if (ipimap == NULL) {
168: jfs_err("jfs_mount: Failed to read FILESYSTEM_I");
169: /* open fileset secondary inode allocation map */
170: rc = -EIO;
171: goto err_umount_ipaimap2;
172: }
173: jfs_info("jfs_mount: ipimap:0x%p", ipimap);
174:
175: /* initialize fileset inode allocation map */
176: if ((rc = diMount(ipimap))) {
177: jfs_err("jfs_mount: diMount failed w/rc = %d", rc);
178: goto err_ipimap;
179: }
180:
181: /* map further access of per fileset inodes by the fileset inode */
182: sbi->ipimap = ipimap;
183:
184: return rc;
185:
186: /*
187: * unwind on error
188: */
189: err_ipimap:
190: /* close fileset inode allocation map inode */
191: diFreeSpecial(ipimap);
192: err_umount_ipaimap2:
193: /* close secondary aggregate inode allocation map */
194: if (ipaimap2)
195: diUnmount(ipaimap2, 1);
196: err_ipaimap2:
197: /* close aggregate inodes */
198: if (ipaimap2)
199: diFreeSpecial(ipaimap2);
200: err_umount_ipbmap: /* close aggregate block allocation map */
201: dbUnmount(ipbmap, 1);
202: err_ipbmap: /* close aggregate inodes */
203: diFreeSpecial(ipbmap);
204: err_umount_ipaimap: /* close aggregate inode allocation map */
205: diUnmount(ipaimap, 1);
206: err_ipaimap: /* close aggregate inodes */
207: diFreeSpecial(ipaimap);
208: out:
209: if (rc)
210: jfs_err("Mount JFS Failure: %d", rc);
211:
212: return rc;
213: }
SourceFile:fs/jfs/jfs_mount.c]
|
| 43/2 |
2026/05/19 15:59 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 93708
output: 44
thoughts: 277
Thoughts: **My Approach to Reproducing a JFS Mount Crash**
Okay, let's break this down. My initial thought is that `chkSuper` likely reads the superblock when mounting. So, if I just try `syz_mount_image$jfs` without providing an image, it should fail in `chkSuper` and throw an error. Makes sense.
But hold on, the fuzzer itself *does* use `syz_mount_image$jfs`, and it has a seed image! Interesting... So, if I write a syz program with `syz_mount_image$jfs`, the `reproduce-crash` tool will compile and run it, right? If I don't give it any image bytes, they will simply be empty. Hmm, that's not going to work, or is it?
Wait, I can just grab a small JFS image hex string from *another* syzkaller reproducer. That's a good place to start. Now, where to look? I can't search the internet, so I need to search the kernel source or syzkaller issues and commits. Can't search the internet though.
I could try searching the kernel source tree for `JFS_MAGIC` or something like that, but wait, it's a *binary* image. That won't help much!
Okay, new plan: what if I use `syz_mount_image$jfs` with a tiny image I *construct*? Right, the JFS superblock is at offset 32768, or 0x8000. That's a key bit of information. Let me see... What's `JFS_MAGIC`? Aha! It's "JFS1"!
Okay, I'm getting somewhere. Let me pull up `jfs_superblock.h` and take a look.
|
| 44/2 |
2026/05/19 15:59 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_superblock.h IncludeLines:true Name:jfs_superblock]
Results: map[SourceCode: 19: /*
20: * aggregate superblock
21: *
22: * The name superblock is too close to super_block, so the name has been
23: * changed to jfs_superblock. The utilities are still using the old name.
24: */
25: struct jfs_superblock {
26: char s_magic[4]; /* 4: magic number */
27: __le32 s_version; /* 4: version number */
28:
29: __le64 s_size; /* 8: aggregate size in hardware/LVM blocks;
30: * VFS: number of blocks
31: */
32: __le32 s_bsize; /* 4: aggregate block size in bytes;
33: * VFS: fragment size
34: */
35: __le16 s_l2bsize; /* 2: log2 of s_bsize */
36: __le16 s_l2bfactor; /* 2: log2(s_bsize/hardware block size) */
37: __le32 s_pbsize; /* 4: hardware/LVM block size in bytes */
38: __le16 s_l2pbsize; /* 2: log2 of s_pbsize */
39: __le16 pad; /* 2: padding necessary for alignment */
40:
41: __le32 s_agsize; /* 4: allocation group size in aggr. blocks */
42:
43: __le32 s_flag; /* 4: aggregate attributes:
44: * see jfs_filsys.h
45: */
46: __le32 s_state; /* 4: mount/unmount/recovery state:
47: * see jfs_filsys.h
48: */
49: __le32 s_compress; /* 4: > 0 if data compression */
50:
51: pxd_t s_ait2; /* 8: first extent of secondary
52: * aggregate inode table
53: */
54:
55: pxd_t s_aim2; /* 8: first extent of secondary
56: * aggregate inode map
57: */
58: __le32 s_logdev; /* 4: device address of log */
59: __le32 s_logserial; /* 4: log serial number at aggregate mount */
60: pxd_t s_logpxd; /* 8: inline log extent */
61:
62: pxd_t s_fsckpxd; /* 8: inline fsck work space extent */
63:
64: struct timestruc_t s_time; /* 8: time last updated */
65:
66: __le32 s_fsckloglen; /* 4: Number of filesystem blocks reserved for
67: * the fsck service log.
68: * N.B. These blocks are divided among the
69: * versions kept. This is not a per
70: * version size.
71: * N.B. These blocks are included in the
72: * length field of s_fsckpxd.
73: */
74: s8 s_fscklog; /* 1: which fsck service log is most recent
75: * 0 => no service log data yet
76: * 1 => the first one
77: * 2 => the 2nd one
78: */
79: char s_fpack[11]; /* 11: file system volume name
80: * N.B. This must be 11 bytes to
81: * conform with the OS/2 BootSector
82: * requirements
83: * Only used when s_version is 1
84: */
85:
86: /* extendfs() parameter under s_state & FM_EXTENDFS */
87: __le64 s_xsize; /* 8: extendfs s_size */
88: pxd_t s_xfsckpxd; /* 8: extendfs fsckpxd */
89: pxd_t s_xlogpxd; /* 8: extendfs logpxd */
90: uuid_t s_uuid; /* 16: 128-bit uuid for volume */
91: char s_label[16]; /* 16: volume label */
92: uuid_t s_loguuid; /* 16: 128-bit uuid for log device */
93:
94: };
SourceFile:fs/jfs/jfs_superblock.h]
|
| 45/2 |
2026/05/19 15:59 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 95762
output: 102
thoughts: 215
Thoughts: **JFS Image Generation Quandary**
Okay, creating a valid JFS image from scratch... that's just a massive headache. Too complex, too many gotchas. Hmmm, hold on. Could I leverage `mount` with an existing filesystem that somehow triggers the *same* lockdep warning? But no, the lockdep warning is specifically about `jfs_ip->commit_mutex` and `log->loglock`. I need a way to get a real JFS image.
Aha! What about `syz_mount_image$jfs`? I seem to recall that if I don't give the `img` argument, the fuzzer's seed image gets used automatically. That's a good lead. Let's see... If I write:
```
syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
```
...that should trigger it. Let's test that, see what happens.
|
| 46/2 |
2026/05/19 15:59 |
tool |
reproduce-crash |
0m
Args: map[ReproSyz:syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
]
Results: map[CoverageID: ReproducedBugTitle: ReproducedCrashReport:]
|
| 47/2 |
2026/05/19 15:59 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 96380
output: 17
thoughts: 431
Thoughts: **Navigating the JFS Fuzzing Challenge**
Okay, so the VM didn't crash, which is a good starting point. My initial instinct was to try `mkfs.jfs` to get a filesystem set up, but I need to figure out if it's even available within this environment. I briefly thought about writing a C program to call `system("mkfs.jfs...")`, but I quickly remembered I'm limited to syzkaller programs here. The `execve` route looked promising, but it's not in `sys.txt` and so unavailable. So there is no way to execute arbitrary commands!
How did the fuzzer even trigger this if I can't generate the required image myself? Ah, the fuzzer probably had a JFS seed image. The challenge is recreating the scenario without that. I'm hitting a wall: the bug report doesn't have a reproducer, and I don't have access to the syzkaller repository to search for a JFS image.
I considered mounting a loop device with `jfs` and then using `ioctl` for formatting, but formatting is done in userspace, that won't work. The only thing I can think of right now is trying `syz_mount_image$jfs`, but it needs a *valid* JFS image hex string as input. Where would I even *get* that? I can't write a python script to generate it because I can't run python. Internet access is a no-go, so I can't search for a string online. Ok, my best bet right now is to search the kernel source for "JFS1" to see if there are any test images.
|
| 48/2 |
2026/05/19 16:00 |
tool |
grepper |
0m
Args:
Results: map[Output:fs/jfs/jfs_incore.h-21- */
fs/jfs/jfs_incore.h:22:#define JFS_SUPER_MAGIC 0x3153464a /* "JFS1" */
fs/jfs/jfs_incore.h-23-
--
fs/jfs/jfs_superblock.h-12- */
fs/jfs/jfs_superblock.h:13:#define JFS_MAGIC "JFS1" /* Magic word */
fs/jfs/jfs_superblock.h-14-
]
|
| 49/2 |
2026/05/19 16:00 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 97349
output: 103
thoughts: 354
Thoughts: **Debugging JFS Inode Commits**
Okay, so I'm trying to figure out how to trigger `jfs_commit_inode`. I don't have any test images to work with, which is a bit of a roadblock. I started by wondering if there was another way, some other syscall maybe, to trigger that function directly, but I quickly realized that's probably not the case. The function is specifically called when an inode is written back to disk. And, since I can't currently mount a JFS filesystem, that avenue is closed off.
The challenge is clear: I need a way to *write back* an inode. I briefly considered opening `/dev/jfs`, but that won't work either. I then remembered the obvious. Since `jfs_commit_inode` is filesystem-specific, it's only called within JFS.
Then it hit me. I should try using `syz_mount_image$jfs`. Could syzkaller automatically provide a seed image if I use the `AUTO` option? I'm going to try it.
I typed out this call:
```
syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x1000, &AUTO="")
```
Wait a second… `&AUTO=""` just gives an empty string. That's no good. What if I try just `&AUTO`? That should be the correct use case. I need to get syzkaller to generate an image automatically.
Here's the new plan:
```
syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x1000, &AUTO)
```
Let's see if that works!
|
| 50/2 |
2026/05/19 16:00 |
tool |
reproduce-crash |
1m
Args: map[ReproSyz:syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x1000, &AUTO)
]
Results: map[CoverageID: ReproducedBugTitle: ReproducedCrashReport:]
|
| 51/2 |
2026/05/19 16:01 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 98321
output: 46
thoughts: 445
Thoughts: **JFS Image Conundrum**
Okay, so the program didn't crash, good. Now, I see `syz_mount_image$jfs` is flagged with `no_generate` and `no_minimize`. Hmm, that means the fuzzer is relying *solely* on seed descriptions to create it. And those seeds? They're probably hiding in `sys/linux/fs_image.go` or something similar. If I don't have that seed, I'm stuck. No JFS mounting for me.
Wait, I could write a C program to create a JFS image, right? But hold on... I'm working with syzkaller, not straight C. I can't just whip up a C program. Darn.
Okay, can I repurpose `syz_mount_image$ext4` somehow? No, the bug is JFS-specific. Is there *any* other route to a JFS image?
Hmm... what about using a `loop` device and then using `ioctl` to format it? No, that won't work either. Formatting requires `mkfs.jfs`, and that writes specific bytes.
Wait, wait... I *could* write a syzkaller program that directly writes the exact byte sequence of a JFS image to a file, and then try to mount that! Problem is, I don't have a clue what the *exact* bytes are.
Can I construct a *minimal* JFS image? Let's see, what are the bare necessities? I know I need a superblock at offset 32768 (0x8000). Within that, I'll need:
* `s_magic` - has to be "JFS1", right?
* `s_version` - 1 or 2, I guess
* `s_size` - number of blocks.
* `s_bsize` - block size. Maybe 4096?
* `s_l2bsize` - should be 12.
* `s_pbsize` - 512.
* `s_l2pbsize` - 9.
* `s_agsize` - allocation group size, probably need to check documentation for how to calculate that.
* `s_flag` - Is it `JFS_LINUX` (0x10000000)? Gotta check `jfs_filsys.h` to make sure.
Okay, time to check `jfs_filsys.h`. Let's see if I can find that flag...
|
| 52/2 |
2026/05/19 16:02 |
tool |
codesearch-definition-source |
0m
Error:
Args: map[ContextFile:fs/jfs/jfs_filsys.h IncludeLines:true Name:JFS_LINUX]
Results: map[SourceCode: SourceFile:]
|
| 53/2 |
2026/05/19 16:02 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 99417
output: 31
thoughts: 21
Thoughts: Here's my thought process, summarized as you requested:
**Navigating the JFS Flags**
Okay, so I need to understand how the JFS filesystem handles its flags. I'm going to start by diving into the header file, specifically `jfs_filsys.h`. That's where I'd expect to find the definitions for any `JFS_` flags. I want to see how they're structured, what they represent, and how they relate to the overall filesystem behavior. Time to dig in and see what treasures I can unearth!
|
| 54/2 |
2026/05/19 16:02 |
tool |
codesearch-file-index |
0m
Args: map[SourceFile:fs/jfs/jfs_filsys.h]
Results:
|
| 55/2 |
2026/05/19 16:02 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 99600
output: 22
thoughts: 38
Thoughts: Here's my thought process, distilled:
**Oh Crap, Where's the Header?**
Okay, hold on a second... `jfs_filsys.h` is either nonexistent or, even worse, empty. That's a red flag. I need to verify its location and contents immediately. Let's make sure I'm looking in the right place – let's double-check the path, specifically `fs/jfs/jfs_filsys.h`. I *know* JFS well enough, but I have to trust nothing. It's time to check what's actually there.
|
| 56/2 |
2026/05/19 16:02 |
tool |
codesearch-dir-index |
0m
Args:
Results: map[Files:[acl.c file.c inode.c ioctl.c jfs_acl.h jfs_btree.h jfs_debug.c jfs_debug.h jfs_dinode.h jfs_discard.c jfs_discard.h jfs_dmap.c jfs_dmap.h jfs_dtree.c jfs_dtree.h jfs_extent.c jfs_extent.h jfs_filsys.h jfs_imap.c jfs_imap.h jfs_incore.h jfs_inode.c jfs_inode.h jfs_lock.h jfs_logmgr.c jfs_logmgr.h jfs_metapage.c jfs_metapage.h jfs_mount.c jfs_superblock.h jfs_txnmgr.c jfs_txnmgr.h jfs_types.h jfs_umount.c jfs_unicode.c jfs_unicode.h jfs_xattr.h jfs_xtree.c jfs_xtree.h namei.c resize.c super.c symlink.c xattr.c] Subdirs:<nil>]
|
| 57/2 |
2026/05/19 16:02 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 100199
output: 27
thoughts: 9
Thoughts: Okay, here's the summary, formatted as requested:
**Initial Assessment: Proceeding with Examination**
Right, it's there. The subject material, whatever it may be, exists. That's the baseline. No need to belabor the point. Now, let's just get to it and actually read it. My expertise allows for a rapid assessment and synthesis of information. I'm ready to delve in.
|
| 58/2 |
2026/05/19 16:02 |
tool |
read-file |
0m
Args: map[File:fs/jfs/jfs_filsys.h]
Results: map[Contents:/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) International Business Machines Corp., 2000-2003
*/
#ifndef _H_JFS_FILSYS
#define _H_JFS_FILSYS
/*
* jfs_filsys.h
*
* file system (implementation-dependent) constants
*
* refer to <limits.h> for system wide implementation-dependent constants
*/
/*
* file system option (superblock flag)
*/
/* directory option */
#define JFS_UNICODE 0x00000001 /* unicode name */
/* mount time flags for error handling */
#define JFS_ERR_REMOUNT_RO 0x00000002 /* remount read-only */
#define JFS_ERR_CONTINUE 0x00000004 /* continue */
#define JFS_ERR_PANIC 0x00000008 /* panic */
#define JFS_ERR_MASK (JFS_ERR_REMOUNT_RO|JFS_ERR_CONTINUE|JFS_ERR_PANIC)
/* Quota support */
#define JFS_USRQUOTA 0x00000010
#define JFS_GRPQUOTA 0x00000020
/* mount time flag to disable journaling to disk */
#define JFS_NOINTEGRITY 0x00000040
/* mount time flag to enable TRIM to ssd disks */
#define JFS_DISCARD 0x00000080
/* commit option */
#define JFS_COMMIT 0x00000f00 /* commit option mask */
#define JFS_GROUPCOMMIT 0x00000100 /* group (of 1) commit */
#define JFS_LAZYCOMMIT 0x00000200 /* lazy commit */
#define JFS_TMPFS 0x00000400 /* temporary file system -
* do not log/commit:
* Never implemented
*/
/* log logical volume option */
#define JFS_INLINELOG 0x00000800 /* inline log within file system */
#define JFS_INLINEMOVE 0x00001000 /* inline log being moved */
/* Secondary aggregate inode table */
#define JFS_BAD_SAIT 0x00010000 /* current secondary ait is bad */
/* sparse regular file support */
#define JFS_SPARSE 0x00020000 /* sparse regular file */
/* DASD Limits F226941 */
#define JFS_DASD_ENABLED 0x00040000 /* DASD limits enabled */
#define JFS_DASD_PRIME 0x00080000 /* Prime DASD usage on boot */
/* big endian flag */
#define JFS_SWAP_BYTES 0x00100000 /* running on big endian computer */
/* Directory index */
#define JFS_DIR_INDEX 0x00200000 /* Persistent index for */
/* platform options */
#define JFS_LINUX 0x10000000 /* Linux support */
#define JFS_DFS 0x20000000 /* DCE DFS LFS support */
/* Never implemented */
#define JFS_OS2 0x40000000 /* OS/2 support */
/* case-insensitive name/directory support */
#define JFS_AIX 0x80000000 /* AIX support */
/*
* buffer cache configuration
*/
/* page size */
#ifdef PSIZE
#undef PSIZE
#endif
#define PSIZE 4096 /* page size (in byte) */
#define L2PSIZE 12 /* log2(PSIZE) */
#define POFFSET 4095 /* offset within page */
/* buffer page size */
#define BPSIZE PSIZE
/*
* fs fundamental size
*
* PSIZE >= file system block size >= PBSIZE >= DISIZE
*/
#define PBSIZE 512 /* physical block size (in byte) */
#define L2PBSIZE 9 /* log2(PBSIZE) */
#define DISIZE 512 /* on-disk inode size (in byte) */
#define L2DISIZE 9 /* log2(DISIZE) */
#define IDATASIZE 256 /* inode inline data size */
#define IXATTRSIZE 128 /* inode inline extended attribute size */
#define XTPAGE_SIZE 4096
#define log2_PAGESIZE 12
#define IAG_SIZE 4096
#define IAG_EXTENT_SIZE 4096
#define INOSPERIAG 4096 /* number of disk inodes per iag */
#define L2INOSPERIAG 12 /* l2 number of disk inodes per iag */
#define INOSPEREXT 32 /* number of disk inode per extent */
#define L2INOSPEREXT 5 /* l2 number of disk inode per extent */
#define IXSIZE (DISIZE * INOSPEREXT) /* inode extent size */
#define INOSPERPAGE 8 /* number of disk inodes per 4K page */
#define L2INOSPERPAGE 3 /* log2(INOSPERPAGE) */
#define IAGFREELIST_LWM 64
#define INODE_EXTENT_SIZE IXSIZE /* inode extent size */
#define NUM_INODE_PER_EXTENT INOSPEREXT
#define NUM_INODE_PER_IAG INOSPERIAG
#define MINBLOCKSIZE 512
#define L2MINBLOCKSIZE 9
#define MAXBLOCKSIZE 4096
#define L2MAXBLOCKSIZE 12
#define MAXFILESIZE ((s64)1 << 52)
#define JFS_LINK_MAX 0xffffffff
/* Minimum number of bytes supported for a JFS partition */
#define MINJFS (0x1000000)
#define MINJFSTEXT "16"
/*
* file system block size -> physical block size
*/
#define LBOFFSET(x) ((x) & (PBSIZE - 1))
#define LBNUMBER(x) ((x) >> L2PBSIZE)
#define LBLK2PBLK(sb,b) ((b) << (sb->s_blocksize_bits - L2PBSIZE))
#define PBLK2LBLK(sb,b) ((b) >> (sb->s_blocksize_bits - L2PBSIZE))
/* size in byte -> last page number */
#define SIZE2PN(size) ( ((s64)((size) - 1)) >> (L2PSIZE) )
/* size in byte -> last file system block number */
#define SIZE2BN(size, l2bsize) ( ((s64)((size) - 1)) >> (l2bsize) )
/*
* fixed physical block address (physical block size = 512 byte)
*
* NOTE: since we can't guarantee a physical block size of 512 bytes the use of
* these macros should be removed and the byte offset macros used instead.
*/
#define SUPER1_B 64 /* primary superblock */
#define AIMAP_B (SUPER1_B + 8) /* 1st extent of aggregate inode map */
#define AITBL_B (AIMAP_B + 16) /*
* 1st extent of aggregate inode table
*/
#define SUPER2_B (AITBL_B + 32) /* 2ndary superblock pbn */
#define BMAP_B (SUPER2_B + 8) /* block allocation map */
/*
* SIZE_OF_SUPER defines the total amount of space reserved on disk for the
* superblock. This is not the same as the superblock structure, since all of
* this space is not currently being used.
*/
#define SIZE_OF_SUPER PSIZE
/*
* SIZE_OF_AG_TABLE defines the amount of space reserved to hold the AG table
*/
#define SIZE_OF_AG_TABLE PSIZE
/*
* SIZE_OF_MAP_PAGE defines the amount of disk space reserved for each page of
* the inode allocation map (to hold iag)
*/
#define SIZE_OF_MAP_PAGE PSIZE
/*
* fixed byte offset address
*/
#define SUPER1_OFF 0x8000 /* primary superblock */
#define AIMAP_OFF (SUPER1_OFF + SIZE_OF_SUPER)
/*
* Control page of aggregate inode map
* followed by 1st extent of map
*/
#define AITBL_OFF (AIMAP_OFF + (SIZE_OF_MAP_PAGE << 1))
/*
* 1st extent of aggregate inode table
*/
#define SUPER2_OFF (AITBL_OFF + INODE_EXTENT_SIZE)
/*
* secondary superblock
*/
#define BMAP_OFF (SUPER2_OFF + SIZE_OF_SUPER)
/*
* block allocation map
*/
/*
* The following macro is used to indicate the number of reserved disk blocks at
* the front of an aggregate, in terms of physical blocks. This value is
* currently defined to be 32K. This turns out to be the same as the primary
* superblock's address, since it directly follows the reserved blocks.
*/
#define AGGR_RSVD_BLOCKS SUPER1_B
/*
* The following macro is used to indicate the number of reserved bytes at the
* front of an aggregate. This value is currently defined to be 32K. This
* turns out to be the same as the primary superblock's byte offset, since it
* directly follows the reserved blocks.
*/
#define AGGR_RSVD_BYTES SUPER1_OFF
/*
* The following macro defines the byte offset for the first inode extent in
* the aggregate inode table. This allows us to find the self inode to find the
* rest of the table. Currently this value is 44K.
*/
#define AGGR_INODE_TABLE_START AITBL_OFF
/*
* fixed reserved inode number
*/
/* aggregate inode */
#define AGGR_RESERVED_I 0 /* aggregate inode (reserved) */
#define AGGREGATE_I 1 /* aggregate inode map inode */
#define BMAP_I 2 /* aggregate block allocation map inode */
#define LOG_I 3 /* aggregate inline log inode */
#define BADBLOCK_I 4 /* aggregate bad block inode */
#define FILESYSTEM_I 16 /* 1st/only fileset inode in ait:
* fileset inode map inode
*/
/* per fileset inode */
#define FILESET_RSVD_I 0 /* fileset inode (reserved) */
#define FILESET_EXT_I 1 /* fileset inode extension */
#define ROOT_I 2 /* fileset root inode */
#define ACL_I 3 /* fileset ACL inode */
#define FILESET_OBJECT_I 4 /* the first fileset inode available for a file
* or directory or link...
*/
#define FIRST_FILESET_INO 16 /* the first aggregate inode which describes
* an inode. (To fsck this is also the first
* inode in part 2 of the agg inode table.)
*/
/*
* directory configuration
*/
#define JFS_NAME_MAX 255
#define JFS_PATH_MAX BPSIZE
/*
* file system state (superblock state)
*/
#define FM_CLEAN 0x00000000 /* file system is unmounted and clean */
#define FM_MOUNT 0x00000001 /* file system is mounted cleanly */
#define FM_DIRTY 0x00000002 /* file system was not unmounted and clean
* when mounted or
* commit failure occurred while being mounted:
* fsck() must be run to repair
*/
#define FM_LOGREDO 0x00000004 /* log based recovery (logredo()) failed:
* fsck() must be run to repair
*/
#define FM_EXTENDFS 0x00000008 /* file system extendfs() in progress */
#define FM_STATE_MAX 0x0000000f /* max value of s_state */
#endif /* _H_JFS_FILSYS */
]
|
| 59/2 |
2026/05/19 16:02 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 103471
output: 89
thoughts: 1363
Thoughts: **Exploiting JFS Vulnerability Through Core Dump Manipulation**
Okay, so I'm trying to figure out how to trigger this JFS bug, and it's proving tricky. First, I wanted to create a JFS image and mount it, but I hit a wall with `syz_mount_image$jfs`. Trying to use it without providing a valid image, as a starting point, didn't crash. My intuition says that passing `&AUTO` might allocate memory but not a valid image. I need to get my hands on a JFS image. I thought, perhaps I could leverage `reproduce-crash` and see if the fuzzer had generated one, but `syz-execprog` only runs what's explicitly in the program, so that's a dead end. Searching for a pre-existing JFS image in the syzkaller repository didn't pan out either.
I then started thinking about how the target function, `jfs_commit_inode`, is called. It's called from `jfs_write_inode`, which is called from `write_inode`. So, I'm stuck within JFS. Without being able to mount JFS, I can't directly trigger the bug. I got a bright idea: use `execve` to run `mkfs.jfs`! While I can't directly use `syscall` in syzkaller, I can indirectly use it through its number.
I figured I could use the `syscall` number for `execve` (which is 59 on x86_64), but syzkaller doesn't allow calling arbitrary syscalls by number unless it's defined in the descriptions. I started thinking of alternative execution methods, like `system`, `posix_spawn`, and `usermodehelper` but no dice.
Then I struck gold: core dumps! If I can set `/proc/sys/kernel/core_pattern` to run `mkfs.jfs` on a loop device, then trigger a core dump, I might be able to create a JFS filesystem. I can write to `/proc/sys/kernel/core_pattern`!
Now, `mkfs.jfs` needs a block device. I can use `/dev/loop0`. I'll first create a loop device by using `/dev/loop-control` and `/dev/loop0` with `LOOP_SET_FD`.
My program will involve: opening a file, using `fallocate` on the file to create the image size, creating `/dev/loop0` and using `ioctl$LOOP_SET_FD` on it to set the file, writing the core pattern, and then triggering a core dump. I remember that the executor itself could crash, so I can use `syz_clone` to fork a child and have the child trigger the crash and the parent continue.
However, I'm cautious about writing to `/proc/sys/kernel/core_pattern`. Since syzkaller runs in a namespace, this might not work. That is the next thing to check.
|
| 60/2 |
2026/05/19 16:02 |
tool |
reproduce-crash |
0m
Error:
Args: map[ReproSyz:r0 = openat(AT_FDCWD, &AUTO='/proc/sys/kernel/core_pattern\x00', 1, 0)
write(r0, &AUTO='|/sbin/mkfs.jfs -q /dev/loop0\x00', 30)
]
Results: map[CoverageID: ReproducedBugTitle: ReproducedCrashReport:]
|
| 61/2 |
2026/05/19 16:02 |
llm |
crash-repro-finder |
1m
Model:
Tokens:
input: 105655
output: 91
thoughts: 26
Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience:
**Fixing a Familiar Glitch**
Right, so `AT_FDCWD`. That constant... ah, yes, it’s currently defined as `0xffffffffffffff9c`. That's a classic. I've seen that particular implementation before, and, as expected, it's not behaving as it should. Time to take a closer look and remedy the situation. Let's get this sorted out.
|
| 62/2 |
2026/05/19 16:03 |
tool |
reproduce-crash |
0m
Error:
Args: map[ReproSyz:r0 = openat(0xffffffffffffff9c, &AUTO='/proc/sys/kernel/core_pattern\x00', 1, 0)
write(r0, &AUTO='|/sbin/mkfs.jfs -q /dev/loop0\x00', 30)
]
Results: map[CoverageID: ReproducedBugTitle: ReproducedCrashReport:]
|
| 63/2 |
2026/05/19 16:03 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 105917
output: 42
thoughts: 1352
Thoughts: **Navigating the JFS Puzzle in Syzkaller**
Okay, so I'm trying to exploit a potential JFS-related bug uncovered by syzkaller. The initial restriction is clear: syzkaller generally prevents file access outside the current directory, except when explicitly permitted. `openat$sysctl` seems like a tempting backdoor, allowing access to sysctl files, but the whitelist is severely limiting; writing to something like `core_pattern` is a no-go.
So, how else can I execute code? `modprobe` seemed like a possibility, exploiting the `request_module` call triggered by unknown socket protocols, but that path appears dead too, due to my inability to control the module name.
My thoughts then turned to `syz_mount_image$jfs`. Aha! That *should* let me mount a JFS image. The hurdle: finding a JFS image. Ideally, I'd generate one locally with `mkfs.jfs`, but I'm constrained by the syzkaller environment. I considered using `reproduce-crash` to create, compile, and run a C program, but realized I still can't execute commands directly. I can't write a shell script and execute it either.
Next, I looked for a pre-existing JFS image within the syzkaller corpus. And the bug report itself gave me a clue: the fuzzer successfully mounted JFS. That's it! If the fuzzer can do it, there must be a seed image. An empty image fails, so I need a *valid* JFS image. Could I extract a hex string from the kernel or syzkaller source? No dice. I can't access that. I thought about using `reproduce-crash` to read a file, but I don't have access to the commands I need.
My attention then shifted to the lockdep warning, which seems promising. I re-read the code and the context of the lockdep warning, I reasoned that if I trigger a certain sequence of events I could trigger the bug without a valid JFS image. But I would need to trigger `jfs_commit_inode`, a function used in JFS. I tried searching the code, but there aren't many ways.
My only option here is to leverage `syz_mount_image$jfs` *somehow*. And then it struck me: `syz_mount_image$jfs` accepts a *compressed* image. If I can provide a compressed valid JFS image, that should do the trick. Now I need to find a JFS image. Do I remember a hex string? Probably not.
I reconsidered my options again. I looked up `chkSuper` in `fs/jfs/jfs_mount.c`. Maybe I don't need a perfectly valid JFS image, perhaps a failed check could still trigger the lockdep warning?
|
| 64/2 |
2026/05/19 16:04 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_mount.c IncludeLines:true Name:chkSuper]
Results: map[SourceCode: 277: /*
278: * chkSuper()
279: *
280: * validate the superblock of the file system to be mounted and
281: * get the file system parameters.
282: *
283: * returns
284: * 0 with fragsize set if check successful
285: * error code if not successful
286: */
287: static int chkSuper(struct super_block *sb)
288: {
289: int rc = 0;
290: struct jfs_sb_info *sbi = JFS_SBI(sb);
291: struct jfs_superblock *j_sb;
292: struct buffer_head *bh;
293: int AIM_bytesize, AIT_bytesize;
294: int expected_AIM_bytesize, expected_AIT_bytesize;
295: s64 AIM_byte_addr, AIT_byte_addr, fsckwsp_addr;
296: s64 byte_addr_diff0, byte_addr_diff1;
297: s32 bsize;
298:
299: if ((rc = readSuper(sb, &bh)))
300: return rc;
301: j_sb = (struct jfs_superblock *)bh->b_data;
302:
303: /*
304: * validate superblock
305: */
306: /* validate fs signature */
307: if (strncmp(j_sb->s_magic, JFS_MAGIC, 4) ||
308: le32_to_cpu(j_sb->s_version) > JFS_VERSION) {
309: rc = -EINVAL;
310: goto out;
311: }
312:
313: bsize = le32_to_cpu(j_sb->s_bsize);
314: if (bsize != PSIZE) {
315: jfs_err("Only 4K block size supported!");
316: rc = -EINVAL;
317: goto out;
318: }
319:
320: jfs_info("superblock: flag:0x%08x state:0x%08x size:0x%Lx",
321: le32_to_cpu(j_sb->s_flag), le32_to_cpu(j_sb->s_state),
322: (unsigned long long) le64_to_cpu(j_sb->s_size));
323:
324: /* validate the descriptors for Secondary AIM and AIT */
325: if ((j_sb->s_flag & cpu_to_le32(JFS_BAD_SAIT)) !=
326: cpu_to_le32(JFS_BAD_SAIT)) {
327: expected_AIM_bytesize = 2 * PSIZE;
328: AIM_bytesize = lengthPXD(&j_sb->s_aim2) * bsize;
329: expected_AIT_bytesize = 4 * PSIZE;
330: AIT_bytesize = lengthPXD(&j_sb->s_ait2) * bsize;
331: AIM_byte_addr = addressPXD(&j_sb->s_aim2) * bsize;
332: AIT_byte_addr = addressPXD(&j_sb->s_ait2) * bsize;
333: byte_addr_diff0 = AIT_byte_addr - AIM_byte_addr;
334: fsckwsp_addr = addressPXD(&j_sb->s_fsckpxd) * bsize;
335: byte_addr_diff1 = fsckwsp_addr - AIT_byte_addr;
336: if ((AIM_bytesize != expected_AIM_bytesize) ||
337: (AIT_bytesize != expected_AIT_bytesize) ||
338: (byte_addr_diff0 != AIM_bytesize) ||
339: (byte_addr_diff1 <= AIT_bytesize))
340: j_sb->s_flag |= cpu_to_le32(JFS_BAD_SAIT);
341: }
342:
343: if ((j_sb->s_flag & cpu_to_le32(JFS_GROUPCOMMIT)) !=
344: cpu_to_le32(JFS_GROUPCOMMIT))
345: j_sb->s_flag |= cpu_to_le32(JFS_GROUPCOMMIT);
346:
347: /* validate fs state */
348: if (j_sb->s_state != cpu_to_le32(FM_CLEAN) &&
349: !sb_rdonly(sb)) {
350: jfs_err("jfs_mount: Mount Failure: File System Dirty.");
351: rc = -EINVAL;
352: goto out;
353: }
354:
355: sbi->state = le32_to_cpu(j_sb->s_state);
356: sbi->mntflag = le32_to_cpu(j_sb->s_flag);
357:
358: /*
359: * JFS always does I/O by 4K pages. Don't tell the buffer cache
360: * that we use anything else (leave s_blocksize alone).
361: */
362: sbi->bsize = bsize;
363: sbi->l2bsize = le16_to_cpu(j_sb->s_l2bsize);
364:
365: /* check some fields for possible corruption */
366: if (sbi->l2bsize != ilog2((u32)bsize) ||
367: j_sb->pad != 0 ||
368: le32_to_cpu(j_sb->s_state) > FM_STATE_MAX) {
369: rc = -EINVAL;
370: jfs_err("jfs_mount: Mount Failure: superblock is corrupt!");
371: goto out;
372: }
373:
374: /*
375: * For now, ignore s_pbsize, l2bfactor. All I/O going through buffer
376: * cache.
377: */
378: sbi->nbperpage = PSIZE >> sbi->l2bsize;
379: sbi->l2nbperpage = L2PSIZE - sbi->l2bsize;
380: sbi->l2niperblk = sbi->l2bsize - L2DISIZE;
381: uuid_copy(&sbi->uuid, &j_sb->s_uuid);
382:
383: if (sbi->mntflag & JFS_INLINELOG)
384: sbi->logpxd = j_sb->s_logpxd;
385: else {
386: sbi->logdev = new_decode_dev(le32_to_cpu(j_sb->s_logdev));
387: uuid_copy(&sbi->loguuid, &j_sb->s_loguuid);
388: }
389: sbi->fsckpxd = j_sb->s_fsckpxd;
390: sbi->ait2 = j_sb->s_ait2;
391:
392: out:
393: brelse(bh);
394: return rc;
395: }
SourceFile:fs/jfs/jfs_mount.c]
|
| 65/2 |
2026/05/19 16:04 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 110117
output: 17
thoughts: 1125
Thoughts: **JFS Image Construction and Lockdep Investigation**
Okay, so I'm thinking about how to trigger this lockdep warning related to the JFS filesystem code. Initially, the idea of constructing a minimal JFS image came to mind. I realized I only need to provide the superblock at offset `0x8000` to start. Then, I began to review what `chkSuper` checks and made a list: the magic number `s_magic`, version check `s_version`, block size `s_bsize`, clean state check `s_state`, log base-2 block size `s_l2bsize`, padding check `pad`, and the state within a defined maximum.
However, the mount code `jfs_mount` isn't just about the superblock, it also reads special inodes: `AGGREGATE_I`, `BMAP_I`, and `FILESYSTEM_I`. Using `diReadSpecial`, those need valid `dinode` structures, and these are read from the aggregate inode table. I worked out the offset for this table, `0xB000`. So, this became more complicated than just the superblock. I thought I need a complete image.
The question then shifted to if I could trigger the lockdep warning through a different approach. I started by considering using `syz_mount_image$jfs` via the fuzzer. My idea was that I could provide the JFS image as a hex string. But the more I thought, the more I realised I could not easily get a valid hex string.
Then, I looked at the specific lockdep warning: `&jfs_ip->commit_mutex` --> `&jfs_ip->commit_mutex/1` --> `&(log)->loglock`. Could I trigger this with just `jfs_unlink` on a directory? Unlikely. I also thought about what happens if mounting fails. I realised that `jfs_umount` is only called if mounting actually succeeds. So I moved on from that. I also tried a similar approach with `reproduce-crash`.
My next thought was to look at how `jfs_umount` is called, because that might be an entrypoint, but it's only called from `jfs_put_super`, which is called as part of umount. Then, I wondered if there was a different way to call `jfs_commit_inode`, since that is called from `jfs_write_inode`, which itself is called from `write_inode`, which is called from `__writeback_single_inode`. I realized I need a mounted JFS filesystem to get a JFS inode.
Next, I thought: could I use `mount` with `jfs` and a loop device, with a file created using `mkfs.jfs`? But how would I format it? It would be hard to do from syzkaller, since I can't write a C program that calls `system("mkfs.jfs -q /dev/loop0")`. I couldn't use `syz_execute_func`. Can I use `syz_mount_image$jfs` with a known JFS image? I couldn't easily get a valid image.
Then, there was another thought. What if I use `reproduce-crash` with a syzkaller program that writes a shell script and executes it. But I can't execute it because `execve` isn't in `sys.txt`. But wait, `execve` is NOT in `sys.txt`, but `execveat` IS?
|
| 66/2 |
2026/05/19 16:04 |
tool |
grepper |
0m
Args:
Results: map[Output:
Full output is too long, showing 500 out of 710 lines.
Use more precise expression if possible.
[Documentation/admin-guide/LSM/ipe.rst=104=interpreted scripts: For compiled executables, enforcement is triggered
Documentation/admin-guide/LSM/ipe.rst:105:automatically by the kernel during ``execve()``, ``execveat()``, ``mmap()``
Documentation/admin-guide/LSM/ipe.rst-106-and ``mprotect()`` syscalls when loading executable content. For interpreted
Documentation/admin-guide/LSM/ipe.rst=107=scripts, enforcement requires explicit interpreter integration using
Documentation/admin-guide/LSM/ipe.rst:108:``execveat()`` with ``AT_EXECVE_CHECK`` flag. Unlike exec syscalls that IPE
Documentation/admin-guide/LSM/ipe.rst-109-intercepts during the execution process, this mechanism needs the interpreter
--
Documentation/filesystems/path-lookup.rst=46=from some other location specified by a file descriptor given to
--
Documentation/filesystems/path-lookup.rst-48-
Documentation/filesystems/path-lookup.rst:49:.. _execveat: http://man7.org/linux/man-pages/man2/execveat.2.html
Documentation/filesystems/path-lookup.rst-50-
--
Documentation/filesystems/path-lookup.rst=56=example, if you have an open file descriptor on an executable file you
Documentation/filesystems/path-lookup.rst:57:can execute it by calling `execveat() <execveat_>`_ passing
Documentation/filesystems/path-lookup.rst-58-the file descriptor, an empty path, and the ``AT_EMPTY_PATH`` flag.
--
Documentation/process/adding-syscalls.rst=480=different location (``rt_sigreturn``) or change the memory space
Documentation/process/adding-syscalls.rst:481:(``fork``/``vfork``/``clone``) or even architecture (``execve``/``execveat``)
Documentation/process/adding-syscalls.rst-482-of the program.
--
Documentation/trace/histogram.rst=5=Documentation written by Tom Zanussi
--
Documentation/trace/histogram.rst-623- search_binary_handler+0x97/0x1d0
Documentation/trace/histogram.rst:624: do_execveat_common.isra.34+0x551/0x6e0
Documentation/trace/histogram.rst-625- SyS_execve+0x3a/0x50
--
Documentation/translations/it_IT/process/adding-syscalls.rst=447=la memoria in spazio utente (``fork``/``vfork``/``clone``) o perfino
Documentation/translations/it_IT/process/adding-syscalls.rst:448:l'architettura del programma (``execve``/``execveat``).
Documentation/translations/it_IT/process/adding-syscalls.rst-449-
--
Documentation/translations/sp_SP/process/adding-syscalls.rst=443=cambiar el espacio de memoria (``fork``/``vfork``/``clone``) o incluso de
Documentation/translations/sp_SP/process/adding-syscalls.rst:444:arquitectura (``execve``/``execveat``) del programa.
Documentation/translations/sp_SP/process/adding-syscalls.rst-445-
--
Documentation/translations/sp_SP/process/adding-syscalls.rst=493=sistema -- específicamente file open (``open``/``openat``), program
Documentation/translations/sp_SP/process/adding-syscalls.rst:494:execution (``execve`` /``execveat``) o operaciones multiplexores de socket
Documentation/translations/sp_SP/process/adding-syscalls.rst-495-(``socketcall``). Si su nueva llamada de sistema es análoga a alguna de
--
Documentation/userspace-api/check_exec.rst=5=Executability check
--
Documentation/userspace-api/check_exec.rst-7-
Documentation/userspace-api/check_exec.rst:8:The ``AT_EXECVE_CHECK`` :manpage:`execveat(2)` flag, and the
Documentation/userspace-api/check_exec.rst-9-``SECBIT_EXEC_RESTRICT_FILE`` and ``SECBIT_EXEC_DENY_INTERACTIVE`` securebits
--
Documentation/userspace-api/check_exec.rst=33=AT_EXECVE_CHECK
--
Documentation/userspace-api/check_exec.rst-35-
Documentation/userspace-api/check_exec.rst:36:Passing the ``AT_EXECVE_CHECK`` flag to :manpage:`execveat(2)` only performs a
Documentation/userspace-api/check_exec.rst-37-check on a regular file and returns 0 if execution of this file would be
--
Documentation/userspace-api/check_exec.rst=67=When ``SECBIT_EXEC_RESTRICT_FILE`` is set, a process should only interpret or
Documentation/userspace-api/check_exec.rst:68:execute a file if a call to :manpage:`execveat(2)` with the related file
Documentation/userspace-api/check_exec.rst-69-descriptor and the ``AT_EXECVE_CHECK`` flag succeed.
--
Documentation/userspace-api/check_exec.rst=91=through a file descriptor (e.g. stdin), its content should be interpreted if a
Documentation/userspace-api/check_exec.rst:92:call to :manpage:`execveat(2)` with the related file descriptor and the
Documentation/userspace-api/check_exec.rst-93-``AT_EXECVE_CHECK`` flag succeed.
--
Documentation/userspace-api/check_exec.rst=103=of any exec securebits:
--
Documentation/userspace-api/check_exec.rst-109- No threat, everyone and everything is trusted, but we can get ahead of
Documentation/userspace-api/check_exec.rst:110: potential issues thanks to the call to :manpage:`execveat(2)` with
Documentation/userspace-api/check_exec.rst-111- ``AT_EXECVE_CHECK`` which should always be performed but ignored by the
--
arch/alpha/kernel/syscalls/syscall.tbl-443-512 common memfd_create sys_memfd_create
arch/alpha/kernel/syscalls/syscall.tbl:444:513 common execveat sys_execveat
arch/alpha/kernel/syscalls/syscall.tbl-445-514 common seccomp sys_seccomp
--
arch/arm/tools/syscall.tbl-404-386 common bpf sys_bpf
arch/arm/tools/syscall.tbl:405:387 common execveat sys_execveat
arch/arm/tools/syscall.tbl-406-388 common userfaultfd sys_userfaultfd
--
arch/arm64/tools/syscall_32.tbl-401-386 common bpf sys_bpf
arch/arm64/tools/syscall_32.tbl:402:387 common execveat sys_execveat compat_sys_execveat
arch/arm64/tools/syscall_32.tbl-403-388 common userfaultfd sys_userfaultfd
--
arch/m68k/kernel/syscalls/syscall.tbl-364-354 common bpf sys_bpf
arch/m68k/kernel/syscalls/syscall.tbl:365:355 common execveat sys_execveat
arch/m68k/kernel/syscalls/syscall.tbl-366-356 common socket sys_socket
--
arch/microblaze/kernel/syscalls/syscall.tbl-397-387 common bpf sys_bpf
arch/microblaze/kernel/syscalls/syscall.tbl:398:388 common execveat sys_execveat
arch/microblaze/kernel/syscalls/syscall.tbl-399-389 common userfaultfd sys_userfaultfd
--
arch/mips/kernel/syscalls/syscall_n32.tbl-330-319 n32 bpf sys_bpf
arch/mips/kernel/syscalls/syscall_n32.tbl:331:320 n32 execveat compat_sys_execveat
arch/mips/kernel/syscalls/syscall_n32.tbl-332-321 n32 userfaultfd sys_userfaultfd
--
arch/mips/kernel/syscalls/syscall_n64.tbl-326-315 n64 bpf sys_bpf
arch/mips/kernel/syscalls/syscall_n64.tbl:327:316 n64 execveat sys_execveat
arch/mips/kernel/syscalls/syscall_n64.tbl-328-317 n64 userfaultfd sys_userfaultfd
--
arch/mips/kernel/syscalls/syscall_o32.tbl-369-355 o32 bpf sys_bpf
arch/mips/kernel/syscalls/syscall_o32.tbl:370:356 o32 execveat sys_execveat compat_sys_execveat
arch/mips/kernel/syscalls/syscall_o32.tbl-371-357 o32 userfaultfd sys_userfaultfd
--
arch/parisc/kernel/syscalls/syscall.tbl-387-341 common bpf sys_bpf
arch/parisc/kernel/syscalls/syscall.tbl:388:342 common execveat sys_execveat compat_sys_execveat
arch/parisc/kernel/syscalls/syscall.tbl-389-343 common membarrier sys_membarrier
--
arch/powerpc/kernel/syscalls/syscall.tbl-465-361 common bpf sys_bpf
arch/powerpc/kernel/syscalls/syscall.tbl:466:362 nospu execveat sys_execveat compat_sys_execveat
arch/powerpc/kernel/syscalls/syscall.tbl-467-363 32 switch_endian sys_ni_syscall
--
arch/s390/kernel/syscalls/syscall.tbl-307-353 common s390_pci_mmio_read sys_s390_pci_mmio_read
arch/s390/kernel/syscalls/syscall.tbl:308:354 common execveat sys_execveat
arch/s390/kernel/syscalls/syscall.tbl-309-355 common userfaultfd sys_userfaultfd
--
arch/sh/kernel/syscalls/syscall.tbl-385-375 common bpf sys_bpf
arch/sh/kernel/syscalls/syscall.tbl:386:376 common execveat sys_execveat
arch/sh/kernel/syscalls/syscall.tbl-387-377 common userfaultfd sys_userfaultfd
--
arch/sparc/kernel/syscalls.S=5=sys64_execve:
--
arch/sparc/kernel/syscalls.S-9-
arch/sparc/kernel/syscalls.S:10:sys64_execveat:
arch/sparc/kernel/syscalls.S:11: set sys_execveat, %g1
arch/sparc/kernel/syscalls.S-12- jmpl %g1, %g0
--
arch/sparc/kernel/syscalls.S=18=sys32_execve:
--
arch/sparc/kernel/syscalls.S-22-
arch/sparc/kernel/syscalls.S:23:sys32_execveat:
arch/sparc/kernel/syscalls.S:24: set compat_sys_execveat, %g1
arch/sparc/kernel/syscalls.S-25- jmpl %g1, %g0
--
arch/sparc/kernel/syscalls/syscall.tbl-421-349 common bpf sys_bpf
arch/sparc/kernel/syscalls/syscall.tbl:422:350 32 execveat sys_execveat sys32_execveat
arch/sparc/kernel/syscalls/syscall.tbl:423:350 64 execveat sys64_execveat
arch/sparc/kernel/syscalls/syscall.tbl-424-351 common membarrier sys_membarrier
--
arch/um/os-Linux/skas/process.c=292=static int userspace_tramp(void *data)
--
arch/um/os-Linux/skas/process.c-345-
arch/um/os-Linux/skas/process.c:346: /* Raw execveat for compatibility with older libc versions */
arch/um/os-Linux/skas/process.c:347: syscall(__NR_execveat, stub_exe_fd, (unsigned long)"",
arch/um/os-Linux/skas/process.c-348- (unsigned long)argv, NULL, AT_EMPTY_PATH);
--
arch/x86/entry/syscalls/syscall_32.tbl-372-357 i386 bpf sys_bpf
arch/x86/entry/syscalls/syscall_32.tbl:373:358 i386 execveat sys_execveat compat_sys_execveat
arch/x86/entry/syscalls/syscall_32.tbl-374-359 i386 socket sys_socket
--
arch/x86/entry/syscalls/syscall_64.tbl-333-321 common bpf sys_bpf
arch/x86/entry/syscalls/syscall_64.tbl:334:322 64 execveat sys_execveat
arch/x86/entry/syscalls/syscall_64.tbl-335-323 common userfaultfd sys_userfaultfd
--
arch/x86/entry/syscalls/syscall_64.tbl-438-544 x32 io_submit compat_sys_io_submit
arch/x86/entry/syscalls/syscall_64.tbl:439:545 x32 execveat compat_sys_execveat
arch/x86/entry/syscalls/syscall_64.tbl-440-546 x32 preadv2 compat_sys_preadv64v2
--
arch/x86/ia32/audit.c=31=int ia32_classify_syscall(unsigned syscall)
--
arch/x86/ia32/audit.c-40- case __NR_execve:
arch/x86/ia32/audit.c:41: case __NR_execveat:
arch/x86/ia32/audit.c-42- return AUDITSC_EXECVE;
--
arch/x86/kernel/audit_64.c=42=int audit_classify_syscall(int abi, unsigned syscall)
--
arch/x86/kernel/audit_64.c-53- case __NR_execve:
arch/x86/kernel/audit_64.c:54: case __NR_execveat:
arch/x86/kernel/audit_64.c-55- return AUDITSC_EXECVE;
--
arch/xtensa/kernel/syscalls/syscall.tbl-363-340 common bpf sys_bpf
arch/xtensa/kernel/syscalls/syscall.tbl:364:341 common execveat sys_execveat
arch/xtensa/kernel/syscalls/syscall.tbl-365-342 common userfaultfd sys_userfaultfd
--
fs/exec.c=398=static int bprm_stack_limits(struct linux_binprm *bprm)
--
fs/exec.c-430- * argc can never be 0, to keep them from walking envp by accident.
fs/exec.c:431: * See do_execveat_common().
fs/exec.c-432- */
--
fs/exec.c=1724=static int bprm_execve(struct linux_binprm *bprm)
--
fs/exec.c-1777-
fs/exec.c:1778:static int do_execveat_common(int fd, struct filename *filename,
fs/exec.c-1779- struct user_arg_ptr argv,
--
fs/exec.c=1924=SYSCALL_DEFINE3(execve,
--
fs/exec.c-1929- CLASS(filename, name)(filename);
fs/exec.c:1930: return do_execveat_common(AT_FDCWD, name,
fs/exec.c-1931- native_arg(argv), native_arg(envp), 0);
--
fs/exec.c-1933-
fs/exec.c:1934:SYSCALL_DEFINE5(execveat,
fs/exec.c-1935- int, fd, const char __user *, filename,
--
fs/exec.c-1940- CLASS(filename_uflags, name)(filename, flags);
fs/exec.c:1941: return do_execveat_common(fd, name,
fs/exec.c-1942- native_arg(argv), native_arg(envp), flags);
--
fs/exec.c=1952=COMPAT_SYSCALL_DEFINE3(execve, const char __user *, filename,
--
fs/exec.c-1956- CLASS(filename, name)(filename);
fs/exec.c:1957: return do_execveat_common(AT_FDCWD, name,
fs/exec.c-1958- compat_arg(argv), compat_arg(envp), 0);
--
fs/exec.c-1960-
fs/exec.c:1961:COMPAT_SYSCALL_DEFINE5(execveat, int, fd,
fs/exec.c-1962- const char __user *, filename,
--
fs/exec.c-1967- CLASS(filename_uflags, name)(filename, flags);
fs/exec.c:1968: return do_execveat_common(fd, name,
fs/exec.c-1969- compat_arg(argv), compat_arg(envp), flags);
--
include/linux/binfmts.h=18=struct linux_binprm {
--
include/linux/binfmts.h-63- different for binfmt_{misc,script} */
include/linux/binfmts.h:64: const char *fdpath; /* generated filename for execveat */
include/linux/binfmts.h-65- unsigned interp_flags;
--
include/linux/compat.h=782=asmlinkage long compat_sys_sendmmsg(int fd, struct compat_mmsghdr __user *mmsg,
include/linux/compat.h-783- unsigned vlen, unsigned int flags);
include/linux/compat.h:784:asmlinkage long compat_sys_execveat(int dfd, const char __user *filename,
include/linux/compat.h-785- const compat_uptr_t __user *argv,
--
include/linux/syscalls.h=939=asmlinkage long sys_bpf(int cmd, union bpf_attr __user *attr, unsigned int size);
include/linux/syscalls.h:940:asmlinkage long sys_execveat(int dfd, const char __user *filename,
include/linux/syscalls.h-941- const char __user *const __user *argv,
--
include/uapi/asm-generic/unistd.h=678=__SYSCALL(__NR_bpf, sys_bpf)
include/uapi/asm-generic/unistd.h:679:#define __NR_execveat 281
include/uapi/asm-generic/unistd.h:680:__SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat)
include/uapi/asm-generic/unistd.h-681-#define __NR_userfaultfd 282
--
include/uapi/linux/fcntl.h=88=struct delegation {
--
include/uapi/linux/fcntl.h-188-
include/uapi/linux/fcntl.h:189:/* Flags for execveat2(2). */
include/uapi/linux/fcntl.h-190-#define AT_EXECVE_CHECK 0x10000 /* Only perform a check if execution
--
kernel/sys_ni.c=251=COND_SYSCALL(bpf);
kernel/sys_ni.c-252-
kernel/sys_ni.c:253:/* execveat */
kernel/sys_ni.c:254:COND_SYSCALL(execveat);
kernel/sys_ni.c-255-
--
kernel/trace/trace_syscalls.c=1060=static void check_faultable_syscall(struct trace_event_call *call, int nr)
--
kernel/trace/trace_syscalls.c-1157- /* user arg at position 1 */
kernel/trace/trace_syscalls.c:1158: case __NR_execveat:
kernel/trace/trace_syscalls.c-1159- case __NR_faccessat:
--
lib/audit.c=40=int audit_classify_syscall(int abi, unsigned syscall)
--
lib/audit.c-57-#endif
lib/audit.c:58:#ifdef __NR_execveat
lib/audit.c:59: case __NR_execveat:
lib/audit.c-60-#endif
--
samples/Kconfig=307=config SAMPLE_CHECK_EXEC
--
samples/Kconfig-312- SECBIT_EXEC_DENY_INTERACTIVE, and a simple script interpreter to
samples/Kconfig:313: demonstrate how they should be used with execveat(2) +
samples/Kconfig-314- AT_EXECVE_CHECK.
--
samples/check-exec/inc.c-26-
samples/check-exec/inc.c:27:static int sys_execveat(int dirfd, const char *pathname, char *const argv[],
samples/check-exec/inc.c-28- char *const envp[], int flags)
samples/check-exec/inc.c-29-{
samples/check-exec/inc.c:30: return syscall(__NR_execveat, dirfd, pathname, argv, envp, flags);
samples/check-exec/inc.c-31-}
--
samples/check-exec/inc.c=75=static int interpret_stream(FILE *script, char *const script_name,
--
samples/check-exec/inc.c-87- */
samples/check-exec/inc.c:88: err = sys_execveat(fileno(script), "", script_argv, envp,
samples/check-exec/inc.c-89- AT_EMPTY_PATH | AT_EXECVE_CHECK);
--
scripts/syscall.tbl-330-280 common bpf sys_bpf
scripts/syscall.tbl:331:281 common execveat sys_execveat compat_sys_execveat
scripts/syscall.tbl-332-282 common userfaultfd sys_userfaultfd
--
security/integrity/ima/ima_main.c=633=static int ima_creds_check(struct linux_binprm *bprm, const struct file *file)
--
security/integrity/ima/ima_main.c-645- *
security/integrity/ima/ima_main.c:646: * Based on the IMA policy and the execveat(2) AT_EXECVE_CHECK flag, measure
security/integrity/ima/ima_main.c-647- * and appraise the integrity of a file to be executed by script interpreters.
--
security/ipe/hooks.c=30=int ipe_bprm_check_security(struct linux_binprm *bprm)
--
security/ipe/hooks.c-43- * This LSM hook is called when userspace signals the kernel to check a file
security/ipe/hooks.c:44: * for execution through the execveat syscall with the AT_EXECVE_CHECK flag.
security/ipe/hooks.c-45- * The hook triggers IPE policy evaluation on the script file and returns
--
security/security.c=735=int security_vm_enough_memory_mm(struct mm_struct *mm, long pages)
--
security/security.c-768- *
security/security.c:769: * If execveat(2) is called with the AT_EXECVE_CHECK flag, bprm->is_check is
security/security.c-770- * set. The result must be the same as without this flag even if the execution
--
tools/include/uapi/asm-generic/unistd.h=678=__SYSCALL(__NR_bpf, sys_bpf)
tools/include/uapi/asm-generic/unistd.h:679:#define __NR_execveat 281
tools/include/uapi/asm-generic/unistd.h:680:__SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat)
tools/include/uapi/asm-generic/unistd.h-681-#define __NR_userfaultfd 282
--
tools/perf/arch/alpha/entry/syscalls/syscall.tbl-443-512 common memfd_create sys_memfd_create
tools/perf/arch/alpha/entry/syscalls/syscall.tbl:444:513 common execveat sys_execveat
tools/perf/arch/alpha/entry/syscalls/syscall.tbl-445-514 common seccomp sys_seccomp
--
tools/perf/arch/arm/entry/syscalls/syscall.tbl-404-386 common bpf sys_bpf
tools/perf/arch/arm/entry/syscalls/syscall.tbl:405:387 common execveat sys_execveat
tools/perf/arch/arm/entry/syscalls/syscall.tbl-406-388 common userfaultfd sys_userfaultfd
--
tools/perf/arch/arm64/entry/syscalls/syscall_32.tbl-401-386 common bpf sys_bpf
tools/perf/arch/arm64/entry/syscalls/syscall_32.tbl:402:387 common execveat sys_execveat compat_sys_execveat
tools/perf/arch/arm64/entry/syscalls/syscall_32.tbl-403-388 common userfaultfd sys_userfaultfd
--
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl-326-315 n64 bpf sys_bpf
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl:327:316 n64 execveat sys_execveat
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl-328-317 n64 userfaultfd sys_userfaultfd
--
tools/perf/arch/parisc/entry/syscalls/syscall.tbl-387-341 common bpf sys_bpf
tools/perf/arch/parisc/entry/syscalls/syscall.tbl:388:342 common execveat sys_execveat compat_sys_execveat
tools/perf/arch/parisc/entry/syscalls/syscall.tbl-389-343 common membarrier sys_membarrier
--
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl-465-361 common bpf sys_bpf
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl:466:362 nospu execveat sys_execveat compat_sys_execveat
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl-467-363 32 switch_endian sys_ni_syscall
--
tools/perf/arch/s390/entry/syscalls/syscall.tbl-307-353 common s390_pci_mmio_read sys_s390_pci_mmio_read
tools/perf/arch/s390/entry/syscalls/syscall.tbl:308:354 common execveat sys_execveat
tools/perf/arch/s390/entry/syscalls/syscall.tbl-309-355 common userfaultfd sys_userfaultfd
--
tools/perf/arch/sh/entry/syscalls/syscall.tbl-385-375 common bpf sys_bpf
tools/perf/arch/sh/entry/syscalls/syscall.tbl:386:376 common execveat sys_execveat
tools/perf/arch/sh/entry/syscalls/syscall.tbl-387-377 common userfaultfd sys_userfaultfd
--
tools/perf/arch/sparc/entry/syscalls/syscall.tbl-421-349 common bpf sys_bpf
tools/perf/arch/sparc/entry/syscalls/syscall.tbl:422:350 32 execveat sys_execveat sys32_execveat
tools/perf/arch/sparc/entry/syscalls/syscall.tbl:423:350 64 execveat sys64_execveat
tools/perf/arch/sparc/entry/syscalls/syscall.tbl-424-351 common membarrier sys_membarrier
--
tools/perf/arch/x86/entry/syscalls/syscall_32.tbl-372-357 i386 bpf sys_bpf
tools/perf/arch/x86/entry/syscalls/syscall_32.tbl:373:358 i386 execveat sys_execveat compat_sys_execveat
tools/perf/arch/x86/entry/syscalls/syscall_32.tbl-374-359 i386 socket sys_socket
--
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl-333-321 common bpf sys_bpf
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl:334:322 64 execveat sys_execveat
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl-335-323 common userfaultfd sys_userfaultfd
--
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl-438-544 x32 io_submit compat_sys_io_submit
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl:439:545 x32 execveat compat_sys_execveat
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl-440-546 x32 preadv2 compat_sys_preadv64v2
--
tools/perf/arch/xtensa/entry/syscalls/syscall.tbl-363-340 common bpf sys_bpf
tools/perf/arch/xtensa/entry/syscalls/syscall.tbl:364:341 common execveat sys_execveat
tools/perf/arch/xtensa/entry/syscalls/syscall.tbl-365-342 common userfaultfd sys_userfaultfd
--
tools/perf/trace/beauty/include/uapi/linux/fcntl.h=88=struct delegation {
--
tools/perf/trace/beauty/include/uapi/linux/fcntl.h-188-
tools/perf/trace/beauty/include/uapi/linux/fcntl.h:189:/* Flags for execveat2(2). */
tools/perf/trace/beauty/include/uapi/linux/fcntl.h-190-#define AT_EXECVE_CHECK 0x10000 /* Only perform a check if execution
--
tools/perf/trace/strace/groups/string=10=execve
tools/perf/trace/strace/groups/string:11:execveat
tools/perf/trace/strace/groups/string-12-faccessat
--
tools/scripts/syscall.tbl-330-280 common bpf sys_bpf
tools/scripts/syscall.tbl:331:281 common execveat sys_execveat compat_sys_execveat
tools/scripts/syscall.tbl-332-282 common userfaultfd sys_userfaultfd
--
tools/testing/selftests/exec/.gitignore=3=script*
tools/testing/selftests/exec/.gitignore:4:execveat
tools/testing/selftests/exec/.gitignore:5:execveat.symlink
tools/testing/selftests/exec/.gitignore:6:execveat.moved
tools/testing/selftests/exec/.gitignore:7:execveat.path.ephemeral
tools/testing/selftests/exec/.gitignore:8:execveat.ephemeral
tools/testing/selftests/exec/.gitignore:9:execveat.denatured
tools/testing/selftests/exec/.gitignore-10-non-regular
--
tools/testing/selftests/exec/Makefile=13=TEST_PROGS := binfmt_script.py check-exec-tests.sh
tools/testing/selftests/exec/Makefile:14:TEST_GEN_PROGS := execveat non-regular $(ALIGNMENT_TESTS)
tools/testing/selftests/exec/Makefile-15-TEST_GEN_PROGS_EXTENDED := false inc set-exec script-exec.inc script-noexec.inc
tools/testing/selftests/exec/Makefile:16:TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
tools/testing/selftests/exec/Makefile:17:# Makefile is a run-time dependency, since it's accessed by the execveat test
tools/testing/selftests/exec/Makefile-18-TEST_FILES := Makefile
--
tools/testing/selftests/exec/Makefile=22=TEST_GEN_PROGS += check-exec
tools/testing/selftests/exec/Makefile-23-
tools/testing/selftests/exec/Makefile:24:EXTRA_CLEAN := $(OUTPUT)/subdir.moved $(OUTPUT)/execveat.moved $(OUTPUT)/xxxxx* \
tools/testing/selftests/exec/Makefile-25- $(OUTPUT)/S_I*.test
--
tools/testing/selftests/exec/Makefile=33=$(OUTPUT)/script: Makefile
--
tools/testing/selftests/exec/Makefile-36- chmod +x $@
tools/testing/selftests/exec/Makefile:37:$(OUTPUT)/execveat.symlink: $(OUTPUT)/execveat
tools/testing/selftests/exec/Makefile-38- cd $(OUTPUT) && ln -s -f $(shell basename $<) $(shell basename $@)
tools/testing/selftests/exec/Makefile:39:$(OUTPUT)/execveat.denatured: $(OUTPUT)/execveat
tools/testing/selftests/exec/Makefile-40- cp $< $@
--
tools/testing/selftests/exec/check-exec.c-2-/*
tools/testing/selftests/exec/check-exec.c:3: * Test execveat(2) with AT_EXECVE_CHECK, and prctl(2) with
tools/testing/selftests/exec/check-exec.c-4- * SECBIT_EXEC_RESTRICT_FILE, SECBIT_EXEC_DENY_INTERACTIVE, and their locked
--
tools/testing/selftests/exec/check-exec.c-34-
tools/testing/selftests/exec/check-exec.c:35:static int sys_execveat(int dirfd, const char *pathname, char *const argv[],
tools/testing/selftests/exec/check-exec.c-36- char *const envp[], int flags)
tools/testing/selftests/exec/check-exec.c-37-{
tools/testing/selftests/exec/check-exec.c:38: return syscall(__NR_execveat, dirfd, pathname, argv, envp, flags);
tools/testing/selftests/exec/check-exec.c-39-}
--
tools/testing/selftests/exec/check-exec.c=217=static void test_exec_fd(struct __test_metadata *_metadata, const int fd,
--
tools/testing/selftests/exec/check-exec.c-228- */
tools/testing/selftests/exec/check-exec.c:229: access_ret = sys_execveat(fd, "", argv, NULL,
tools/testing/selftests/exec/check-exec.c-230- AT_EMPTY_PATH | AT_EXECVE_CHECK);
--
tools/testing/selftests/exec/check-exec.c-235- {
tools/testing/selftests/exec/check-exec.c:236: TH_LOG("Wrong error for execveat(2): %s (%d)",
tools/testing/selftests/exec/check-exec.c-237- strerror(access_errno), errno);
--
tools/testing/selftests/exec/execveat.c-4- *
tools/testing/selftests/exec/execveat.c:5: * Selftests for execveat(2).
tools/testing/selftests/exec/execveat.c-6- */
--
tools/testing/selftests/exec/execveat.c=32=static char *envp[] = { "IN_TEST=yes", NULL, NULL };
tools/testing/selftests/exec/execveat.c:33:static char *argv[] = { "execveat", "99", NULL };
tools/testing/selftests/exec/execveat.c-34-
tools/testing/selftests/exec/execveat.c:35:static int execveat_(int fd, const char *path, char **argv, char **envp,
tools/testing/selftests/exec/execveat.c-36- int flags)
tools/testing/selftests/exec/execveat.c-37-{
tools/testing/selftests/exec/execveat.c:38:#ifdef __NR_execveat
tools/testing/selftests/exec/execveat.c:39: return syscall(__NR_execveat, fd, path, argv, envp, flags);
tools/testing/selftests/exec/execveat.c-40-#else
--
tools/testing/selftests/exec/execveat.c-45-
tools/testing/selftests/exec/execveat.c:46:#define check_execveat_fail(fd, path, flags, errno) \
tools/testing/selftests/exec/execveat.c:47: _check_execveat_fail(fd, path, flags, errno, #errno)
tools/testing/selftests/exec/execveat.c:48:static int _check_execveat_fail(int fd, const char *path, int flags,
tools/testing/selftests/exec/execveat.c-49- int expected_errno, const char *errno_str)
--
tools/testing/selftests/exec/execveat.c-55- snprintf(test_name, sizeof(test_name),
tools/testing/selftests/exec/execveat.c:56: "Check failure of execveat(%d, '%s', %d) with %s",
tools/testing/selftests/exec/execveat.c-57- fd, path?:"(null)", flags, errno_str);
tools/testing/selftests/exec/execveat.c:58: rc = execveat_(fd, path, argv, envp, flags);
tools/testing/selftests/exec/execveat.c-59-
tools/testing/selftests/exec/execveat.c-60- if (rc > 0) {
tools/testing/selftests/exec/execveat.c:61: ksft_print_msg("unexpected success from execveat(2)\n");
tools/testing/selftests/exec/execveat.c-62- ksft_test_result_fail("%s\n", test_name);
--
tools/testing/selftests/exec/execveat.c-75-
tools/testing/selftests/exec/execveat.c:76:static int check_execveat_invoked_rc(int fd, const char *path, int flags,
tools/testing/selftests/exec/execveat.c-77- int expected_rc, int expected_rc2)
--
tools/testing/selftests/exec/execveat.c-86- snprintf(test_name, sizeof(test_name),
tools/testing/selftests/exec/execveat.c:87: "Check success of execveat(%d, '%.20s...%s', %d)... ",
tools/testing/selftests/exec/execveat.c-88- fd, path, (path + pathlen - 20), flags);
--
tools/testing/selftests/exec/execveat.c-90- snprintf(test_name, sizeof(test_name),
tools/testing/selftests/exec/execveat.c:91: "Check success of execveat(%d, '%s', %d)... ",
tools/testing/selftests/exec/execveat.c-92- fd, path?:"(null)", flags);
--
tools/testing/selftests/exec/execveat.c-100- if (child == 0) {
tools/testing/selftests/exec/execveat.c:101: /* Child: do execveat(). */
tools/testing/selftests/exec/execveat.c:102: rc = execveat_(fd, path, argv, envp, flags);
tools/testing/selftests/exec/execveat.c:103: ksft_print_msg("child execveat() failed, rc=%d errno=%d (%s)\n",
tools/testing/selftests/exec/execveat.c-104- rc, errno, strerror(errno));
--
tools/testing/selftests/exec/execveat.c-131-
tools/testing/selftests/exec/execveat.c:132:static int check_execveat(int fd, const char *path, int flags)
tools/testing/selftests/exec/execveat.c-133-{
tools/testing/selftests/exec/execveat.c:134: return check_execveat_invoked_rc(fd, path, flags, 99, 99);
tools/testing/selftests/exec/execveat.c-135-}
--
tools/testing/selftests/exec/execveat.c=156=static void exe_cp(const char *src, const char *dest)
--
tools/testing/selftests/exec/execveat.c-168-#define XX_DIR_LEN 200
tools/testing/selftests/exec/execveat.c:169:static int check_execveat_pathmax(int root_dfd, const char *src, int is_script)
tools/testing/selftests/exec/execveat.c-170-{
--
tools/testing/selftests/exec/execveat.c-212- src, strlen(longpath));
tools/testing/selftests/exec/execveat.c:213: fail += check_execveat(fd, "", AT_EMPTY_PATH);
tools/testing/selftests/exec/execveat.c-214- } else {
--
tools/testing/selftests/exec/execveat.c-231- ksft_print_msg("Invoke script via root_dfd and relative filename\n");
tools/testing/selftests/exec/execveat.c:232: fail += check_execveat_invoked_rc(root_dfd, longpath + 1, 0,
tools/testing/selftests/exec/execveat.c-233- 127, 126);
--
tools/testing/selftests/exec/execveat.c-235- ksft_print_msg("Invoke exec via root_dfd and relative filename\n");
tools/testing/selftests/exec/execveat.c:236: fail += check_execveat(root_dfd, longpath + 1, 0);
tools/testing/selftests/exec/execveat.c-237- }
--
tools/testing/selftests/exec/execveat.c-241-
tools/testing/selftests/exec/execveat.c:242:static int check_execveat_comm(int fd, char *argv0, char *expected)
tools/testing/selftests/exec/execveat.c-243-{
--
tools/testing/selftests/exec/execveat.c-254-
tools/testing/selftests/exec/execveat.c:255: ksft_print_msg("Check execveat(AT_EMPTY_PATH)'s comm is %s\n",
tools/testing/selftests/exec/execveat.c-256- expected);
tools/testing/selftests/exec/execveat.c:257: ret = check_execveat_invoked_rc(fd, "", AT_EMPTY_PATH, 0, 0);
tools/testing/selftests/exec/execveat.c-258-
--
tools/testing/selftests/exec/execveat.c=265=static int run_tests(void)
--
tools/testing/selftests/exec/execveat.c-267- int fail = 0;
tools/testing/selftests/exec/execveat.c:268: char *fullname = realpath("execveat", NULL);
]
]
|
| 67/2 |
2026/05/19 16:04 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 124162
output: 43
thoughts: 1462
Thoughts: **JFS Investigation: A Path to the Lockdep Warning**
Okay, so I'm trying to figure out how to trigger this lockdep warning related to `jfs_ip->commit_mutex` and `log->loglock`. The initial thought was `execveat`, but that's a dead end, it's not present in the syscall table or easily accessible. I considered `usermodehelper` via a module load but that's tricky and requires manipulation of `modprobe` path and isn't relevant. I looked at the fuzzer's path, and it appears the exploit might relate to `syz_mount_image$jfs`, which implies JFS.
My next line of thought focused on mounting a JFS image. I remembered Syzkaller has a seed image for JFS, but I don't have the bytes of that seed image directly. So, I looked at using `reproduce-crash` with `&AUTO`, but `&AUTO` won't provide a valid JFS image because it just allocates zeroed or random memory.
The fuzzer's approach likely uses the built-in seed image, so let's try to mimic that to reproduce the crash. I looked at `filesystem.txt` and confirmed that the `img` argument to `syz_mount_image$jfs` is a `compressed_image`, which is difficult to provide directly in a Syzkaller program.
Then I considered `mount` with a loop device and `mkfs.jfs` to create a filesystem. However, I can't directly execute `mkfs.jfs` within the Syzkaller context. I tried to use `reproduce-crash` to run a C program which runs `mkfs.jfs` but the tool is only designed to run syz repros.
Then I thought about mounting an extremely simple JFS image. Looking at `chkSuper` in the JFS code, I need a valid superblock to mount it. I can craft a minimal superblock that satisfies the checks, I need to set the `s_magic` to "JFS1", `s_version` to 2, `bsize` to 4096, `s_state` to `FM_CLEAN` (0), `s_l2bsize` to 12, and `pad` to 0. Also, `s_state` must be <= 15. I can set `JFS_BAD_SAIT` in `s_flag` to bypass the `s_aim2` and `s_ait2` checks, and add `JFS_GROUPCOMMIT` to `s_flag`. The code then tries to access inode 1 from the aggregate inode table which is at `AITBL_OFF` (0xB000). The first inode will be read from offset 0xB000 + 1 * 512 = 0xB200. I need to investigate how it reads the inode with `diReadSpecial`. This is my current path to reproduce the crash.
|
| 68/2 |
2026/05/19 16:04 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_imap.c IncludeLines:true Name:diReadSpecial]
Results: map[SourceCode: 396: /*
397: * NAME: diReadSpecial()
398: *
399: * FUNCTION: initialize a 'special' inode from disk.
400: *
401: * this routines handles aggregate level inodes. The
402: * inode cache cannot differentiate between the
403: * aggregate inodes and the filesystem inodes, so we
404: * handle these here. We don't actually use the aggregate
405: * inode map, since these inodes are at a fixed location
406: * and in some cases the aggregate inode map isn't initialized
407: * yet.
408: *
409: * PARAMETERS:
410: * sb - filesystem superblock
411: * inum - aggregate inode number
412: * secondary - 1 if secondary aggregate inode table
413: *
414: * RETURN VALUES:
415: * new inode - success
416: * NULL - i/o error.
417: */
418: struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary)
419: {
420: struct jfs_sb_info *sbi = JFS_SBI(sb);
421: uint address;
422: struct dinode *dp;
423: struct inode *ip;
424: struct metapage *mp;
425:
426: ip = new_inode(sb);
427: if (ip == NULL) {
428: jfs_err("diReadSpecial: new_inode returned NULL!");
429: return ip;
430: }
431:
432: if (secondary) {
433: address = addressPXD(&sbi->ait2) >> sbi->l2nbperpage;
434: JFS_IP(ip)->ipimap = sbi->ipaimap2;
435: } else {
436: address = AITBL_OFF >> L2PSIZE;
437: JFS_IP(ip)->ipimap = sbi->ipaimap;
438: }
439:
440: ASSERT(inum < INOSPEREXT);
441:
442: ip->i_ino = inum;
443:
444: address += inum >> 3; /* 8 inodes per 4K page */
445:
446: /* read the page of fixed disk inode (AIT) in raw mode */
447: mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1);
448: if (mp == NULL) {
449: set_nlink(ip, 1); /* Don't want iput() deleting it */
450: iput(ip);
451: return (NULL);
452: }
453:
454: /* get the pointer to the disk inode of interest */
455: dp = (struct dinode *) (mp->data);
456: dp += inum % 8; /* 8 inodes per 4K page */
457:
458: /* copy on-disk inode to in-memory inode */
459: if ((copy_from_dinode(dp, ip) != 0) || (ip->i_nlink == 0)) {
460: /* handle bad return by returning NULL for ip */
461: set_nlink(ip, 1); /* Don't want iput() deleting it */
462: iput(ip);
463: /* release the page */
464: release_metapage(mp);
465: return (NULL);
466:
467: }
468:
469: ip->i_mapping->a_ops = &jfs_metapage_aops;
470: mapping_set_gfp_mask(ip->i_mapping, GFP_NOFS);
471:
472: /* Allocations to metadata inodes should not affect quotas */
473: ip->i_flags |= S_NOQUOTA;
474:
475: if ((inum == FILESYSTEM_I) && (JFS_IP(ip)->ipimap == sbi->ipaimap)) {
476: sbi->gengen = le32_to_cpu(dp->di_gengen);
477: sbi->inostamp = le32_to_cpu(dp->di_inostamp);
478: }
479:
480: /* release the page */
481: release_metapage(mp);
482:
483: inode_fake_hash(ip);
484:
485: return (ip);
486: }
SourceFile:fs/jfs/jfs_imap.c]
|
| 69/2 |
2026/05/19 16:04 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 127747
output: 46
thoughts: 24
Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience, and delivered as a first-person summary:
**Digging into `copy_from_dinode`**
Right, so I see a reference to `copy_from_dinode`. My first instinct, as always, is to dive right in and understand what that function is doing. "Checks something?" The phrasing is a little vague, which immediately raises a flag. We need to be precise, especially when dealing with data transfer or replication from what sounds like a distributed inode source. "Checks something" could mean anything from simple error handling, data integrity verification, access control, or even more complex coordination with a distributed locking mechanism. I need to get into the code to figure out *what* exactly it's checking and *how*. The assumption is that this `dinode` is a key component, so understanding the interactions and dependencies around this copy process is critical. Let's get cracking.
|
| 70/2 |
2026/05/19 16:04 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_imap.c IncludeLines:true Name:copy_from_dinode]
Results: map[SourceCode:3025: /*
3026: * NAME: copy_from_dinode()
3027: *
3028: * FUNCTION: Copies inode info from disk inode to in-memory inode
3029: *
3030: * RETURN VALUES:
3031: * 0 - success
3032: * -EINVAL - unexpected inode type
3033: */
3034: static int copy_from_dinode(struct dinode * dip, struct inode *ip)
3035: {
3036: struct jfs_inode_info *jfs_ip = JFS_IP(ip);
3037: struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb);
3038: int fileset = le32_to_cpu(dip->di_fileset);
3039:
3040: switch (fileset) {
3041: case AGGR_RESERVED_I: case AGGREGATE_I: case BMAP_I:
3042: case LOG_I: case BADBLOCK_I: case FILESYSTEM_I:
3043: break;
3044: default:
3045: return -EINVAL;
3046: }
3047:
3048: jfs_ip->fileset = fileset;
3049: jfs_ip->mode2 = le32_to_cpu(dip->di_mode);
3050: jfs_set_inode_flags(ip);
3051:
3052: ip->i_mode = le32_to_cpu(dip->di_mode) & 0xffff;
3053: if (sbi->umask != -1) {
3054: ip->i_mode = (ip->i_mode & ~0777) | (0777 & ~sbi->umask);
3055: /* For directories, add x permission if r is allowed by umask */
3056: if (S_ISDIR(ip->i_mode)) {
3057: if (ip->i_mode & 0400)
3058: ip->i_mode |= 0100;
3059: if (ip->i_mode & 0040)
3060: ip->i_mode |= 0010;
3061: if (ip->i_mode & 0004)
3062: ip->i_mode |= 0001;
3063: }
3064: }
3065: set_nlink(ip, le32_to_cpu(dip->di_nlink));
3066:
3067: jfs_ip->saved_uid = make_kuid(&init_user_ns, le32_to_cpu(dip->di_uid));
3068: if (!uid_valid(sbi->uid))
3069: ip->i_uid = jfs_ip->saved_uid;
3070: else {
3071: ip->i_uid = sbi->uid;
3072: }
3073:
3074: jfs_ip->saved_gid = make_kgid(&init_user_ns, le32_to_cpu(dip->di_gid));
3075: if (!gid_valid(sbi->gid))
3076: ip->i_gid = jfs_ip->saved_gid;
3077: else {
3078: ip->i_gid = sbi->gid;
3079: }
3080:
3081: ip->i_size = le64_to_cpu(dip->di_size);
3082: inode_set_atime(ip, le32_to_cpu(dip->di_atime.tv_sec),
3083: le32_to_cpu(dip->di_atime.tv_nsec));
3084: inode_set_mtime(ip, le32_to_cpu(dip->di_mtime.tv_sec),
3085: le32_to_cpu(dip->di_mtime.tv_nsec));
3086: inode_set_ctime(ip, le32_to_cpu(dip->di_ctime.tv_sec),
3087: le32_to_cpu(dip->di_ctime.tv_nsec));
3088: ip->i_blocks = LBLK2PBLK(ip->i_sb, le64_to_cpu(dip->di_nblocks));
3089: ip->i_generation = le32_to_cpu(dip->di_gen);
3090:
3091: jfs_ip->ixpxd = dip->di_ixpxd; /* in-memory pxd's are little-endian */
3092: jfs_ip->acl = dip->di_acl; /* as are dxd's */
3093: jfs_ip->ea = dip->di_ea;
3094: jfs_ip->next_index = le32_to_cpu(dip->di_next_index);
3095: jfs_ip->otime = le32_to_cpu(dip->di_otime.tv_sec);
3096: jfs_ip->acltype = le32_to_cpu(dip->di_acltype);
3097:
3098: if (S_ISCHR(ip->i_mode) || S_ISBLK(ip->i_mode)) {
3099: jfs_ip->dev = le32_to_cpu(dip->di_rdev);
3100: ip->i_rdev = new_decode_dev(jfs_ip->dev);
3101: }
3102:
3103: if (S_ISDIR(ip->i_mode)) {
3104: memcpy(&jfs_ip->u.dir, &dip->u._dir, 384);
3105: if (!check_dtroot(&jfs_ip->i_dtroot)) {
3106: jfs_error(ip->i_sb, "Corrupt dtroot\n");
3107: return -EIO;
3108: }
3109: } else if (S_ISREG(ip->i_mode) || S_ISLNK(ip->i_mode)) {
3110: memcpy(&jfs_ip->i_xtroot, &dip->di_xtroot, 288);
3111: } else
3112: memcpy(&jfs_ip->i_inline_ea, &dip->di_inlineea, 128);
3113:
3114: /* Zero the in-memory-only stuff */
3115: jfs_ip->cflag = 0;
3116: jfs_ip->btindex = 0;
3117: jfs_ip->btorder = 0;
3118: jfs_ip->bxflag = 0;
3119: jfs_ip->blid = 0;
3120: jfs_ip->atlhead = 0;
3121: jfs_ip->atltail = 0;
3122: jfs_ip->xtlid = 0;
3123: return (0);
3124: }
SourceFile:fs/jfs/jfs_imap.c]
|
| 71/2 |
2026/05/19 16:04 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 130024
output: 17
thoughts: 1011
Thoughts: **Analyzing the JFS Bug: A Syzkaller Approach**
Okay, so I'm trying to figure out how to trigger this JFS bug, specifically a lockdep issue within `jfs_commit_inode`. Let's break this down. Initially, I thought I could trigger it by directly crafting the right conditions for `jfs_commit_inode`, but that seemed incredibly complex. The initial thought process was centred on providing a valid `dinode` at a specific offset. This proved to be too intricate.
My first thought was, can I trigger `jfs_commit_inode` via an alternate route? Using `syz_mount_image$jfs` seemed like a possibility, but without an `img`, it failed. The next attempt was with a valid JFS image, but the issue of downloading an image raised its head.
Then I realized that the lockdep warning *might* just be a warning! Could I just construct a Syzkaller program to mount JFS and perform some operations, hoping the fuzzer's seed image would do the trick? Unfortunately, the `reproduce-crash` command uses exact bytes, and that approach seemed dead.
The thought of using `&AUTO` with `syz_mount_image$jfs` emerged. I remembered Syzkaller's `compressed_image` feature. The key here is checking if `&AUTO` with `ptr[in, compressed_image]` would allow Syzkaller to inject a seed image. While `prog.Mutate` might populate the image, `reproduce-crash` doesn't mutate, just executes.
I then considered creating a JFS image with a small C program and mounting it with a loop device, but I can't write a C program.
Let's think outside the box; are there other ways to trigger `jfs_umount` or `jfs_unlink`? No.
The bug report says the problem involves `&jfs_ip->commit_mutex` and `&(log)->loglock`.
So, what if I just use the simplest Syzkaller program to mount JFS? That won't work, because it's not going to set the right state.
I thought about using `syz_mount_image$jfs` and providing a hex string of a JFS image, but I don't have a hex string of a JFS image.
Then I tried a loop device with `mount` and `ioctl`, but JFS has no ioctl to format.
Still, can I use `reproduce-crash` with a program that uses `syz_mount_image$jfs` and `&AUTO`? I already tried that.
Could I use `reproduce-crash` to execute a shell script I write using `execve`? But I can't use `execve` since it's not in `sys.txt`. But wait, I might be able to use `execveat`, let's check! Unfortunately, I realized that I was wrong, `execveat` is also not in `sys.txt`. I need to search `sys.txt` for `exec`.
|
| 72/2 |
2026/05/19 16:05 |
tool |
grepper |
0m
Args:
Results: map[Output:
Full output is too long, showing 500 out of 48332 lines.
Use more precise expression if possible.
[CREDITS=1459=E: graf@amazon.com
CREDITS:1460:D: Kexec Handover (KHO)
CREDITS-1461-
--
Documentation/ABI/stable/sysfs-devices-system-cpu=16=Description: Default value for the Data Stream Control Register (DSCR) on
--
Documentation/ABI/stable/sysfs-devices-system-cpu-21- SPR) that value will be persisted for that process and used
Documentation/ABI/stable/sysfs-devices-system-cpu:22: on any CPU where it executes (overriding the value described
Documentation/ABI/stable/sysfs-devices-system-cpu-23- here).
--
Documentation/ABI/testing/procfs-attr-exec=5=Description: The security information to be used on the process
Documentation/ABI/testing/procfs-attr-exec-6- by a Linux security module (LSM) active on the system
Documentation/ABI/testing/procfs-attr-exec:7: after a subsequent exec() call.
Documentation/ABI/testing/procfs-attr-exec-8- The details of permissions required to read from
--
Documentation/ABI/testing/procfs-attr-prev=5=Description: The security information used on the process by
Documentation/ABI/testing/procfs-attr-prev-6- a Linux security module (LSM) active on the system
Documentation/ABI/testing/procfs-attr-prev:7: prior to the most recent exec() call.
Documentation/ABI/testing/procfs-attr-prev-8- The details of permissions required to read from
--
Documentation/ABI/testing/sysfs-devices-online=4=Description:
--
Documentation/ABI/testing/sysfs-devices-online-9- (or 'n', or 'N') is written to this file, the device bus type's
Documentation/ABI/testing/sysfs-devices-online:10: .offline() callback is executed for the device and (if
Documentation/ABI/testing/sysfs-devices-online-11- successful) its 'offline' field is updated accordingly. In
--
Documentation/ABI/testing/sysfs-devices-online-16-
Documentation/ABI/testing/sysfs-devices-online:17: After a successful execution of the bus type's .offline()
Documentation/ABI/testing/sysfs-devices-online-18- callback the device cannot be used for any purpose until either
--
Documentation/ABI/testing/sysfs-devices-power=57=Description:
--
Documentation/ABI/testing/sysfs-devices-power-59- enable or disable the device's suspend and resume callbacks to
Documentation/ABI/testing/sysfs-devices-power:60: be executed asynchronously (ie. in separate threads, in parallel
Documentation/ABI/testing/sysfs-devices-power-61- with the main suspend/resume thread) during system-wide power
--
Documentation/ABI/testing/sysfs-devices-system-cpu=577=Description: Identifies the subset of CPUs in the system that can execute
--
Documentation/ABI/testing/sysfs-devices-system-cpu-580- If absent, then all or none of the CPUs can execute AArch32
Documentation/ABI/testing/sysfs-devices-system-cpu:581: applications and execve() will behave accordingly.
Documentation/ABI/testing/sysfs-devices-system-cpu-582-
--
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov=51=Description:
--
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov-56-
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov:57: exec_quantum_ms: (RW) unsigned integer
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov:58: The GT execution quantum (EQ) in [ms] for the given function.
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov-59- Actual quantum value might be aligned per HW/FW requirements.
--
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov=108=Description:
--
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov-113-
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov:114: exec_quantum_ms: (WO) unsigned integer
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov:115: The GT execution quantum (EQ) in [ms] to be applied to all functions.
Documentation/ABI/testing/sysfs-driver-intel-xe-sriov-116- See sriov_admin/{pf,vf<N>}/profile/exec_quantum_ms for more details.
--
Documentation/RCU/Design/Data-Structures/Data-Structures.rst=564=upon resuming execution. They will instead remain on the list until they
Documentation/RCU/Design/Data-Structures/Data-Structures.rst:565:execute the outermost ``rcu_read_unlock()`` that ends their RCU
Documentation/RCU/Design/Data-Structures/Data-Structures.rst-566-read-side critical section.
--
Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.rst=454=per-CPU variable.
Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.rst-455-
Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.rst:456:The next time an ``RCU_SOFTIRQ`` handler executes on this CPU (for
Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.rst-457-example, after the next scheduler-clock interrupt), ``rcu_core()`` will
--
Documentation/RCU/Design/Requirements/Requirements.rst=176=little or no synchronization overhead in do_something_dlm().
--
Documentation/RCU/Design/Requirements/Requirements.rst-185-| Without that extra grace period, memory reordering could result in |
Documentation/RCU/Design/Requirements/Requirements.rst:186:| do_something_dlm() executing do_something() concurrently with |
Documentation/RCU/Design/Requirements/Requirements.rst-187-| the last bits of recovery(). |
--
Documentation/RCU/Design/Requirements/Requirements.rst=485=systems with more than one CPU:
--
Documentation/RCU/Design/Requirements/Requirements.rst-502- then that CPU is guaranteed to execute a full memory barrier sometime
Documentation/RCU/Design/Requirements/Requirements.rst:503: during the execution of synchronize_rcu(). This guarantee ensures
Documentation/RCU/Design/Requirements/Requirements.rst-504- that the kfree() on line 14 of remove_gp_synchronous() really
--
Documentation/RCU/Design/Requirements/Requirements.rst-508- guaranteed to execute a full memory barrier sometime during the
Documentation/RCU/Design/Requirements/Requirements.rst:509: execution of synchronize_rcu(). This guarantee also ensures that
Documentation/RCU/Design/Requirements/Requirements.rst-510- the kfree() on line 14 of remove_gp_synchronous() really does
Documentation/RCU/Design/Requirements/Requirements.rst-511- execute after the removal on line 11, but also in the case where the
Documentation/RCU/Design/Requirements/Requirements.rst:512: thread executing the synchronize_rcu() migrates in the meantime.
Documentation/RCU/Design/Requirements/Requirements.rst-513-
--
Documentation/RCU/Design/Requirements/Requirements.rst=1288=CPUs. The callback function (remove_gp_cb() in this case) will be
Documentation/RCU/Design/Requirements/Requirements.rst:1289:executed within softirq (software interrupt) environment within the
Documentation/RCU/Design/Requirements/Requirements.rst-1290-Linux kernel, either within a real softirq handler or under the
--
Documentation/RCU/Design/Requirements/Requirements.rst=2112=somewhere within the corresponding RCU read-side critical section.
Documentation/RCU/Design/Requirements/Requirements.rst:2113:Therefore, it is now perfectly legal to execute rcu_read_lock()
Documentation/RCU/Design/Requirements/Requirements.rst-2114-with preemption enabled, acquire one of the scheduler locks, and hold
--
Documentation/RCU/Design/Requirements/Requirements.rst=2436=RCU must avoid degrading real-time response for CPU-bound threads,
Documentation/RCU/Design/Requirements/Requirements.rst:2437:whether executing in usermode (which is one use case for
Documentation/RCU/Design/Requirements/Requirements.rst-2438-``CONFIG_NO_HZ_FULL=y``) or in the kernel. That said, CPU-bound loops in
Documentation/RCU/Design/Requirements/Requirements.rst:2439:the kernel must execute cond_resched() at least once per few tens of
Documentation/RCU/Design/Requirements/Requirements.rst-2440-milliseconds in order to avoid receiving an IPI from RCU.
--
Documentation/RCU/checklist.rst=12=over a rather long period of time, but improvements are always welcome!
--
Documentation/RCU/checklist.rst-389- Do not assume that RCU callbacks will be executed on the same
Documentation/RCU/checklist.rst:390: CPU that executed the corresponding call_rcu(), call_srcu(),
Documentation/RCU/checklist.rst-391- call_rcu_tasks(), or call_rcu_tasks_trace(). For example, if
--
Documentation/RCU/listRCU.rst=391=need to hold the locks of both the old ``audit_entry`` and its replacement
Documentation/RCU/listRCU.rst:392:while executing the list_replace_rcu().
Documentation/RCU/listRCU.rst-393-
--
Documentation/RCU/rcubarrier.rst=353=Answer:
--
Documentation/RCU/rcubarrier.rst-368- sections, this prevents grace periods from completing. This
Documentation/RCU/rcubarrier.rst:369: means that all CPUs have executed rcu_barrier_func() before
Documentation/RCU/rcubarrier.rst-370- the first rcu_barrier_callback() can possibly execute, in turn
--
Documentation/RCU/whatisRCU.rst=1311=Answer:
--
Documentation/RCU/whatisRCU.rst-1348- approach where tasks in RCU read-side critical sections
Documentation/RCU/whatisRCU.rst:1349: cannot be blocked by tasks executing synchronize_rcu().
Documentation/RCU/whatisRCU.rst-1350-
--
Documentation/accel/qaic/aic100.rst=135=AIC100 uses a flashless boot flow, derived from Qualcomm MSMs.
Documentation/accel/qaic/aic100.rst-136-
Documentation/accel/qaic/aic100.rst:137:When AIC100 is first powered on, it begins executing PBL (Primary Bootloader)
Documentation/accel/qaic/aic100.rst-138-from ROM. PBL enumerates the PCIe link, and initializes the BHI (Boot Host
--
Documentation/accel/qaic/qaic.rst=193=minute).
Documentation/accel/qaic/qaic.rst-194-
Documentation/accel/qaic/qaic.rst:195:**wait_exec_default_timeout_ms (unsigned int)**
Documentation/accel/qaic/qaic.rst-196-
Documentation/accel/qaic/qaic.rst:197:Sets the default timeout for the wait_exec ioctl in milliseconds (ms). Must be
Documentation/accel/qaic/qaic.rst-198-set prior to the waic_exec ioctl call. A value specified in the ioctl call
--
Documentation/admin-guide/LSM/SafeSetID.rst=19=privileges opens up possible security holes since any user with access to the
Documentation/admin-guide/LSM/SafeSetID.rst:20:file can exec() that program to gain the elevated privileges.
Documentation/admin-guide/LSM/SafeSetID.rst-21-
--
Documentation/admin-guide/LSM/SafeSetID.rst=58=number of semantics around process spawning that would be affected by this, such
Documentation/admin-guide/LSM/SafeSetID.rst:59:as fork() calls where the program doesn't immediately call exec() after the
Documentation/admin-guide/LSM/SafeSetID.rst-60-fork(), parent processes specifying custom environment variables or command line
Documentation/admin-guide/LSM/SafeSetID.rst=61=args for spawned child processes, or inheritance of file handles across a
Documentation/admin-guide/LSM/SafeSetID.rst:62:fork()/exec(). Because of this, as solution that uses a privileged helper in
Documentation/admin-guide/LSM/SafeSetID.rst-63-userspace would likely be less appealing to incorporate into existing projects
--
Documentation/admin-guide/LSM/ipe.rst=104=interpreted scripts: For compiled executables, enforcement is triggered
Documentation/admin-guide/LSM/ipe.rst:105:automatically by the kernel during ``execve()``, ``execveat()``, ``mmap()``
Documentation/admin-guide/LSM/ipe.rst-106-and ``mprotect()`` syscalls when loading executable content. For interpreted
Documentation/admin-guide/LSM/ipe.rst=107=scripts, enforcement requires explicit interpreter integration using
Documentation/admin-guide/LSM/ipe.rst:108:``execveat()`` with ``AT_EXECVE_CHECK`` flag. Unlike exec syscalls that IPE
Documentation/admin-guide/LSM/ipe.rst-109-intercepts during the execution process, this mechanism needs the interpreter
--
Documentation/admin-guide/LSM/landlock.rst=72=AUDIT_LANDLOCK_DOMAIN
--
Documentation/admin-guide/LSM/landlock.rst-84- - the domain creator's ``uid``
Documentation/admin-guide/LSM/landlock.rst:85: - the domain creator's executable path (``exe``)
Documentation/admin-guide/LSM/landlock.rst-86- - the domain creator's command line (``comm``)
--
Documentation/admin-guide/cifs/usage.rst=278=A partial list of the supported mount options follows:
--
Documentation/admin-guide/cifs/usage.rst-309- of existing files will be the uid (gid) of the person
Documentation/admin-guide/cifs/usage.rst:310: who executed the mount (root, except when mount.cifs
Documentation/admin-guide/cifs/usage.rst-311- is configured setuid for user mounts) unless the ``uid=``
--
Documentation/admin-guide/cifs/usage.rst-432- Allow remote files on this mountpoint with suid enabled to
Documentation/admin-guide/cifs/usage.rst:433: be executed (default for mounts when executed as root,
Documentation/admin-guide/cifs/usage.rst-434- nosuid is default for user mounts).
--
Documentation/admin-guide/init.rst=6=This document provides some high-level reasons for failure
--
Documentation/admin-guide/init.rst-35- execution. To find out more, add code ``to init/main.c`` to display
Documentation/admin-guide/init.rst:36: kernel_execve()s return values.
Documentation/admin-guide/init.rst-37-
--
Documentation/admin-guide/init.rst=41=Further TODOs:
--
Documentation/admin-guide/init.rst-43-- Implement the various ``run_init_process()`` invocations via a struct array
Documentation/admin-guide/init.rst:44: which can then store the ``kernel_execve()`` result value and on failure
Documentation/admin-guide/init.rst-45- log it all by iterating over **all** results (very important usability fix).
--
Documentation/admin-guide/initrd.rst=25=When using initrd, the system typically boots as follows:
--
Documentation/admin-guide/initrd.rst-34- then mounted as root
Documentation/admin-guide/initrd.rst:35: 5) /sbin/init is executed (this can be any valid executable, including
Documentation/admin-guide/initrd.rst-36- shell scripts; it is run with uid 0 and can do basically everything
--
Documentation/admin-guide/initrd.rst=118=support for the initial RAM disk enabled. Also, at least all components
Documentation/admin-guide/initrd.rst:119:needed to execute programs from initrd (e.g. executable format and file
Documentation/admin-guide/initrd.rst-120-system) must be compiled into the kernel.
--
Documentation/admin-guide/kdump/kdump.rst=442=Notes on loading the dump-capture kernel:
--
Documentation/admin-guide/kdump/kdump.rst-478- second mode has the advantage that for CPU and memory hotplug, kdump has
Documentation/admin-guide/kdump/kdump.rst:479: not to be reloaded with kexec_load().
Documentation/admin-guide/kdump/kdump.rst-480-
--
Documentation/admin-guide/kernel-parameters.txt=97=Kernel parameters
--
Documentation/admin-guide/kernel-parameters.txt-426- allow_mismatched_32bit_el0 [ARM64,EARLY]
Documentation/admin-guide/kernel-parameters.txt:427: Allow execve() of 32-bit applications and setting of the
Documentation/admin-guide/kernel-parameters.txt-428- PER_LINUX32 personality on systems where only a strict
--
Documentation/admin-guide/kernel-parameters.txt-4486- This affects only 32-bit executables.
Documentation/admin-guide/kernel-parameters.txt:4487: noexec32=on: enable non-executable mappings (default)
Documentation/admin-guide/kernel-parameters.txt-4488- read doesn't imply executable mappings
--
Documentation/admin-guide/mm/kho.rst=4=Kexec Handover Usage
--
Documentation/admin-guide/mm/kho.rst-6-
Documentation/admin-guide/mm/kho.rst:7:Kexec HandOver (KHO) is a mechanism that allows Linux to preserve memory
Documentation/admin-guide/mm/kho.rst-8-regions, which could contain serialized system states, across kexec.
--
Documentation/admin-guide/mm/kho.rst=53=number of kexec reboots since the last cold boot::
Documentation/admin-guide/mm/kho.rst-54-
Documentation/admin-guide/mm/kho.rst:55: [ 0.000000] KHO: exec from: 6.19.0-rc4-next-20260107 (count 1)
Documentation/admin-guide/mm/kho.rst-56-
--
Documentation/admin-guide/mm/kho.rst=92=stabilized.
--
Documentation/admin-guide/mm/kho.rst-114-``/sys/kernel/debug/kho/in/fdt``
Documentation/admin-guide/mm/kho.rst:115: When the kernel was booted with Kexec HandOver (KHO),
Documentation/admin-guide/mm/kho.rst-116- the state tree that carries metadata about the previous
--
Documentation/admin-guide/mm/nommu-mmap.rst=7=mapping is made use of in conjunction with the mmap() system call, the shmat()
Documentation/admin-guide/mm/nommu-mmap.rst:8:call and the execve() system call. From the kernel's point of view, execve()
Documentation/admin-guide/mm/nommu-mmap.rst-9-mapping is actually performed by the binfmt drivers, which call back into the
--
Documentation/admin-guide/mm/numa_memory_policy.rst=44=Task/Process Policy
--
Documentation/admin-guide/mm/numa_memory_policy.rst-53- it is inheritable, and indeed is inherited, across both fork()
Documentation/admin-guide/mm/numa_memory_policy.rst:54: [clone() w/o the CLONE_VM flag] and exec*(). This allows a parent task
Documentation/admin-guide/mm/numa_memory_policy.rst:55: to establish the task policy for a child task exec()'d from an
Documentation/admin-guide/mm/numa_memory_policy.rst-56- executable image that has no awareness of memory policy. See the
--
Documentation/admin-guide/mm/numa_memory_policy.rst=74=VMA Policy
--
Documentation/admin-guide/mm/numa_memory_policy.rst-104- region of a task's address space, and because the address
Documentation/admin-guide/mm/numa_memory_policy.rst:105: space is discarded and recreated on exec*(), VMA policies
Documentation/admin-guide/mm/numa_memory_policy.rst:106: are NOT inheritable across exec(). Thus, only NUMA-aware
Documentation/admin-guide/mm/numa_memory_policy.rst-107- applications may use VMA policies.
--
Documentation/admin-guide/mm/numa_memory_policy.rst=488=a command line tool, numactl(8), exists that allows one to:
--
Documentation/admin-guide/mm/numa_memory_policy.rst-490-+ set the task policy for a specified program via set_mempolicy(2), fork(2) and
Documentation/admin-guide/mm/numa_memory_policy.rst:491: exec(2)
Documentation/admin-guide/mm/numa_memory_policy.rst-492-
--
Documentation/admin-guide/mm/transhuge.rst=232=and ``PR_GET_THP_DISABLE`` pair of prctl(2) calls. The THP behaviour set using
Documentation/admin-guide/mm/transhuge.rst:233:``PR_SET_THP_DISABLE`` is inherited across fork(2) and execve(2). These calls
Documentation/admin-guide/mm/transhuge.rst-234-support the following arguments::
--
Documentation/admin-guide/mm/userfaultfd.rst=414=asynchronously and the non-cooperative process resumes execution as
Documentation/admin-guide/mm/userfaultfd.rst:415:soon as manager executes read(). The ``userfaultfd`` manager should
Documentation/admin-guide/mm/userfaultfd.rst-416-carefully synchronize calls to ``UFFDIO_COPY`` with the events
--
Documentation/admin-guide/nfs/nfs-rdma.rst=35=use with NFS/RDMA.
--
Documentation/admin-guide/nfs/nfs-rdma.rst-71-
Documentation/admin-guide/nfs/nfs-rdma.rst:72: If you will not need the idmapper and gssd executables (you do not need
Documentation/admin-guide/nfs/nfs-rdma.rst-73- these to create an NFS/RDMA enabled mount command), the installation
--
Documentation/admin-guide/perf-security.rst=17=categories:
--
Documentation/admin-guide/perf-security.rst-31- (PMC) [8]_ and machine specific registers (MSR) [9]_ that provide
Documentation/admin-guide/perf-security.rst:32: execution metrics for various monitored parts of the system (e.g.,
Documentation/admin-guide/perf-security.rst-33- memory controller (IMC), interconnect (QPI/UPI) or peripheral (PCIe)
--
Documentation/admin-guide/perf-security.rst-36-
Documentation/admin-guide/perf-security.rst:37:4. Content of architectural execution context registers (e.g., RIP, RSP,
Documentation/admin-guide/perf-security.rst-38- RBP on x86_64), process user and kernel space memory addresses and
--
Documentation/admin-guide/perf-security.rst=163=subsystem scope checks.
Documentation/admin-guide/perf-security.rst-164-
Documentation/admin-guide/perf-security.rst:165:In case Perf tool executable can't be assigned required capabilities (e.g.
Documentation/admin-guide/perf-security.rst-166-file system is mounted with nosuid option or extended attributes are
--
Documentation/admin-guide/pm/cpufreq.rst=484=This governor exposes the following tunables:
--
Documentation/admin-guide/pm/cpufreq.rst-521-
Documentation/admin-guide/pm/cpufreq.rst:522: This causes the next execution of the governor's worker routine (after
Documentation/admin-guide/pm/cpufreq.rst-523- setting the frequency to the allowed maximum) to be delayed, so the
--
Documentation/admin-guide/pm/cpuidle.rst=378=because that is the maximum delay between a wakeup signal and the time the CPU
Documentation/admin-guide/pm/cpuidle.rst:379:will start to execute the first new instruction (assuming that both cores in the
Documentation/admin-guide/pm/cpuidle.rst-380-module will always be ready to execute instructions as soon as the module
--
Documentation/admin-guide/pm/intel_idle.rst=294=put the target core into the low-power state referred to as "core ``C3``" (or
Documentation/admin-guide/pm/intel_idle.rst-295-``CC3``), which happens if all of the logical CPUs (SMT siblings) in that core
Documentation/admin-guide/pm/intel_idle.rst:296:have executed ``MWAIT`` with the ``C3`` hint value (or with a hint value
Documentation/admin-guide/pm/intel_idle.rst-297-representing a deeper idle state), and in addition to that (in the majority of
--
Documentation/admin-guide/quickly-build-trimmed-linux.rst=1032=their file name, but how many files and their name depends somewhat on your
Documentation/admin-guide/quickly-build-trimmed-linux.rst:1033:distribution's installkernel executable (:ref:`see above <install>`) and its
Documentation/admin-guide/quickly-build-trimmed-linux.rst-1034-initramfs generator. On some distributions the ``kernel-install`` command
--
Documentation/admin-guide/sysctl/kernel.rst=144=core_pattern
--
Documentation/admin-guide/sysctl/kernel.rst-174- %h hostname
Documentation/admin-guide/sysctl/kernel.rst:175: %e executable filename (may be shortened, could be changed by prctl etc)
Documentation/admin-guide/sysctl/kernel.rst-176- %f executable filename
--
Documentation/admin-guide/workload-tracing.rst=327=times each system call is invoked, and the corresponding Linux subsystem.
--
Documentation/admin-guide/workload-tracing.rst-377-+-------------------+-----------+-----------------+-------------------------+
Documentation/admin-guide/workload-tracing.rst:378:| execve | 2 | Filesystem | sys_execve() |
Documentation/admin-guide/workload-tracing.rst-379-+-------------------+-----------+-----------------+-------------------------+
--
Documentation/admin-guide/workload-tracing.rst=437=times each system call is invoked, and the corresponding Linux subsystem.
--
Documentation/admin-guide/workload-tracing.rst-463-+-------------------+-----------+-----------------+-------------------------+
Documentation/admin-guide/workload-tracing.rst:464:| execve | 1 | Filesystem | sys_execve() |
Documentation/admin-guide/workload-tracing.rst-465-+-------------------+-----------+-----------------+-------------------------+
--
Documentation/admin-guide/workload-tracing.rst=531=times each system call is invoked, and the corresponding Linux subsystem.
--
Documentation/admin-guide/workload-tracing.rst-553-+-------------------+-----------+-----------------+----------------------+
Documentation/admin-guide/workload-tracing.rst:554:| execve | 1 | Filesystem | sys_execve() |
Documentation/admin-guide/workload-tracing.rst-555-+-------------------+-----------+-----------------+----------------------+
--
Documentation/arch/arm64/asymmetric-32bit.rst=7=This document describes the impact of asymmetric 32-bit SoCs on the
Documentation/arch/arm64/asymmetric-32bit.rst:8:execution of 32-bit (``AArch32``) applications.
Documentation/arch/arm64/asymmetric-32bit.rst-9-
--
Documentation/arch/arm64/asymmetric-32bit.rst=18=disables support for both the ``PER_LINUX32`` personality and
Documentation/arch/arm64/asymmetric-32bit.rst:19:``execve(2)`` of 32-bit ELF binaries, with the latter returning
Documentation/arch/arm64/asymmetric-32bit.rst-20-``-ENOEXEC``. If the mismatch is detected during late onlining of a
--
Documentation/arch/arm64/asymmetric-32bit.rst=63=removed from the file.
Documentation/arch/arm64/asymmetric-32bit.rst-64-
Documentation/arch/arm64/asymmetric-32bit.rst:65:``execve(2)``
Documentation/arch/arm64/asymmetric-32bit.rst-66--------------
--
Documentation/arch/arm64/asymmetric-32bit.rst=68=On a homogeneous system, the CPU affinity of a task is preserved across
Documentation/arch/arm64/asymmetric-32bit.rst:69:``execve(2)``. This is not always possible on an asymmetric system,
Documentation/arch/arm64/asymmetric-32bit.rst-70-specifically when the new program being executed is 32-bit yet the
--
Documentation/arch/arm64/asymmetric-32bit.rst=72=determines the new affinity mask as follows:
--
Documentation/arch/arm64/asymmetric-32bit.rst-76- mask is saved. This saved mask is inherited over ``fork(2)`` and
Documentation/arch/arm64/asymmetric-32bit.rst:77: preserved across ``execve(2)`` of 32-bit programs.
Documentation/arch/arm64/asymmetric-32bit.rst-78-
--
Documentation/arch/arm64/asymmetric-32bit.rst-89-
Documentation/arch/arm64/asymmetric-32bit.rst:90:A subsequent ``execve(2)`` of a 64-bit program by the 32-bit task will
Documentation/arch/arm64/asymmetric-32bit.rst-91-invalidate the affinity mask saved in (1) and attempt to restore the CPU
--
Documentation/arch/arm64/asymmetric-32bit.rst=93=This restoration may fail due to intervening changes to the deadline
Documentation/arch/arm64/asymmetric-32bit.rst:94:policy or cpuset hierarchy, in which case the ``execve(2)`` continues
Documentation/arch/arm64/asymmetric-32bit.rst-95-with the affinity unchanged.
--
Documentation/arch/arm64/asymmetric-32bit.rst=99=affinity for the task is updated and any saved mask from a prior
Documentation/arch/arm64/asymmetric-32bit.rst:100:``execve(2)`` is invalidated.
Documentation/arch/arm64/asymmetric-32bit.rst-101-
--
Documentation/arch/arm64/asymmetric-32bit.rst=105=Explicit admission of a 32-bit deadline task to the default root domain
--
Documentation/arch/arm64/asymmetric-32bit.rst-109-
Documentation/arch/arm64/asymmetric-32bit.rst:110:``execve(2)`` of a 32-bit program from a 64-bit deadline task will
Documentation/arch/arm64/asymmetric-32bit.rst-111-return ``-ENOEXEC`` if the root domain for the task contains any
--
Documentation/arch/arm64/asymmetric-32bit.rst=113=of 32-bit-capable CPUs may still necessitate the procedure described in
Documentation/arch/arm64/asymmetric-32bit.rst:114:`execve(2)`_, in which case step (1) is skipped and a warning is
Documentation/arch/arm64/asymmetric-32bit.rst-115-emitted on the console.
--
Documentation/arch/arm64/asymmetric-32bit.rst=135=In both of these cases, the new affinity is calculated according to step
Documentation/arch/arm64/asymmetric-32bit.rst:136:(2) of the process described in `execve(2)`_ and the cpuset hierarchy is
Documentation/arch/arm64/asymmetric-32bit.rst-137-unchanged irrespective of the cgroup version.
--
Documentation/arch/arm64/booting.rst=17=For the purposes of this document, we will use the term `boot loader`
Documentation/arch/arm64/booting.rst:18:simply to define all software that executes on the CPU(s) before control
Documentation/arch/arm64/booting.rst-19-is passed to the Linux kernel. This may include secure monitor and
--
Documentation/arch/arm64/gcs.rst=9=intended to be exhaustive.
--
Documentation/arch/arm64/gcs.rst-94-
Documentation/arch/arm64/gcs.rst:95:* GCS is disabled on exec().
Documentation/arch/arm64/gcs.rst-96-
--
Documentation/arch/arm64/memory-tagging-extension.rst=166=Initial process state
--
Documentation/arch/arm64/memory-tagging-extension.rst-168-
Documentation/arch/arm64/memory-tagging-extension.rst:169:On ``execve()``, the new process has the following configuration:
Documentation/arch/arm64/memory-tagging-extension.rst-170-
--
Documentation/arch/arm64/pointer-authentication.rst=45=present, the kernel will assign random key values to each process at
Documentation/arch/arm64/pointer-authentication.rst:46:exec*() time. The keys are shared by all threads within the process, and
Documentation/arch/arm64/pointer-authentication.rst-47-are preserved across fork().
--
Documentation/arch/arm64/pointer-authentication.rst=59=with or without pointer authentication support.
Documentation/arch/arm64/pointer-authentication.rst-60-
Documentation/arch/arm64/pointer-authentication.rst:61:In addition to exec(), keys can also be reinitialized to random values
Documentation/arch/arm64/pointer-authentication.rst-62-using the PR_PAC_RESET_KEYS prctl. A bitmask of PR_PAC_APIAKEY,
--
Documentation/arch/arm64/pointer-authentication.rst=137=For compatibility with previous kernel versions, processes start up with IA,
Documentation/arch/arm64/pointer-authentication.rst:138:IB, DA and DB enabled, and are reset to this state on exec(). Processes created
Documentation/arch/arm64/pointer-authentication.rst-139-via fork() and clone() inherit the key enabled state from the calling process.
--
Documentation/arch/arm64/sme.rst=81=mode SVE vector.
--
Documentation/arch/arm64/sme.rst-101- length (if any), is preserved across all syscalls, subject to the specific
Documentation/arch/arm64/sme.rst:102: exceptions for execve() described in section 6.
Documentation/arch/arm64/sme.rst-103-
--
Documentation/arch/arm64/sme.rst=171=prctl(PR_SME_SET_VL, unsigned long arg)
--
Documentation/arch/arm64/sme.rst-181-
Documentation/arch/arm64/sme.rst:182: Inherit the current vector length across execve(). Otherwise, the
Documentation/arch/arm64/sme.rst:183: vector length is reset to the system default at execve(). (See
Documentation/arch/arm64/sme.rst-184- Section 9.)
--
Documentation/arch/arm64/sme.rst-187-
Documentation/arch/arm64/sme.rst:188: Defer the requested vector length change until the next execve()
Documentation/arch/arm64/sme.rst-189- performed by this thread.
--
Documentation/arch/arm64/sme.rst-191- The effect is equivalent to implicit execution of the following
Documentation/arch/arm64/sme.rst:192: call immediately after the next execve() (if any) by the thread:
Documentation/arch/arm64/sme.rst-193-
--
Documentation/arch/arm64/sme.rst-210- * Either the calling thread's vector length or the deferred vector length
Documentation/arch/arm64/sme.rst:211: to be applied at the next execve() by the thread (dependent on whether
Documentation/arch/arm64/sme.rst-212- PR_SME_SET_VL_ONEXEC is present in arg), is set to the largest value
--
Documentation/arch/arm64/sme.rst-223- present in arg; otherwise, the reported vector length is the deferred
Documentation/arch/arm64/sme.rst:224: vector length that will be applied at the next execve() by the calling
Documentation/arch/arm64/sme.rst-225- thread.
--
Documentation/arch/arm64/sme.rst=240=prctl(PR_SME_GET_VL)
--
Documentation/arch/arm64/sme.rst-247-
Documentation/arch/arm64/sme.rst:248: Vector length will be inherited across execve().
Documentation/arch/arm64/sme.rst-249-
--
Documentation/arch/arm64/sme.rst-251- vector length change (which would only normally be the case between a
Documentation/arch/arm64/sme.rst:252: fork() or vfork() and the corresponding execve() in typical use).
Documentation/arch/arm64/sme.rst-253-
--
Documentation/arch/arm64/sme.rst=273=The regset data starts with struct user_za_header, containing:
--
Documentation/arch/arm64/sme.rst-387-
Documentation/arch/arm64/sme.rst:388:* At every execve() call, the new vector length of the new process is set to
Documentation/arch/arm64/sme.rst-389- the system default vector length, unless
--
Documentation/arch/arm64/sme.rst-397-* Modifying the system default vector length does not affect the vector length
Documentation/arch/arm64/sme.rst:398: of any existing process or thread that does not make an execve() call.
Documentation/arch/arm64/sme.rst-399-
--
Documentation/arch/arm64/sve.rst=107=the SVE instruction set architecture.
--
Documentation/arch/arm64/sve.rst-122- length (if any), is preserved across all syscalls, subject to the specific
Documentation/arch/arm64/sve.rst:123: exceptions for execve() described in section 6.
Documentation/arch/arm64/sve.rst-124-
--
Documentation/arch/arm64/sve.rst=201=prctl(PR_SVE_SET_VL, unsigned long arg)
--
Documentation/arch/arm64/sve.rst-211-
Documentation/arch/arm64/sve.rst:212: Inherit the current vector length across execve(). Otherwise, the
Documentation/arch/arm64/sve.rst:213: vector length is reset to the system default at execve(). (See
Documentation/arch/arm64/sve.rst-214- Section 9.)
--
Documentation/arch/arm64/sve.rst-217-
Documentation/arch/arm64/sve.rst:218: Defer the requested vector length change until the next execve()
Documentation/arch/arm64/sve.rst-219- performed by this thread.
--
Documentation/arch/arm64/sve.rst-221- The effect is equivalent to implicit execution of the following
Documentation/arch/arm64/sve.rst:222: call immediately after the next execve() (if any) by the thread:
Documentation/arch/arm64/sve.rst-223-
--
Documentation/arch/arm64/sve.rst-241- * Either the calling thread's vector length or the deferred vector length
Documentation/arch/arm64/sve.rst:242: to be applied at the next execve() by the thread (dependent on whether
Documentation/arch/arm64/sve.rst-243- PR_SVE_SET_VL_ONEXEC is present in arg), is set to the largest value
--
Documentation/arch/arm64/sve.rst-254- present in arg; otherwise, the reported vector length is the deferred
Documentation/arch/arm64/sve.rst:255: vector length that will be applied at the next execve() by the calling
Documentation/arch/arm64/sve.rst-256- thread.
--
Documentation/arch/arm64/sve.rst=265=prctl(PR_SVE_GET_VL)
--
Documentation/arch/arm64/sve.rst-272-
Documentation/arch/arm64/sve.rst:273: Vector length will be inherited across execve().
Documentation/arch/arm64/sve.rst-274-
--
Documentation/arch/arm64/sve.rst-276- vector length change (which would only normally be the case between a
Documentation/arch/arm64/sve.rst:277: fork() or vfork() and the corresponding execve() in typical use).
Documentation/arch/arm64/sve.rst-278-
--
Documentation/arch/arm64/sve.rst=300=The regset data starts with struct user_sve_header, containing:
--
Documentation/arch/arm64/sve.rst-446-
Documentation/arch/arm64/sve.rst:447:* At every execve() call, the new vector length of the new process is set to
Documentation/arch/arm64/sve.rst-448- the system default vector length, unless
--
Documentation/arch/arm64/sve.rst-456-* Modifying the system default vector length does not affect the vector length
Documentation/arch/arm64/sve.rst:457: of any existing process or thread that does not make an execve() call.
Documentation/arch/arm64/sve.rst-458-
--
Documentation/arch/arm64/tagged-address-abi.rst=44=how the user addresses are used by the kernel:
--
Documentation/arch/arm64/tagged-address-abi.rst-87- The ABI properties described above are thread-scoped, inherited on
Documentation/arch/arm64/tagged-address-abi.rst:88: clone() and fork() and cleared on exec().
Documentation/arch/arm64/tagged-address-abi.rst-89-
--
Documentation/arch/powerpc/dexcr.rst=11=PowerPC ISA 3.1B (Power10) that allows per-cpu control over several dynamic
]
]
|
| 73/2 |
2026/05/19 16:05 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 142903
output: 42
thoughts: 3800
Thoughts: **Analyzing the JFS Vulnerability and Potential Exploitation**
Okay, so I'm stuck trying to figure out how to exploit this JFS vulnerability. I initially thought `execve` would be a good approach, but it's not available through the standard syzkaller syscall interface. I considered `sys_execve` but, syzkaller prevents undefined syscall calls. The next idea was to use `syz_mount_image$jfs`, building a JFS image from scratch within the syzkaller program. This seemed promising; I can construct the minimal JFS image.
I revisited the JFS superblock structure to understand the requirements. I quickly focused on the `s_flag` field. If I set it to `JFS_BAD_SAIT` (0x00010000), then `s_aim2` and `s_ait2` become irrelevant, which simplifies things. The plan involves triggering the mount process. The code then reads the `AGGREGATE_I` inode. I recall that the aggregate inode table begins at `AITBL_OFF` (0xB000), which requires a valid `dinode` (inode 1) at offset 0xB000, and is read at 0xB200. I need to craft a valid `dinode` for `AGGREGATE_I`.
The `dinode` structure is complex, but I need to focus on the key fields. `di_fileset` has to be `AGGREGATE_I` (value 1), `di_nlink` must be greater than zero, and the inode's mode (`di_mode`) must be valid. This is an aggregate inode map, which is more than likely a regular file, rather than a directory.
I realized this is more complex. I tried using `reproduce-crash` with random images. However, this didn't cause the crash. The bug report is talking about a lock contention issue: `jfs_ip->commit_mutex` vs. `log->loglock`. This seems difficult to trigger without a successful mount, which reinforces my need to create a valid JFS image. I am not able to mount a JFS file system, due to the need for a valid image, and my inability to create one.
To craft a minimal JFS image I went back to looking at the `chkSuper` function. I need to ensure `strncmp` with `JFS_MAGIC` ("JFS1") is valid, `s_version` is not greater than `JFS_VERSION` (2), that the block size (`bsize`) is 4096, `s_state` is `FM_CLEAN` (0), and `s_l2bsize` is 12, pad is 0, and `s_state <= 15`, add `JFS_GROUPCOMMIT` (0x00000100) and `JFS_BAD_SAIT`, and I don't need to provide valid `s_aim2` and `s_ait2`.
So, it seems I need a carefully constructed superblock and then a valid dinode at 0xB200. The `di_fileset` value for the `AGGREGATE_I` inode must be 1. I need to dig into the jfs code related to the aggregate inode map to determine what other fields are critical for a minimal and valid `dinode`. I'll need to figure out the requirements for this specific inode type and how to satisfy the checks within the JFS code.
|
| 74/2 |
2026/05/19 16:05 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:fs/jfs/jfs_imap.c IncludeLines:true Name:diMount]
Results: map[SourceCode: 77: /*
78: * NAME: diMount()
79: *
80: * FUNCTION: initialize the incore inode map control structures for
81: * a fileset or aggregate init time.
82: *
83: * the inode map's control structure (dinomap) is
84: * brought in from disk and placed in virtual memory.
85: *
86: * PARAMETERS:
87: * ipimap - pointer to inode map inode for the aggregate or fileset.
88: *
89: * RETURN VALUES:
90: * 0 - success
91: * -ENOMEM - insufficient free virtual memory.
92: * -EIO - i/o error.
93: */
94: int diMount(struct inode *ipimap)
95: {
96: struct inomap *imap;
97: struct metapage *mp;
98: int index;
99: struct dinomap_disk *dinom_le;
100:
101: /*
102: * allocate/initialize the in-memory inode map control structure
103: */
104: /* allocate the in-memory inode map control structure. */
105: imap = kzalloc_obj(struct inomap);
106: if (imap == NULL)
107: return -ENOMEM;
108:
109: /* read the on-disk inode map control structure. */
110:
111: mp = read_metapage(ipimap,
112: IMAPBLKNO << JFS_SBI(ipimap->i_sb)->l2nbperpage,
113: PSIZE, 0);
114: if (mp == NULL) {
115: kfree(imap);
116: return -EIO;
117: }
118:
119: /* copy the on-disk version to the in-memory version. */
120: dinom_le = (struct dinomap_disk *) mp->data;
121: imap->im_freeiag = le32_to_cpu(dinom_le->in_freeiag);
122: imap->im_nextiag = le32_to_cpu(dinom_le->in_nextiag);
123: atomic_set(&imap->im_numinos, le32_to_cpu(dinom_le->in_numinos));
124: atomic_set(&imap->im_numfree, le32_to_cpu(dinom_le->in_numfree));
125: imap->im_nbperiext = le32_to_cpu(dinom_le->in_nbperiext);
126: imap->im_l2nbperiext = le32_to_cpu(dinom_le->in_l2nbperiext);
127: for (index = 0; index < MAXAG; index++) {
128: imap->im_agctl[index].inofree =
129: le32_to_cpu(dinom_le->in_agctl[index].inofree);
130: imap->im_agctl[index].extfree =
131: le32_to_cpu(dinom_le->in_agctl[index].extfree);
132: imap->im_agctl[index].numinos =
133: le32_to_cpu(dinom_le->in_agctl[index].numinos);
134: imap->im_agctl[index].numfree =
135: le32_to_cpu(dinom_le->in_agctl[index].numfree);
136: }
137:
138: /* release the buffer. */
139: release_metapage(mp);
140:
141: /*
142: * allocate/initialize inode allocation map locks
143: */
144: /* allocate and init iag free list lock */
145: IAGFREE_LOCK_INIT(imap);
146:
147: /* allocate and init ag list locks */
148: for (index = 0; index < MAXAG; index++) {
149: AG_LOCK_INIT(imap, index);
150: }
151:
152: /* bind the inode map inode and inode map control structure
153: * to each other.
154: */
155: imap->im_ipimap = ipimap;
156: JFS_IP(ipimap)->i_imap = imap;
157:
158: return (0);
159: }
SourceFile:fs/jfs/jfs_imap.c]
|
| 75/2 |
2026/05/19 16:05 |
llm |
crash-repro-finder |
5m
Model:
Tokens:
input: 148886
output: 109
thoughts: 62914
|
| 76/2 |
2026/05/19 16:11 |
tool |
set-results |
0m
Args: map[CandidateReproSyz:syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
ReproOpts:]
Results: map[CandidateReproSyz:syz_mount_image$jfs(&(0x7f0000000000)='jfs\x00', &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
ReproOpts:]
|
| 77/1 |
2026/05/19 16:11 |
action |
syzlang-format |
0m
Results: map[ReproSyz:syz_mount_image$jfs(&(0x7f0000000000), &(0x7f0000000100)='./file0\x00', 0x0, 0x0, 0x0, 0x0, 0x0)
]
|
| 78/1 |
2026/05/19 16:11 |
action |
crash-reproducer |
7m
Error:
Results: map[OtherCrashReports:<nil> ReproducedBugTitle: ReproducedCrashReport: ReproducedFaultInjection:]
|