| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Any is the preferred over interface{} now in Go.
|
| |
|
|
|
| |
Add compiler flags to syz-extract to handle wide character constants and suppress implicit function declaration warnings
in kernel headers.
|
| |
|
|
|
|
|
| |
This may be useful for downstream kernels that only build
and are supposed to be used with a subset of arches.
Some esoteric arches may be broken on such kernels.
Allow to ignore them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract info about function scopes formed by switch'es on function arguments.
For example if we have:
void foo(..., int cmd, ...)
{
...
switch (cmd) {
case FOO:
... block 1 ...
case BAR:
... block 2 ...
}
...
}
We record that any data flow within block 1 is only relevant
when foo's arg cmd has value FOO, similarly for block 2 and BAR.
This allows to do 3 things:
1. Locate ioctl commands that are switched on within transitively
called functions.
2. Infer return value for each ioctl command.
3. Infer argument type when it's not specified in _IO macro.
This will also allow to infer other multiplexed syscalls.
Descriptions generated on Linux commit c4b9570cfb63501.
|
| |
|
|
|
|
|
| |
Add few more hacks to support few more cases.
In particular including kvm headers for arm.
It will be harder to avoid all these with auto-generated
descriptions that pull in lots of random headers.
|
| | |
|
| |
|
|
|
| |
This parameter defines the number of cores dedicated to the kernel build
process. By default, it's equal to the number of available CPUs.
|
| |
|
|
| |
Check tool.Failf messages for the common style as well.
|
| | |
|
| |
|
|
| |
Change-Id: Iffb23c0789bb7cff341b68274a8a2efcbdd7598d
|
| |
|
|
| |
backwards compatibility
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
| |
It contributes to #4285 unblocking.
|
| |
|
|
|
|
|
| |
Instead of an array of identifiers, we've been constructing an array of
identifier + ast.Pos.
Reported-by: Damiano Melotti<damianomelotti97@gmail.com>
|
| |
|
|
|
| |
1) Make FabricateSyscallConsts() operate on ConstFile.
2) Expose Pos inside ConstInfo.
|
| |
|
|
|
| |
OGIO_KEYMAP and OPIO_KEYMAP are hidden behind COMPAT_FREEBSD13. Define
it to make these visible.
|
| | |
|
| |
|
|
|
|
|
|
| |
If syz-extract is executed with explicit file list and some of these
files have meta tags that exclude them from processing for an arch,
currently it leads to "const info for input file is missing" error.
Check meta tags even for explicit file list.
|
| |
|
|
|
| |
We may not be able to build an executable for all architectures.
Switch to extracting the needed information from an elf object file.
|
| | |
|
| | |
|
| |
|
|
|
| |
Add this as an option to syz-ci and syz-build tools.
Otherwise we cannot use clang + ld.lld for kernel builds.
|
| |
|
|
|
|
|
|
|
|
| |
The jobs channel needs to have capacity to hold all files from all arches
since they may all be queued to the channel at the same time.
The bug was introduced in 44a5ca633e
("pkg/ast, pkg/compiler: support per-file metadata").
Restore full channel capacity.
Fixes #3197
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a bunch of hacks in syz-extract, syz-sysgen and syz-check
with respect to description files unsupported on some arches,
or that must not be part of make extract.
Add 2 meta attribtues to files:
meta noextract
Tells `make extract` to not extract constants for this file.
Though, `syz-extract` can still be invoked manually on this file.
meta arches["arch1", "arch2"]
Restricts this file only to the given set of architectures.
`make extract` and ``make generate` will not use it on other architectures.
Later we can potentially use meta attributes to specify git tree/commit
that must be used for extraction. Maybe something else.
Fixes #2754
|
| |
|
|
|
|
|
| |
The interface has significantly changed since the first version.
Update to the upstreammed interface.
Fixes #3030
|
| |
|
|
|
|
|
| |
The comment says:
// ION support was removed from kernel.
// We plan to leave the descriptions for some time as is and later remove them.
|
| |
|
|
|
|
|
| |
syz-env make extract fails on upstream commit d1587f7bfe:
/usr/bin/env: 'python3': No such file or directory
make[3]: *** [Makefile:72: bpf/resolve_btfids] Error 2
|
| |
|
|
|
|
| |
Currently fails with:
<stdin>:7:10: fatal error: asm/msr.h: No such file or directory
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Change #2755 disabled KVM for arm64/ppc64, but KVM is supported on these arches
and has extensive support. It's pity to lose that support.
The real root cause of the problem with arm64/ppc64 is that some severe compilation
errors terminated compilation and did not let compiler spew all error messages.
As the result we did not parse all of them and did not disable all of them.
Re-try compilation multiple times instead of just 2 to fix this.
Update #2754
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It is impossible to compile a number of definitions in
include/uapi/linux/kvm.h for other platforms, which leads
to syz-extract failing to update constants.
Skip processing of this file for all arches except i386 and
amd64.
This is a hacky and (hopefully) temporary solution until #2754
is implemented.
|
| |
|
|
| |
Pretty much ripped from freebsd +/- what isn't applicable to darwin.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
* Create the correct machine symlink on non-amd64 architectures
* Remove an unneeded amd64 include directory
* Pass the compiler and C flags from the target to the compiler
|
| |
|
|
|
| |
Update consts on upstream 7a7fd0de4a9804299793e564a555a49c1fc924cb.
Remove termiox ioctls, they were removed in commit e0efb3168d34.
|
| | |
|
| |
|
|
| |
Update consts on upstream 825b5991a46ef28a05a4646c8fe1ae5cef7c7828.
|
| |
|
|
|
|
|
|
|
| |
* sys/linux: add description for mali bifrost driver
* sys/linux: regenerate dev_bifrost.txt.const
* sys/linux/dev_bifrost: separate BASE_*_GROUP_ID_* to individual bits
* sys/linux/dev_bifrost: format code
|
| | |
|
| |
|
|
|
|
|
|
| |
FUTEX_WAIT_MULTIPLE was added before it was merged, and nowadays we have
other plans for futex. Remove all WAIT_MULTIPLE references so futex
fuzzing can be re-enabled.
Signed-off-by: André Almeida <andrealmeid@collabora.com>
|
| | |
|
| |
|
|
|
|
| |
We currently only support native build in pkg/build (does not even pass ARCH).
Move the existing cross-compilation logic from sys/syz-extract/linux.go
and reuse it in both places.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We use strings to identify OS/Arch.
These strings are duplicated throughout the code base massively.
golangci-lint points to possiblity of typos and duplication.
We already had to define these names in pkg/csource
and disable checking for prog package. A future change triggers
such warnings in another package.
Add OS/Arch name consts to sys/targets so that they can be used
to refer to OS/Arch. Use the consts everywhere.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now have 8 arches for Linux and .const files
produce lots of noise in PRs and lots of diffs.
If 3 .txt files are touched, the PR will have 24 .const files,
which will be intermixed with .txt files.
Frequently const values are equal across arches,
and even if they don't spreading a single value
across 8 files is inconvinient.
Merge all 8 *_arch.const files into a single .const file.
See the test for details of the new format.
The old format is still parsed for now,
we can't update all OSes at once.
For Linux this reduces number of const files/lines
from 1288/96599 to 158/11603.
Fixes #1983
|
| | |
|
| |
|
|
|
|
|
| |
The Linux RISC-V port in linux-next doesn't support KVM yet. Ignore it
for now until KVM support is added upstream.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Introduce the new target flag 'LittleEndian' which specifies
of which endianness the target is.
* Introduce the new requires flag 'littleendian' for tests to
selectively enable/disable tests on either little-endian architectures
or big-endian ones.
* Disable KD unit test on s390x architecture because the test
works only on little-endian architecture.
Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
|
| | |
|