aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/osutil/osutil_linux.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/osutil: fix CreationTimeDmitry Vyukov2026-01-091-3/+14
| | | | | | | | | | 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
* pkg/osutil: add DiskUsage functionDmitry Vyukov2026-01-091-0/+6
| | | | DiskUsage returns total recursive disk usage of the dir (similar to du -s).
* pkg/manager: show bug first timeDmitry Vyukov2025-01-171-0/+5
| | | | | This allows to understand if a bug is new (found in the current run) or old.
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-231-2/+1
|
* tools/syz-testbed: do not send SIGKILL to syz-managersAleksandr Nogikh2021-10-201-2/+6
| | | | | 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.
* tools/syz-linter: fix comments checkDmitry Vyukov2020-07-101-1/+1
| | | | | | | Turns out ast.Inspect does not visit most comments. Walk file.Comments manually. Update #1876
* pkg/osutil: remove appengine tagDmitry Vyukov2020-07-061-2/+0
| | | | | Appengine doesn't provide appengine tag anymore. Resort to use of syscall package for ExitStatus instead.
* pkg/osutil: use functionality from x/sys/unixTobias Klauser2020-06-291-18/+4
| | | | | | | | | | 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>
* pkg/osutil: implement support for linux/riscv64Tobias Klauser2020-06-261-1/+1
| | | | Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
* sys/linux: first 64bit big-endian architecture s390xAlexander Egorenkov2020-06-251-1/+1
| | | | | | | | | | | | | | | * 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>
* pkg/osutil: don't sandbox on CIDmitry Vyukov2020-05-181-1/+1
| | | | | | CI does not have syzkaller user, but may run under root. Update #1699
* Implement basic support for MIPS64LEJouni Hogander2019-12-171-1/+1
| | | | | | | | | Add basic stuff to enable MIPS64ELR2 target: - build - make extract - make generate - qemu execution - system call parsing from /proc/kallsyms
* pkg/osutil: fix arm buildAndrey Konovalov2019-09-161-1/+1
| | | | pkg/osutil/osutil_linux.go:44:13: cannot use info.Totalram (type uint32) as type uint64 in return argument
* tools/syz-env: restrict Makefile parallelism based on RAMDmitry Vyukov2019-07-191-0/+6
| | | | | | | 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
* pkg/osutil: kill subprocesses more reliablyDmitry Vyukov2019-03-181-0/+6
| | | | | | | | | | 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.
* pkg/osutil: fix disabling of sandboxDmitry Vyukov2019-03-171-9/+7
| | | | | | If sandboxing is disabled don't unshare net namespace too. Update #501
* pkg/ipc: generate better temp name for executorDmitry Vyukov2019-02-081-1/+29
| | | | | | | | | Just appending the pid number can produce conflicting names if the name itself ends with digits (standard temp file naming convention). So append ".PID". Also remove beginning from too long names instead of ending. Temp files in tests has unique numbers at the end, we need to preserve them to avoid file name conflicts.
* pkg/osutil: replace UmountAll with RemoveAllDmitry Vyukov2018-08-041-3/+4
| | | | | | | | In pkg/ipc we don't just want to UmountAll, we want to remove all handling as many cases as possible (mounts, read-only files, etc, similar to executor's remove_dir). So unmounting and removing needs to be a single function, so that it can handle all these cases.
* pkg/osutil: allow disabling sandboxing with env varDmitry Vyukov2018-05-171-14/+21
| | | | | | | | If SYZ_DISABLE_SANDBOXING=yes is set, don't do user sandboxing. Will be usefule for bisection tool which runs locally, but needs to build kernel. Update #501
* pkg/osutil: use proper gid during sandboxingDmitry Vyukov2018-03-061-2/+2
|
* pkg/osutil: properly set gid for sandboxingDmitry Vyukov2017-11-171-11/+25
|
* pkg/kernel: sandbox make invocationDmitry Vyukov2017-11-171-2/+62
|
* pkg/osutil: don't leace runaway processesDmitry Vyukov2017-11-161-0/+7
| | | | | | When manager is stopped there are sometimes runaway qemu processes still running. Set PDEATHSIG for all subprocesses. We never need child processes outliving parents.
* executor, pkg/ipc: unify ipc protocol between linux and other OSesDmitry Vyukov2017-10-161-0/+16
| | | | | | | | | | | | | | | | | We currently use more complex and functional protocol on linux, and a simple ad-hoc protocol on other OSes. This leads to code duplication in both ipc and executor. Linux supports coverage, shared memory communication and fork server, which would also be useful for most other OSes. Unify communication protocol and parametrize it by (1) use of shmem or only pipes, (2) use of fork server. This reduces duplication in ipc and executor and will allow to support the useful features for other OSes easily. Finally, this fixes akaros support as it currently uses syz-stress running on host (linux) and executor running on akaros.
* pkg/osutil: don't depend on syscall in appengine buildDmitry Vyukov2017-07-031-0/+2
| | | | | | Dashboard app now depends on osutil through config package. Reshuffle functions so that the package does not depend on syscall in appengine build.
* pkg/osutil: port to darwinDmitry Vyukov2017-06-261-0/+15