Commit Graph

4365 Commits

Author SHA1 Message Date
Andrey Konovalov
98b4ef2d37 sys/linux: update USB TODOs 2019-12-05 15:53:48 +01:00
Dmitry Vyukov
4fb74474cf pkg/report: fix guilty file extraction in presence of rcu stalls
The the added test for exception from exception corner case.

"BUG: spinlock lockup" fails to respect panic_on_warn and panic
after printing report (though, it's a BUG already, so it should
have been paniced even without panic_on_warn).
As the result we got "spinlock lockup" followed by "rcu stall" report.
And we have that special exception for rcu stalls b/c for them
the most of the report is irrelevant up to apic_timer_interrupt frame.
The code did not expect this weird double-report case and skipped
everything up to apic_timer_interrupt, though it's actually
a lockup in netfilter code.
2019-12-05 12:14:58 +01:00
Andrey Konovalov
036f0b1e8d pkg/report: improve reports titles
Ignore kobject_put in stack frames.
2019-12-05 12:03:11 +01:00
Siddharth Muralee
9fd5a512f3 sys/netbsd: fix the build issues with posix_spawn 2019-12-05 10:06:13 +01:00
Siddharth M
b91ea9289b make required changes to sys/netbsd 2019-12-05 10:06:13 +01:00
R3x
a734d2a6d9 sys/netbsd: add the newer vfork syscall 2019-12-05 10:06:13 +01:00
R3x
e06d2ea701 sys/netbsd: Added posix_spawn and fork syscalls 2019-12-05 10:06:13 +01:00
Dmitry Vyukov
b20883285d syz-ci: add Manager.Disabled config parameter
Useful for temporary disabling a manager for any reason
without completely deleting it from the config.
2019-12-04 13:56:12 +01:00
Dmitry Vyukov
69872e8952 docs/linux/found_bugs.md: add 3 manually reported bugs 2019-12-04 11:56:02 +01:00
Dmitry Vyukov
8b4aa626ce prog: fix typo in comment
Linter says:

prog/prio_test.go:68:15: `probablistic` is a misspelling of `probabilistic` (misspell)
		// for this probablistic test.
		            ^
2019-12-04 09:46:40 +01:00
Dmitry Vyukov
0ecb9746a7 prog: fix TestStaticPriorities
With -short and -race we get only 10 iterations
which is not enough for this probablistic test.
Use at least 100 interations always.
2019-12-03 19:34:24 +01:00
Dmitry Vyukov
a2d178996b vm: add workdir_template functionality
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"
2019-12-03 18:48:14 +01:00
Dmitry Vyukov
dfe2e9d84a sys/linux: enforce arguments of all syz_open_dev calls
Opening random devices can lead to havoc.
Enforce device major/minor.
2019-12-03 18:48:14 +01:00
Dmitry Vyukov
799e6ffbbe dashboard/app: enable few more tty/console-related configs for linux 2019-12-03 18:48:14 +01:00
Dmitry Vyukov
cbfd910250 sys/linux: more tuning of tty devices
Enable /dev/tty{1-6}. These seem to be special.
Few first connected to framebuffers. But the rest
seem to be different from e.g. tty20 anyway.
Also /dev/tty is different from the rest.
/dev/ttyS3 and /dev/ttyprintk are different.
Properly pair BSD pty terminals.
2019-12-03 18:48:14 +01:00
Dmitry Vyukov
d20ee9bd98 tools: add fops_probe utility
fops_probe utility helps to understand what file_operations callbacks
are attached to a particular file. Requries KCOV and KALLSYMS.
Build with:
	g++ tools/fops_probe/fops_probe.cc -Wall -static -o fops_probe
Then copy the binary to target machine and run as:
	./fops_probe /dev/fb0
You should see output similar to:

	ffffffff81bcccb9 vfs_read
	................
	ffffffff83af85c3 fb_read
	ffffffff83b52af5 cirrusfb_sync

	ffffffff81bcd219 vfs_write
	................
	ffffffff83af7fe2 fb_write
	ffffffff83b52af5 cirrusfb_sync

	ffffffff81c1b745 do_vfs_ioctl
	ffffffff83af7ea9 fb_ioctl

	ffffffff81a4ea44 do_mmap
	................
	ffffffff83af716c fb_mmap

which allows to understand what callbacks are associated with /dev/fb0.
2019-12-03 18:48:14 +01:00
Dmitry Vyukov
a715d760ae sys/linux: add /dev/fb1
qemu -vga cirrus results in /dev/fb0 and /dev/fb1.
2019-12-03 18:48:14 +01:00
Andrey Konovalov
ae13a849e6
Update external_fuzzing_usb.md 2019-12-03 16:58:43 +01:00
Andrey Konovalov
4b0a22b9af
Update external_fuzzing_usb.md 2019-12-03 16:56:39 +01:00
Andrey Konovalov
6d75685110
Update external_fuzzing_usb.md 2019-12-03 16:55:08 +01:00
Andrey Konovalov
24aea37041
Update external_fuzzing_usb.md 2019-12-03 16:54:21 +01:00
Andrey Konovalov
afd6f7f538
Update external_fuzzing_usb.md 2019-12-03 16:46:00 +01:00
Dmitry Vyukov
ab342da3f9 sys/linux: add binderfs descriptions 2019-12-02 18:21:43 +01:00
Dmitry Vyukov
dc01aea003 sys/linux: add /dev/fb descriptions
Framebuffer descriptions + open more tty dev nodes.
2019-12-02 18:17:04 +01:00
Dmitry Vyukov
b5e3232432 dashboard/config: enable more configs
Enable some input configs that may be reachable in qemu.
+NVMEM: reachable in qemu
+BINDERFS
2019-12-02 17:58:15 +01:00
Dmitry Vyukov
82d81ba98e sys/linux: regenerate consts
Regenerate consts now that make extract is fixed.
Interestingly some arm consts have changed (arm/i386 abi difference?).
2019-12-02 14:44:04 +01:00
Dmitry Vyukov
3aa380090f sys/syz-extract: extract constants from ELF
Add a second mode that extracts constant values from
ELF object, instead of running the executable.
This allows to not (1) link binaries, (2) use proper cross-compiler.
It finally fixes 386/arm extracts for my distro.
Hopefully not makes things worse for others,
should generally be safer/more reliable.
The current mode is left b/c I can't test all OSes,
windows binaries are not ELF, so we may need it anyway.
But later we may switch more OSes to this new mode
if they break (fuchsia?).
2019-12-02 14:36:47 +01:00
Dmitry Vyukov
f879db37f9 sys/linux: more device refinements
Add some mode /dev/nodes*
Add anoter midi device.
2019-12-01 19:51:52 +01:00
Dmitry Vyukov
5d12311f3a sys/linux: add /dev/ptp descriptions 2019-12-01 19:07:51 +01:00
Dmitry Vyukov
9dfc7e00d5 sys/linux: refine some device types
/dev/pmem0 is a block device.
/dev/adsp1 is the same as /dev/dsp1.
dmmidi,admmidi,amidi is the same as /dev/snd/midi.
2019-12-01 18:29:00 +01:00
Dmitry Vyukov
27d609bf84 sys/linux: add /dev/snd/pcm* descriptions 2019-12-01 17:47:28 +01:00
Dmitry Vyukov
c35a341c32 sys/linux: add /dev/dsp descriptions 2019-12-01 11:08:13 +01:00
Dmitry Vyukov
3504484430 sys/linux: update consts
Regenerate const files for all arches.
2019-12-01 11:03:27 +01:00
Dmitry Vyukov
edcd9e3c9a sys/syz-extract: use clang if gcc is broken
On my Debian gcc -m32 is hopelessly broken.
Using clang fixes at least arch 386.
Arch arm is still broken b/c clang does not like
some of kernel arm inline assemly constraints.
2019-12-01 10:59:54 +01:00
Dmitry Vyukov
a76bf83ffa sys/linux: fix /dev/watch_queue name
It's /dev/watch_queue not /dev/fd_watch_queue.
Don't know if it was renamed, or alwys wrong, but does not matter much,
now it's /dev/watch_queue.

Also attach v4l ioctls to /dev/swradio,radio,vbi,cec.
It seems that _some_ of them are applicable to these devices as well.
2019-11-30 19:17:15 +01:00
Dmitry Vyukov
3a75be00f5 sys/linux: add open of /dev/dri/renderD128
It's created by qemu but is not matched by the existing /dev/dri/renderD# pattern.
2019-11-29 15:03:37 +01:00
Dmitry Vyukov
6e4aeffeda dashboard/config: enable CIFS and OCFS2_FS
We have some descriptions for them and enabled in debian.
2019-11-29 15:02:42 +01:00
Dmitry Vyukov
ad6aec4193 sys/linux: fix NFC_SOCKPROTO_RAW socket call
It requires SOCK_SEQPACKET not SOCK_STREAM.
2019-11-29 14:47:56 +01:00
Andrey Konovalov
659d8b8568 pkg/report: improve report titles 2019-11-29 13:13:04 +01:00
Paul Chaignon
d29b9e8409 .gitattributes: hide generated files
Hide the generated files by default in pull requests.

Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-11-29 11:27:09 +01:00
Dmitry Vyukov
4f7e1d0f5e sys/linux: use openat for /dev/cdrom
No need to use syz_open_dev here, openat will do.
Also add /dev/cdrom1 b/c qemu -machine q35 creates cdrom1 instead of cdrom.
2019-11-29 10:46:50 +01:00
Dmitry Vyukov
6239d724ad dashboard/config: update linux/kasan config
1. Update to latest linux-next (next-20191129).
2. Enable NVMEM/PMEM.
3. Enable new crypto algs.
4. Enable VMAP stacks (yay!).
2019-11-29 10:46:26 +01:00
Dmitry Vyukov
289a143089 syz-hub: cap total number of programs sent to a manager
If we have way too many programs to send (more than 100000),
cap total number to 100000 and give up sending all.
Otherwise new managers will never chew all this on a busy hub.
2019-11-29 10:46:26 +01:00
Dmitry Vyukov
aac51b70cd sys/linux: use known tags for 9p virtio/xen
Name virtio/xen sources "syz" so that it's possible to expose
it from host and actually use.
2019-11-29 10:46:26 +01:00
Dmitry Vyukov
736169d38b pkg/report: add few more UBSAN reports
Update #1523
2019-11-29 10:45:55 +01:00
Paul Chaignon
7a53a9d93f sys/linux: update BPF constants
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
2019-11-29 10:45:42 +01:00
Dmitry Vyukov
76357d6f89 pkg/report: update UBSAN report parsing
Update #1523
2019-11-28 14:07:19 +01:00
Dmitry Vyukov
46869e3ee2 pkg/csource: detect common mistakes in the common executor header 2019-11-28 10:30:27 +01:00
Jiri Pirko
97264cb1f3 executor: Add debug message in case devlink namespace move fails
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-28 10:10:57 +01:00
Jiri Pirko
e8c04ab052 executor: Fix value of DEVLINK_ATTR_NETNS_FD
During kernel -net and -next-next trees merge, the value got moved.
Fix it.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-11-28 10:10:57 +01:00