Commit Graph

87 Commits

Author SHA1 Message Date
Dmitry Vyukov
68c70116f3 pkg/symbolizer: fix race on inputr in test
Pointed out by race detector.
2017-07-25 10:52:35 +02:00
Andrey Konovalov
c70b8a2cff pkg/report: fix symbolization of old KASAN stack trace format
Which has a tab instead of a space at the beginning of each frame
in alloc and free stack traces.
2017-07-24 20:50:42 +02:00
Andrey Konovalov
0d9ae38d5d pkg/repro: disable Debug flag by default 2017-07-24 14:31:25 +02:00
Andrey Konovalov
e83310d8a2 pkg/csource: make all usleeps random
We can't know the exact values of those sleeps in advance, they can be
different for different bugs. Making them random increases the chance that
the C repro executes with the right timings at some point.
2017-07-24 14:22:54 +02:00
Andrey Konovalov
65a2d5fb58 pkg/repro: try extracting C repro before simplifying options
Sometimes C reproducers don't work after the generic prog options were
simplified. This change makes syzkaller to try extracting a C repro before
simplifying prog options and after each simplification step. This gives
us more chance to generate a C reproducer.
2017-07-24 14:22:54 +02:00
Dmitry Vyukov
240b07788c pkg/hash: allow to hash multiple byte slices
Hash/String now allow to hash mutiple byte slices
without copying them into a single slice first.
2017-07-21 10:06:46 +02:00
Andrey Konovalov
56db83c58a pkg/report: replace lines numbers with LINE in report headers 2017-07-19 17:20:19 +02:00
Dmitry Vyukov
0107e4124d pkg/repro: save final crash log
Logs are useful in situations where we mess the report.
Since we try to report crashes with reproducers,
we need logs for reproducers.
2017-07-18 18:00:03 +02:00
Dmitry Vyukov
7c1ee0634b tools/create-gce-image.sh: ignore SIGINT
If the script is aborted at an unfortunate point, it leaves the whole system broken.
E.g. we've seen that fdisk cannot update partition table until the next reboot.
If you really need to kill it, use a different signal. But better wait.
2017-07-17 14:45:41 +02:00
Dmitry Vyukov
8382eb648f pkg/kernel: actually pass cmdline/sysctl files to the build script 2017-07-17 14:45:41 +02:00
Dmitry Vyukov
cc1c342923 syz-ci: allow to specify cmdline/sysctls
Allow to specify per-kernel command line and sysctl values
to more closely mimic the target kernel.
2017-07-17 12:39:11 +02:00
Dmitry Vyukov
76f45d87f2 syz-manager: save proper report for reproducers
We can start reproducing one crash, but end up reproducing another.
Currently we still attribute the resulting repro to the original crash.
This is wrong.
Save the resulting desc/report for reproducers and use that in manager.
2017-07-06 12:17:39 +02:00
Dmitry Vyukov
f68d78b5a8 pkg/email: fix bug in context extraction
Compare email addresses without full name.
2017-07-05 21:29:41 +02:00
Dmitry Vyukov
6fe1bcf384 pkg/email: add AddAddrContext/RemoveAddrContext
Replace extractBugID function with more general AddAddrContext/RemoveAddrContext.
2017-07-05 19:45:56 +02:00
Dmitry Vyukov
6231964849 pkg/csource: reformat 2017-07-05 19:45:25 +02:00
Andrey Konovalov
d50208f93e pkg/csourse: don't generate __NR_X defines for old syscalls 2017-07-05 15:46:38 +02:00
Andrey Konovalov
918a566afd pkg/repro: return crash report 2017-07-05 15:40:55 +02:00
Dmitry Vyukov
ebabe267cd pkg/email: don't add own email address to CC list
Otherwise we we send each reply to ourselves and receive it again.
2017-07-03 18:24:39 +02:00
Dmitry Vyukov
2181ef35e1 pkg/osutil: don't depend on syscall in appengine build
Dashboard app now depends on osutil through config package.
Reshuffle functions so that the package does not depend
on syscall in appengine build.
2017-07-03 14:43:37 +02:00
Dmitry Vyukov
a7b199253f all: use consistent file permissions
Currently we have unix permissions for new files/dirs
hardcoded throughout the code base. Some places use 0644,
some - 0640, some - 0600 and a variety of other constants.

Introduce osutil.MkdirAll/WriteFile that use the default
permissions and use them throughout the code base.

This makes permissions consistent and also allows to easily
change the permissions later if we change our minds.

Also merge pkg/fileutil into pkg/osutil as they become
dependent on each other. The line between them was poorly
defined anyway as both operate on files.
2017-07-03 14:00:47 +02:00
Dmitry Vyukov
1438a6de81 pkg/report: strip panic message from reports
If panic_on_warn set, then we frequently have 2 stacks:
one for the actual report (or maybe even more than one),
and then one for panic caused by panic_on_warn. This makes
reports unnecessary long and the panic (current) stack
is always present in the actual report. So we strip the
panic message. However, we check that we have enough lines
before the panic, because sometimes we have, for example,
a single WARNING line without a stack and then the panic
with the stack.
2017-07-03 13:18:40 +02:00
Dmitry Vyukov
eb1cda04f3 pkg/email: add function that forms reply to an email 2017-07-02 16:08:04 +02:00
Dmitry Vyukov
233bc790fc pkg/email: add email parsing functionality
Parse extracts all potentially interesting info from an incoming email.
2017-07-02 15:40:24 +02:00
Dmitry Vyukov
1b20342f25 pkg/email: move patch parsing from pkg/kernel
ParsePatch is used by appengine app.
Appengine apps can't depend on syscall/unsafe,
but pkg/kernel currently does.
Move patch parsing to pkg/email which does not
depend on syscall/unsafe.
2017-06-30 16:20:19 +02:00
Dmitry Vyukov
c2028e38d2 pkg/report: change arg of ExtractGuiltyFile to []byte
We usually store reports as []byte, not as string. They can be large.
So change arg type to []byte.
Also rename it from log to report. In our terminology log is
not symblized/processed crash output. What this function wants
is called report in manager.
2017-06-30 15:09:57 +02:00
Dmitry Vyukov
909ccbe28f pkg/config: support time.Time fields 2017-06-30 14:36:34 +02:00
Dmitry Vyukov
c5b6fcddca syz-hub: split client name and manager name
This allows to reduce number of hub clients by grouping managers
and creating one client per such group.
2017-06-29 17:50:44 +02:00
Andrey Konovalov
ae33f0dff5 repro: fix tests (#266) 2017-06-29 16:14:39 +02:00
Andrey Konovalov
e379542e8b repro, manager: show repro logs and stats on manager dashboard 2017-06-27 16:27:21 +02:00
Andrey Konovalov
41d7a8a64b repro: add 1 minute duration 2017-06-27 11:59:12 +02:00
Andrey Konovalov
65542325fb repro: add bisection test 2017-06-27 11:59:12 +02:00
Andrey Konovalov
3349d055d7 repro: bisect the log to find multiple guilty programs 2017-06-27 11:59:11 +02:00
Andrey Konovalov
3ad6daa90a report: add get maintainers function 2017-06-26 21:23:14 +02:00
Dmitry Vyukov
d8daf57eca pkg/csource: regenerate 2017-06-26 15:34:54 +02:00
Andrey Konovalov
dd93f0378a repro: reproExtractProg may fail (#254) 2017-06-26 15:30:54 +02:00
Andrey Konovalov
913a0cfe5a report: add more rcu stall regexps 2017-06-26 14:13:22 +02:00
Dmitry Vyukov
b3ae011196 pkg/osutil: port to darwin 2017-06-26 13:43:20 +02:00
Dmitry Vyukov
8ebb2147d9 pkg/fileutil: port to darwin 2017-06-26 13:42:52 +02:00
Dmitry Vyukov
0b4cf413ea Merge pull request #241 from dvyukov/dvyukov-ci
syz-ci: add continuous integration system
2017-06-22 16:27:37 +02:00
Andrey Konovalov
268bf907e1 Merge pull request #239 from xairy/up-better-repro
Minor reproducing improvements
2017-06-21 19:39:57 +02:00
Dmitry Vyukov
fea266b33f pkg/osutil: add FilesExist/CopyFiles/LinkFiles functions
Will be required by the new build system.
2017-06-20 19:59:47 +02:00
Dmitry Vyukov
e39114dc0c pkg/kernel: move partial config functionality into a separate function
Move partial config functionality into BuildWithPartConfig.
It is used only for syz-gce which will be removed soon.
Provide a better interface for new continuous build system.
2017-06-20 19:59:42 +02:00
Dmitry Vyukov
5cc5b2714e pkg/fileutil: improve CopyFile
Make CopyFile atomic and preserve permissions.
2017-06-20 19:53:13 +02:00
Dmitry Vyukov
99d2454c57 pkg/git: improve Poll
Support changing repo/branch and force pushes.
2017-06-20 19:52:50 +02:00
Dmitry Vyukov
f94617a321 pkg/kernel: reduce Build parallelism
NumCPU*2 can create excessive number of subprocesses
in the case machine is busy with other things as well.
2017-06-19 16:48:46 +02:00
Dmitry Vyukov
9dcb6799c7 pkg/kernel: fix CreateImage
- Move does not work across filesystems (i.e. tmpfs->disk)
- set proper permissions for ssh key
2017-06-19 16:47:42 +02:00
Dmitry Vyukov
4799d21e01 pkg/osutil: fix IsExist
Currently it returns true for "/some/existing/file/foo"
because that returns ENOTDIR.
2017-06-19 16:44:39 +02:00
Dmitry Vyukov
b6e969be7a pkg/osutil: add helper function for SIGINT handling 2017-06-19 16:43:23 +02:00
Dmitry Vyukov
a89409fa44 pkg/log: add Fatal function
Replacement for Fatalf("%v", err).
2017-06-19 16:38:38 +02:00
Dmitry Vyukov
98bf8f451c pkg/git: check origin repo in Poll 2017-06-19 16:37:31 +02:00