| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
We return Ctime from CreationTime. But "C" does not stand for "creation",
it stands for "status change" (inode update). It may or may not be the
creation time.
Use Btime (birth time) for creation time.
Fixes #6547
|
| |
|
|
| |
DiskUsage returns total recursive disk usage of the dir (similar to du -s).
|
| |
|
|
|
|
|
|
| |
Semaphore is a very low-level primitive type,
while pkg/instance is a very high-level package with lots of deps.
Semaphore does not belong there, and may lead to cyclic deps
if we use it more. Move it to pkg/osutil. It's not really OS-specific,
but we don't have a better package.
|
| | |
|
| |
|
|
|
| |
After this change it fits more naturally into the Go's error
functionality.
|
| |
|
|
|
|
| |
Instead of calling grep (the implementations of which may differ in
different environments), traverse the directory and grep files with a
special pkg/osutil helper functionality.
|
| |
|
|
| |
For that, make a part of the tar_test.go reusable.
|
| | |
|
| |
|
|
|
|
|
| |
Currently the commands we have in go:generate first create an empty file
and then write final contents. This breaks any parallel builds of the source.
Even running go generate ./... does not work.
Write output files atomically.
|
| |
|
|
|
| |
go install golang.org/x/tools/cmd/deadcode@latest
deadcode -test ./...
|
| |
|
|
|
| |
This allows to understand if a bug is new
(found in the current run) or old.
|
| | |
|
| |
|
|
|
| |
Make the tool accept a manager config.
This will be required for dynamic extraction of info from the kernel.
|
| |
|
|
|
|
|
| |
Handle SIGKILL (exit code = 137) on osutil.Run() during Linux kernel image
building and return build.InfraError without reporting.
Fixes: https://github.com/google/syzkaller/issues/5317
|
| | |
|
| |
|
|
|
|
|
| |
Akaros support is unused, it was shutdown on syzbot for a while,
the akaros development seems to be frozen for years as well.
We have a bunch of hacks for Akaros since it supported
only super old gcc and haven't supported Go. Remove it.
|
| |
|
|
|
| |
time.Now/Since may reject to use monotonic time if the fuzzer
messes with system time badly enough. Enforce use of monotonic time.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This commit adds a new VM for fuzzing starnix.
The VM will boot a fuchsia image using the `ffx` tool and will connect to an adb server inside it. Fuzzing will be done using HostFuzzer mode due to some features not being implemented yet in starnix. Once this is possible, fuzzing will be performed without HostFuzzer mode.
Co-authored-by: Juampi Miceli <jpmiceli@google.com>
|
| | |
|
| |
|
|
|
|
|
| |
* vm: add pool.Close() support
* vm: add proxyapp client implementation
* vm/proxyapp: autogenerate mocks
* vm/proxyapp: add proxyapp tests
* pkg/mgrconfig: add proxyapp type tests
|
| |
|
|
|
|
|
|
| |
Go-runtime opens all files with CLOEXEC by default.
exec.Cmd doesn't close file descriptors in a child process and so memfd without
CLOEXEC can leak to an executor process where its content can be corrupted by
one of test system calls.
|
| |
|
|
|
|
|
|
|
| |
This commit replaces all `ioutil.TempDir` with `t.TempDir` in tests.
The directory created by `t.TempDir` is automatically removed when the
test and all its subtests complete.
Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
|
| |
|
|
|
|
| |
We've got a timeout of "bazel aquery". It's currently set to 1 minute.
On an overloaded machine it can fire falsely, I guess bazel can start
only for 1 minute. Increase to 10 minutes.
|
| |
|
|
|
|
|
|
|
|
| |
Mmapping plain files as shared memory leads to extra burden on the
system being fuzzed, because the OS will periodically sync that data to
the disk.
On Linux, use memfd_create to obtain a file handle for the shared memory
region. Experiments have demonstrated than it leads to 5-10% increase in
the fuzzing performance.
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently Abs captures pwd in init function and checks
that it's not changing over program execution.
However, in some test environments (bazel) we need to chdir
in test init function because the test process is started
in a wrong dir. This causes the check in Abs to fail.
Query the pwd lazily on the first Abs call.
This does not change behavior for Abs users, but allows
to change pwd in other init functions.
|
| |
|
|
|
| |
Doing so can result in syz-manager leaking GCE instances. Set PDEATHSIG
to SIGTERM instead, so that syz-manager has a change to exit gracefully.
|
| |
|
|
|
|
|
|
|
|
|
| |
"make generate" produces this diff when go 1.17 (go1.17-c95464f0ea3f==upstream)
is used. Seems compatible with >=1.16.
https://github.com/golang/go/commit/4d2d89ff42ca documents the syntax.
https://github.com/golang/go/commit/eeadce2d8713 enforces "ignore" for
unsatisfiable tags hence the pkg/csource/gen.go change.
Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
|
| |
|
|
| |
Knowning the new wd may help to localize the error.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
1. Copy seeds from syzkaller checkout into syzkaller build dir.
They need to be stable.
2. Make the code generic (current is linux-specific).
3. Don't copy seeds to workdir/seeds.
We can load them directly from sys/OS/test.
There are some unresolved comments for LinkDir on #2053 anyway.
Follow up to #2053
|
| |
|
|
| |
Follow up to #2053
|
| |
|
|
|
|
|
| |
This commit enables the syz-manager to add unit test files as corpus to
accelerate fuzzing. The syz-ci would copy unit tests into the
worker/seeds folder for each manager process, and the manager would add
those tests as seed into the corpus.
|
| |
|
|
|
|
|
| |
Turns out ast.Inspect does not visit most comments.
Walk file.Comments manually.
Update #1876
|
| |
|
|
|
| |
Appengine doesn't provide appengine tag anymore.
Resort to use of syscall package for ExitStatus instead.
|
| |
|
|
| |
It's not present in Go 1.11.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Use unix.Unmount instead of manually wrapping SYS_UMOUNT2.
Use unix.IoctlSetPointerInt instead of manually wrapping SYS_IOCTL. This
also allows to use FS_IOC_SETFLAGS instead of manually defining it for
each GOARCH.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
| |
|
|
| |
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* mmap syscall is special on Linux s390x because
the parameters for this syscall are passed as a struct
on user stack instead of registers.
* Introduce the SyscallTrampolines table into targets.Target
to address the above problem.
* There is a bug in Linux kernel s390x which causes QEMU TCG
to hang when KASAN is enabled. The bug has been fixed
in the forthcoming Linux 5.8 version. Until then do not enable
KASAN when using QEMU TCG, QEMU KVM shall have no problems with
KASAN.
Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
|
| |
|
|
| |
Prevents functions with too many nested if's.
|
| |
|
|
|
|
| |
CI does not have syzkaller user, but may run under root.
Update #1699
|
| |
|
|
|
|
|
|
|
| |
Add basic stuff to enable MIPS64ELR2 target:
- build
- make extract
- make generate
- qemu execution
- system call parsing from /proc/kallsyms
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new manager config argument workdir_template refers to a directory. Optional.
Each VM will get a recursive copy of the files that are present in workdir_template.
VM config can then use these private copies as needed. The copy directory
can be referenced with "{{TEMPLATE}}" string. This is different from using
the files directly in that each instance will get own clean, private,
scratch copy of the files. Currently supported only for qemu_args argument
of qemu VM type. Use example:
Create a template dir with necessary files:
$ mkdir /mytemplatedir
$ truncate -s 64K /mytemplatedir/fd
Then specify the dir in the manager config:
"workdir_template": "/mytemplatedir"
Then use these files in VM config:
"qemu_args": "-fda {{TEMPLATE}}/fd"
|
| |
|
|
| |
pkg/osutil/osutil_linux.go:44:13: cannot use info.Totalram (type uint32) as type uint64 in return argument
|
| |
|
|
|
|
|
| |
Ensure that we have at least 1GB per Makefile job.
Go compiler/linker can consume significant amount of memory
(observed to consume at least 600MB). See #1276 for context.
Update #1276
|
| |
|
|
|
|
|
|
|
|
| |
In some cases we start scp, which starts ssh,
then kill scp but the ssh subprocess is not killed.
As the result cmd.Wait hangs waiting for EOF on the stdout/stderr,
which are still kept alive by ssh subprocess. But ssh just hangs forever.
Create a process group for each command and kill whole process group.
Hopefully this will help.
|