Currently, pipe2 both closes the fds and releases references to the pipe
vnode on failure. However, closing the fds already causes the vnode
references to be dropped.
Make pipe2 only release the vnode references when the respective file_t
were not closed.
Found by syzkaller fuzzing.
The current mknodat code creates symlinks when requested. Not only does
this break POSIX, it also causes a kernel crash (NULL-deref on
tmpfs_readlink).
Refuse to create symlinks with mknodat.
Found by syzkaller fuzzing.
The current kcov code attaches a kcov object to the thread which opened
it. This is not desirable, as syzkaller opens /dev/kcov in a parent
process and passes it down to the child.
Move the thread attachment from open() time to start time.
Implement a device (/dev/kcov) that exposes coverage info for the
kernel. This will be especially useful for coverage-based fuzzing (e.g.
syzkaller).
Exclude a lot of functions which would crash/otherwise interfere in the
coverage, including only processing coverage callbacks when not handling
an irq.
Add a way of checking if a cpu is in the middle of handling an irq and
how deep it is into it. This will allow for future code to conditionally
run only in/outside interrupts.
The SMP code exposes that a cpu woke up before it is properly
initialized in sched_ap_entry(). Fix this by initializing it first,
exposing it and then stopping the bootstrap thread.
Prevent the load balancer from balancing when running uniprocessor
machines and when not all CPUs are online yet.
This prevents a race between ap initialization and load balancing.
For some usecases, silencing syscall_print()s is ideal. A good example
of that is syzkaller, which uses logs to detect crashes and a badly
timed syscall_print() could interfere.
Add a nouserprint argument which skips printing on syscall_print().