Commit Graph

1013 Commits

Author SHA1 Message Date
Andrew Donnellan
2233782fc1 pkg/report: Add powerpc's __switch_to to function skip list
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
2019-05-17 07:15:52 +02:00
Dmitry Vyukov
76fc461b55 pkg/compiler: add offsetof type
Similar to C offsetof gives offset of a field
from the beginning of the parent struct.
We have several TODOs in descriptions asking for this.
2019-05-16 18:05:05 +02:00
Dmitry Vyukov
491919b14f pkg/compiler: work around 0-array-size errors due to missing consts
A const can be used as array size. Then if the const is not present
on all arches, compiler will produce an error about 0-sized-array.
There is no easy way to work around this for a user.
Use value of 1 for missing consts. It's just a bit safer.
2019-05-15 13:48:59 +02:00
Dmitry Vyukov
01d1494471 .golangci.yml: add codeanalysis build tag
Using a build tag to exclude files for golangci-lint
reduces memory consumption (it does not parse them).
The naive attempt with skip-dirs did not work.
So add codeanalysis build tag and use it in auto-generated files.

Update #977
2019-05-15 11:39:31 +02:00
Dmitry Vyukov
2376f0f937 pkg/compiler: allow to refer to syscall arguments in len paths
This allows to use len[syscall:arg] expressions.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
9a4969814e pkg/compiler: refactor len target checking
Create named const for "parent" and move some code into a helper function.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
16c881ad85 pkg/compiler: generate complex len targets
Change the generated format for len type to support multiple path elements.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
eea28fee30 pkg/compiler: support complex len targets
This change adds compiler support for complex path
expressions in len targets. E.g. it allows to refer
to a sibling field as len[parent_struct:field:another_field].
See the docs change for details.

This is just a compiler change.
The feature is not yet supported by the prog package.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
1886b2a481 pkg/ast: refactor COLON handling
This prepared for handling of bytesize[parent:foo:bar] expressions
by allowing multiple identifiers after colon.
No functional changes for now, just preparation for storing more
than one identifier after colon.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
69423a1d41 pkg/email: allow commands in subject
Several users attempted this and there does not seem
to be any reason to not allow this.
So parse out command from subject as well.
2019-05-13 14:15:14 +02:00
Greg Steuck
ddba9a616e
pkg/instance: break the line to appease linter (#1173)
* pkg/instance: break the line to appease linter

* fix up format
2019-05-12 23:38:17 -07:00
Dmitry Vyukov
39449875b6 syz-ci: don't assume kernel config is called .config
.config is linux-ism. We have a convention that kernel config
is copied to kernel.config file. Use it.
2019-05-12 11:38:18 +02:00
Dmitry Vyukov
8f24b7d63e syz-ci: always use 10 VMs for bisection
If a manager has less then 10 VMs override it to 10 for bisection.
If a manager has only 1 VM, bisection won't end well.
2019-05-10 11:06:17 +02:00
Dmitry Vyukov
4e7ecf0713 pkg/report: preserve trackback from other CPUs
For some bug types kernel produces traceback of all CPUs
(which is presumably useful for these crashes).
However, we currently throw it away because it has context
different from the oops context.
Detect such traceback and preserve output.
2019-05-10 10:31:07 +02:00
Dmitry Vyukov
e551e0ce0d pkg/report: remove debugging leftover 2019-05-10 10:31:07 +02:00
Dmitry Vyukov
214bf476d3 pkg/report: improve format of "locking bug" reports 2019-05-09 15:04:17 +02:00
Dmitry Vyukov
6fc130d361 pkg/report: add new format of kernel page faults 2019-05-09 14:33:39 +02:00
Andrew Donnellan
98ec0fac71 pkg/host: Add test for kallsymsRenameMap
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
2019-05-08 16:52:55 +02:00
Andrew Donnellan
2697cc88bb pkg/host: Add stat to kallsyms rename map
On powerpc, the "stat" syscall is implemented by "sys_newstat" entry point.
This causes a test failure as we can't find "sys_stat" in kallsyms.

Add "stat" -> "newstat" to the kallsyms rename map to work around this.

Closes: #1083 ("pkg/host: TestSupportedSyscalls fails on ppc64le")
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
2019-05-08 16:52:55 +02:00
Andrey Konovalov
f8f0147ff7 pkg/report: don't mark unknown oopses as corrupted 2019-05-08 16:50:27 +02:00
Dmitry Vyukov
b12c1ab14c dashboard/app: restore printing of email commands
After commit 9ad9ef29ca
we started saying "your command '3' is accepted"
because we use numbers now. Keep string representation
of the command when parsing and use it in reply emails.
2019-05-08 16:29:04 +02:00
Dmitry Vyukov
a7383bfac1 Makefile: enable 386 executor build in presubmit
This hacky way to install 386 packages seems to unbreak executor build.
2019-05-07 18:01:24 +02:00
Dmitry Vyukov
04165d8f66 Makefile: enable arm executor build in presubmit
arm build seems to work now on Travis since we switched to xenial.
2019-05-07 18:01:24 +02:00
Dmitry Vyukov
6a9fb250a6 pkg/report: fix WARNING parsing for powerpc
2 recent commits conflict and cause test 380 to fail:

pkg/report: improve warning titles
pkg/report: Handle powerpc stack traces correctly

Currently 380 is detected as "WARNING in program_check_exception"
rather than the expected "WARNING in assert_slb_presence".
The reason is that we started parsing WARNING stack trace and applying
proper skip patterns to frames.

Adjust WARNING matching and skip common powerpc WARNING frames.
2019-05-07 09:50:41 +02:00
Siddharth M
27544d0fc8 pkg/report: fix other NetBSD corrupted reports
* Fix Superviser mode and lock error

* Fix smaller issues
2019-05-07 09:03:05 +02:00
Andrey Konovalov
024f6c4b7f pkg/report: improve warning titles
This change makes the reporting code account for the skip patterns when
selecting the frame that is used in a title of a generic warning report.
2019-05-07 08:53:52 +02:00
munjinoo
001e36bc78 executor: change syscall argument type to intptr_t
The type size of long depends on compiler.
Therefore, changing to intptr_t makes it depends on architecture.
2019-05-07 08:48:35 +02:00
Andrew Donnellan
04e9d8cedd pkg/report: Handle powerpc stack traces correctly
powerpc stack traces are printed a bit differently from x86 stack traces.
Adjust the regexes accordingly to cope with this format.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
2019-05-07 08:41:33 +02:00
Andrey Konovalov
148296f478 pkg/report: improve titles of 'sleeping function called from invalid context' 2019-05-06 18:39:08 +02:00
Dmitry Vyukov
c73da24c18 pkg/report: add __ia32_sys_ syscall prefix 2019-05-03 12:40:49 +02:00
Andrew Donnellan
90c8f82ae8 pkg/build: Add ppc64le Linux as a supported configuration
Enable the Linux builder for ppc64le.

For ppc64le, we use zImage rather than bzImage as our kernel target. Pass
through the target architecture to buildKernel() so we can pick the right
target based on arch.

Closes: #1084 ("pkg/build: Support building Linux on ppc64le")
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
2019-05-03 10:00:16 +02:00
Andrew Donnellan
0642ca0c5c pkg/build: Call Linux image creation script with target arch argument
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
2019-05-03 10:00:16 +02:00
Andrew Donnellan
bfc19a4b19 tools/create-gce-image.sh: Generate ppc64le pseries disk images
Add support for generating ppc64le pseries disk images. This will create a
disk image with a PowerPC PReP boot partition at the start, and install
the IEEE1275/OpenFirmware version of GRUB.

If we ever support the powernv platform in the future we're going to have
to do something different here.

Add a command line argument to specify architecture, defaulting to amd64.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
2019-05-03 10:00:16 +02:00
Andrey Konovalov
8e54d550ca repro: speedup bisection for flaky crashes
Limit the amount of bisection chunks to 8. Going over this value probably
means that we are bisection a flaky crash, and continuing bisection would
just take a lot of time and likely produce no result.
2019-05-03 08:30:36 +02:00
Andrey Konovalov
1bfa09b967 pkg/report: skip printk and other printing functions 2019-05-03 08:10:28 +02:00
Anton Lindqvist
e9039493d7 executor: unbreak on OpenBSD at runtime
Not using `elif GOOS_freebsd' since it could cause breakage on other *BSDs
due to unused variables.

Regression introduced in commit c7c3f772 (executor: improve setup for packet
handling on *BSD).
2019-05-02 19:21:37 +02:00
Anton Lindqvist
1852eb1814 sys/openbsd: add vmm descriptions (#1152)
Most probably limited to input validation for now. In the future, it
could be extended to provide a bootable kernel during vm create (/bsd)
and turn vmid into a proper resource.

The OpenBSD VMs on GCE does support vmm(4).
2019-05-01 19:30:36 -07:00
Michael Tüxen
c7c3f772ca
executor: improve setup for packet handling on *BSD (#1153)
Improve the handling of packets by:
* setting the local MAC address.
* configuring the local IPv4 address with prefix /24.
* adding an entry in the arp cache for the remote IPv4 address.
* adding an entry in the IPv6 neighbour cache for the remote
  IPv6 address.
2019-05-01 22:45:36 +02:00
Andrey Konovalov
f46aabc8c6 executor: fix another compiler warning 2019-04-25 16:06:29 +02:00
Andrey Konovalov
8e3c52b11d executor: fix compiler warning 2019-04-24 11:00:51 +02:00
Dmitry Vyukov
0766ce61fd pkg/report: fix stalls in RIP frame
Even though we extract an anchor frame which usually higher up the stack,
the anchor frame can be on RIP: line too. Account for that.
2019-04-24 00:02:57 +03:00
Andrey Konovalov
e99d004deb executor: use NONFAILING in common_usb.h
Also move some code to helper functions.
2019-04-23 23:42:31 +03:00
Andrey Konovalov
4d3d6a5007 executor: adjust waiting time for all usb syzcalls
Allow 2000 ms of waiting time for syz_usb_connect and and the same time for
the whole program is this syzkall is present. Allow 200 ms of waiting time
for syz_usb_disconnect. Remove sleep from syz_usb_control_io.
2019-04-23 23:37:02 +03:00
Dmitry Vyukov
deda7c38f9 pkg/report: skip osq_lock on linux
Another new helper for locking.
2019-04-23 19:18:39 +03:00
Andrey Konovalov
18c131578d pkg/email: support quilt patch format
Quilt uses a slightly different patch format to traditional git
diff/format-patch. Support it.
2019-04-23 19:04:22 +03:00
Dmitry Vyukov
8095117313 all: fix some static analysis warnings
Fix warnings produced by golangci-lint.

Update #977
2019-04-23 17:58:54 +03:00
Kristof Provost
2398edeacc sys/freebsd: Add pf ioctl()s
Tweak the building of the FreeBSD vm image to ensure pf is loaded at
startup, so that we can test it.
2019-04-23 15:55:07 +02:00
Marco Vanotti
4d3be36006 pkg/build: update zircon build directory. (#1132)
Recently, fuchsia changed the build directory for zircon, now instead of
build-zircon, we have arch.zircon, where arch is x64 or arm64.
2019-04-22 10:51:48 -07:00
Andrey Konovalov
05dbaf1bf4 report: skip strscpy and read_word_at_a_time frames 2019-04-22 12:02:56 +03:00
Andrey Konovalov
c6165716a5 pkg/report: ignore 'down' frame in the call stack 2019-04-11 18:54:45 +02:00