| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
|
|
|
| |
FIDL fuzzing hasn't been working for a while, and it's further
bit-rotted as upstream FIDL functionality has continued to evolve.
This commit updates enough FIDL functionality to get a minimal FIDL
test case to work again.
|
| |
|
|
|
| |
pkg/ast now uses full paths since 554f8f39c57d91c1be8724cf4054424c9fb5f151.
Fix syz-extract accordingly.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Allow targets.go use Clang instead of the default Linux compiler by
setting the SYZ_CLANG=1 env var. Doing so changes the compiler to
"clang" and the linker to "ld.ldd", assuming they are in $PATH, and adds
the --target and -ferror-limit CFLAGS.
Target also exports KernelCompiler and KernelLinker fields now, which allows
overriding the compiler and linker in the kernel make invocation.
Signed-off-by: Alexander Potapenko <glider@google.com>
|
| |
|
|
|
|
|
| |
This field will soon be used in Clang builds. Also, we'd better
encapsulate compiler name generation in targets.go
Signed-off-by: Alexander Potapenko <glider@google.com>
|
| |
|
|
|
|
|
|
|
| |
Renamed Target.BrokenCrossCompiler to Target.BrokenCompiler and
Target.CrossCFlags to Target.CFlags
"Everything in Target is about Cross now."
Signed-off-by: Alexander Potapenko <glider@google.com>
|
| |
|
|
| |
This makes the build completely hermetic.
|
| |
|
|
| |
Only warn about unsupported consts when generating consts for all arches.
|
| |
|
|
| |
New message from clang.
|
| |
|
|
|
|
| |
We only run for the current arch, but it's not enough
to clean a build for another arch.
Run mrproper for all non-clean arches.
|
| |
|
|
|
|
|
|
|
|
|
| |
On the current linux-next:
f19bb13a0eaf0034a603e3b54a7c3a50faf6821e (next-20200414)
EXT4_EOFBLOCKS_FL was removed by 4337ecd1fe997d2b2135b4434caaccdb47c10c06
ARM does not support KVM anymore, removed by 541ad0150ca4 ("arm: Remove 32bit KVM host support").
Fixes #1676
|
| |
|
|
|
| |
Clang is the default compiler on amd64 which is the only supported
architecture by syzkaller right now.
|
| |
|
|
| |
This makes syz-extract work again on OpenBSD.
|
| |
|
|
|
|
|
| |
Remove spaces in the beginning of the message.
The message is actually multi-line and the spaces
are added only before the first line, which makes
the subsequent lines inconsistently offsetted.
|
| |
|
|
| |
These are not present in linux-next.
|
| |
|
|
|
|
| |
Don't print every file if extraction is successful.
This makes seeing errors harder as output for each arch takes
more than a single screen.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is not necessary since we build legit object file
for the target binary now. But this breaks mips with:
/linux/arch/mips/include/asm/thread_info.h:53:30: error: register name not specified for ‘__current_thread_info’
register struct thread_info *__current_thread_info __asm__("$28");
So just remove the old hack.
Follow up to #1536
|
| |
|
|
|
| |
Couple of include paths are needed for syz-extract to work for
mips64ler2.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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?).
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Regenerate consts on linux-next next-20191125.
DEVLINK_ATTR_NETNS_* consts were chifted by 1.
__BPF_FUNC_MAX_ID increased as usual.
CRYPTO_ALG_TYPE_BLKCIPHER, CRYPTO_ALG_TYPE_ABLKCIPHER were removed,
replace them with CRYPTO_ALG_TYPE_SKCIPHER.
|
| |
|
|
|
| |
Updates some paths and add zx_eventpair type definition to fix
`make extract` and `make generate`.
|
| |
|
|
| |
fsverity is now upstream, so re-enable extracting its consts.
|
| | |
|
| |
|
|
|
|
| |
Instead of defining the __GLIBC_USE macro on every OS, we are just
defining it based on a parameter. That parameter is set to false for all
OSs except for fuchsia.
|
| |
|
|
|
|
|
|
| |
When I try to run `make extract` for fuchsia, the clang compiler
complains that __GLIBC_USE is undefined.
This CL just defines it to be an always false function-like macro if it
was not defined.
|
| |
|
|
|
|
|
|
|
| |
Consolidating FIDL library build mappings in one place, so that it can
be used from extraction, and script invoking fidlgen. This also makes
code clearer, and provides a more natural path for evolutions / dealing
with oddities.
Minor doc update post fx command changes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
make extract recently broke for powerpc on linux-next with:
include/uapi/linux/byteorder/big_endian.h:6:2: error: #error "Unsupported endianness, check your toolchain"
#error "Unsupported endianness, check your toolchain"
Turns out we always built ppc64le headers as big-endian.
First, kernel was configured as BE.
Then, we used gcc to build an executable program for host
and on x86 gcc does not define __LITTLE_ENDIAN__ so kernel
thought that the toolchain is BE too.
Configure kernel as LE and define __LITTLE_ENDIAN__.
This actually changes values of some consts,
but fortunately just few of them.
|
| |
|
|
| |
This avoids the inclusion of offset.inc files.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Apparently, sysroot/include doesn't exist in the build-zircon path
anymore. I changed the path in sys-extract to make it point to the
exported sdk include path.
I also ran make extract and make generate to add new fidl definitions.
TEST=ran make extract and make generate.
|
| |
|
|
| |
That's insanity compilers shuffle them in all possible combinations.
|
| |
|
|
|
|
|
|
| |
1. Move fsverity descriptions to a separate file which
is not regenerated automatically. It was dropped from linux-next.
2. Fix tlk_device.txt name in syz-extract.
3. Update some socket consts e.g. s/SO_TIMESTAMPING/SO_TIMESTAMPING_OLD/.
4. Regenerate const files on current upstream head.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
syz-extract was removing certain prefixes from syscall names, but this
caused some problems:
- freebsd* prefixes are for compatibility syscalls when the syscall ABI
has changed. For instance, we have both fstat() and
freebsd11_fstat(), and it is desirable to fuzz them both.
- Stripping prefixes may leave us with undefined SYS_ constants. This
resulted in some test failures in pkg/csource, which emitted code
referencing SYS_semctl when it should have been SYS___semctl.
Fix the problem by updating syscall descriptions to match the names
given by the FreeBSD kernel. Add some new descriptions for
compatibility syscalls, fix the mknodat() description (dev_t is now 64
bits wide on FreeBSD), and remove mknod$loop, which appears to be
Linux-specific.
|
| |
|
|
| |
Regenereate consts on latest linux-next.
|
| |
|
|
|
|
|
| |
1. Generate .const files for all arches.
2. Don't extract mptcp consts on android.
3. Remove mptcp includes from vnet.txt.
4. Enable CONFIG_MPTCP in syz-extract (mptcp is not like all other kernel headers).
|
| |
|
| |
https://tools.ietf.org/html/rfc6824
|
| |
|
|
|
| |
CrossCFlags now contains some warning-related flags like -Wall.
Some of these break kernel build, don't add any warning-related flags.
|
| |
|
|
|
|
| |
Kernel modules are in different directories in some cases,
so to include the headers in the module dir or other directories
the includedirs flag is added.
ex: -includedirs path1/include,path2/include
|
| |
|
|
|
|
|
|
|
| |
Trusty is a set of software components supporting
a Trusted Execution Environment (TEE) on mobile devices.
https://source.android.com/security/trusty
Add syscall descriptions and some boilerplate.
|
| |
|
|
|
|
|
|
| |
The latest Linux kernel misses some arch-specific headers on some archs:
asm/a.out.h
asm/prctl.h
asm/mce.h
Support that.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently when we get target consts with target.ConstMap["name"]
during target initialization, we just get 0 for missing consts.
This is error-prone as we can mis-type a const, or a const may
be undefined only on some archs (as we have common unix code
shared between several OSes).
Check that all the consts are actually defined.
The check detects several violations, to fix them:
1. move mremap to linux as it's only defined on linux
2. move S_IFMT to openbsd, as it's only defined and used on openbsd
3. define missing MAP_ANONYMOUS for freebsd and netbsd
4. fix extract for netbsd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
all: add openbsd support
squash of the following commits:
* openbsd: add mandatory bits
* report: add OpenBSD support
* executor: skip building kvm on OpenBSD
* executor: add OpenBSD support
Linking against libutil is necessary due to usage of openpty(3).
* executor: fix typo in fail() message
* fixup! report: add OpenBSD support
* fixup! openbsd: add mandatory bits
* fixup! openbsd: add mandatory bits
* fixup! openbsd: add mandatory bits
* fixup! report: add OpenBSD support
* gometalinter: skip sys/openbsd
|
| | |
|
| |
|
|
|
|
| |
main is too long and complex. Move more logic into helper functions.
Update #538
|
| |
|
|
|
|
|
| |
This just cleans up existing warnings.
vetshadow is not enabled yet because it crashes.
Update #538
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently have native cross-compilation logic duplicated
in Makefile and in sys/targets. Some pieces are missed in one
place, some are in another. Only pkg/csource knows how to check
for -static support.
Move all CC/CFLAGS logic to sys/targets and pull results in Makefile.
This should make Makefile work on distros that have broken x86_64-linux-gnu-gcc,
now we will use just gcc. And this removes the need to define NOSTATIC,
as it's always auto-detected.
This also paves the way for making pkg/csource work on OSes other than Linux.
|
| |
|
|
| |
Introduce TempFile helper and use it in several packages.
|
| |
|
|
|
|
|
| |
Print each constant on separate line.
When compiler prints error messages it prints whole line
containing an error. So currently it prints all constants (thousands).
With this change it prints just the problematic constant.
|