Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

afl: Fix afl-qemu build by applying new patches #79

Closed
wants to merge 1 commit into from

Conversation

Mindavi
Copy link

@Mindavi Mindavi commented Mar 12, 2020

These patches are gathered from different sources,
see also below.
The other patch is required because some implicitly included
files are not included anymore, requiring an explicit include
of <linux/sockios.h>.
This solves issue #41.

Build errors include: SIOCGSTAMP not declared,
SIOCGSTAMPNS not declared and static declaration of ‘gettid’ follows non-static declaration

See also:

It would be great if someone could verify this (or help me verify it), I'm not using the qemu build.
Main goal is to make sure afl keeps building in the NixOS repositories for anyone that wants to be able to use the QEMU mode.

These patches are gathered from different sources,
see also below.
The other patch is required because some implicitly included
files are not included anymore, requiring an explicit include
of <linux/sockios.h>.
This solves issue google#41.

Build errors include: SIOCGSTAMP not declared,
  SIOCGSTAMPNS not declared and `static declaration of ‘gettid’ follows non-static declaration`

See also:
- qemu/qemu@71ba74f
- qemu/qemu@6d5d5dd
- https://lkml.org/lkml/2019/6/3/988
- https://patchwork.kernel.org/patch/10862231/
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@Mindavi
Copy link
Author

Mindavi commented Mar 12, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@vanhauser-thc
Copy link
Contributor

vanhauser-thc commented Mar 12, 2020 via email

@Mindavi
Copy link
Author

Mindavi commented Mar 13, 2020

You're right. I'll close this.

@Mindavi Mindavi closed this Mar 13, 2020
@Mindavi
Copy link
Author

Mindavi commented Mar 13, 2020

Ultimately, this patch is adding one include file and renaming gettid to sys_gettid. I don't think that should give any issues with ownership.

But we'll see.

@Mindavi Mindavi reopened this Mar 13, 2020
Mindavi added a commit to Mindavi/nixpkgs that referenced this pull request Mar 13, 2020
These patches are gathered from different sources,
such as https://patchwork.kernel.org/patch/10862231/ for the
`gettid` patch.
Another patch comes from the issue in the AFL repository.
The ultimate goal is to get these patches upstream as well,
so we don't keep these general patches only within nixos.

A PR is created against Google/AFL
google/AFL#79,
but it might take a while before it's landed, considering the history
of the project (there are more PRs open).

ZHF: NixOS#80379

Fixes issue NixOS#82232
Mindavi added a commit to Mindavi/nixpkgs that referenced this pull request Mar 13, 2020
These patches are gathered from different sources,
such as https://patchwork.kernel.org/patch/10862231/ for the
`gettid` patch.
Another patch comes from the issue in the AFL repository.
The ultimate goal is to get these patches upstream as well,
so we don't keep these general patches only within nixos.

A PR is created against Google/AFL
google/AFL#79,
but it might take a while before it's landed, considering the history
of the project (there are more PRs open).

ZHF: NixOS#80379

Fixes issue NixOS#82232
Ma27 pushed a commit to NixOS/nixpkgs that referenced this pull request Mar 13, 2020
These patches are gathered from different sources,
such as https://patchwork.kernel.org/patch/10862231/ for the
`gettid` patch.
Another patch comes from the issue in the AFL repository.
The ultimate goal is to get these patches upstream as well,
so we don't keep these general patches only within nixos.

A PR is created against Google/AFL
google/AFL#79,
but it might take a while before it's landed, considering the history
of the project (there are more PRs open).

ZHF: #80379

Fixes issue #82232
alyssais pushed a commit to NixOS/nixpkgs that referenced this pull request Mar 14, 2020
These patches are gathered from different sources,
such as https://patchwork.kernel.org/patch/10862231/ for the
`gettid` patch.
Another patch comes from the issue in the AFL repository.
The ultimate goal is to get these patches upstream as well,
so we don't keep these general patches only within nixos.

A PR is created against Google/AFL
google/AFL#79,
but it might take a while before it's landed, considering the history
of the project (there are more PRs open).

ZHF: #80379

Fixes #82232
@valentinbreiz
Copy link

valentinbreiz commented May 28, 2020

qemu still doesn't build itself with the build_qemu_support.sh script..
I think this patch should be merged in master for all users

EDIT: I have another issue with this patch (user/syscall.c:8166: undefined reference to `stime')

@Mindavi
Copy link
Author

Mindavi commented May 28, 2020

It would be nice indeed. If you're looking for an alternative, you could look at https://github.com/aflplusplus/aflplusplus.

@Mindavi
Copy link
Author

Mindavi commented May 28, 2020

Let's close this, I guess this is not according CLA anyway.

@Mindavi Mindavi closed this May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants