From a124540e50e8414f49e55586e0f8064808c42709 Mon Sep 17 00:00:00 2001 From: Pamplemousse Date: Mon, 8 Feb 2021 14:04:07 -0700 Subject: Use GitHub Actions to build Docker image ... then deploy to hub.docker.com . Signed-off-by: Pamplemousse --- .github/workflows/build_aflplusplus_docker.yaml | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/build_aflplusplus_docker.yaml diff --git a/.github/workflows/build_aflplusplus_docker.yaml b/.github/workflows/build_aflplusplus_docker.yaml new file mode 100644 index 00000000..6d96824d --- /dev/null +++ b/.github/workflows/build_aflplusplus_docker.yaml @@ -0,0 +1,27 @@ +name: Publish Docker Images +on: + push: + branches: [ stable, dev ] + paths: + - Dockerfile + pull_request: + branches: [ stable, dev ] + paths: + - Dockerfile +jobs: + push_to_registry: + name: Push Docker images to Dockerhub + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Login to Dockerhub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Publish afl_for_r2 to Registry + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: teamconclusion/aflplusplus:latest -- cgit 1.4.1 From e11665564b750c1b42e1ab2edf4877d3cb833455 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Tue, 9 Feb 2021 08:30:49 +0100 Subject: fix docker build action --- .github/workflows/build_aflplusplus_docker.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_aflplusplus_docker.yaml b/.github/workflows/build_aflplusplus_docker.yaml index 6d96824d..be8d795d 100644 --- a/.github/workflows/build_aflplusplus_docker.yaml +++ b/.github/workflows/build_aflplusplus_docker.yaml @@ -1,11 +1,11 @@ name: Publish Docker Images on: push: - branches: [ stable, dev ] + branches: [ stable ] paths: - Dockerfile pull_request: - branches: [ stable, dev ] + branches: [ stable ] paths: - Dockerfile jobs: @@ -19,9 +19,9 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Publish afl_for_r2 to Registry + - name: Publish aflpp to Registry uses: docker/build-push-action@v2 with: context: . push: true - tags: teamconclusion/aflplusplus:latest + tags: aflplusplus/aflplusplus:latest -- cgit 1.4.1 From 2cd462477981648b5e22749e66369ff99114a813 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Tue, 9 Feb 2021 08:38:33 +0100 Subject: build docker without march=native --- Dockerfile | 2 ++ GNUmakefile | 16 +++++++--------- README.md | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index dec952af..d2a5ca55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,8 @@ LABEL "about"="AFLplusplus docker image" ARG DEBIAN_FRONTEND=noninteractive +env NO_ARCH_OPT 1 + RUN apt-get update && \ apt-get -y install --no-install-suggests --no-install-recommends \ automake \ diff --git a/GNUmakefile b/GNUmakefile index 7b05a1d5..f586733f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -57,8 +57,6 @@ ifdef MSAN_BUILD override LDFLAGS += -fsanitize=memory endif - - ifeq "$(findstring android, $(shell $(CC) --version 2>/dev/null))" "" ifeq "$(shell echo 'int main() {return 0; }' | $(CC) $(CFLAGS) -Werror -x c - -flto=full -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1" CFLAGS_FLTO ?= -flto=full @@ -77,17 +75,16 @@ ifeq "$(shell echo 'int main() {return 0; }' | $(CC) -fno-move-loop-invariants - SPECIAL_PERFORMANCE += -fno-move-loop-invariants -fdisable-tree-cunrolli endif -ifeq "$(shell echo 'int main() {return 0; }' | $(CC) $(CFLAGS) -Werror -x c - -march=native -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1" - ifndef SOURCE_DATE_EPOCH - HAVE_MARCHNATIVE = 1 - CFLAGS_OPT += -march=native +ifndef SOURCE_DATE_EPOCH + ifndef NO_ARCH_OPT + ifeq "$(shell echo 'int main() {return 0; }' | $(CC) $(CFLAGS) -Werror -x c - -march=native -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1" + HAVE_MARCHNATIVE = 1 + CFLAGS_OPT += -march=native + endif endif endif ifneq "$(shell uname)" "Darwin" - ifeq "$(HAVE_MARCHNATIVE)" "1" - SPECIAL_PERFORMANCE += -march=native - endif # OS X does not like _FORTIFY_SOURCE=2 ifndef DEBUG CFLAGS_OPT += -D_FORTIFY_SOURCE=2 @@ -366,6 +363,7 @@ help: @echo NO_PYTHON - disable python support @echo NO_SPLICING - disables splicing mutation in afl-fuzz, not recommended for normal fuzzing @echo AFL_NO_X86 - if compiling on non-intel/amd platforms + @echo NO_ARCH_OPT - builds afl++ without machine architecutre optimizations @echo "LLVM_CONFIG - if your distro doesn't use the standard name for llvm-config (e.g. Debian)" @echo "==========================================" @echo e.g.: make ASAN_BUILD=1 diff --git a/README.md b/README.md index 348577df..d60253b3 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,7 @@ These build options exist: * NO_PYTHON - disable python support * NO_SPLICING - disables splicing mutation in afl-fuzz, not recommended for normal fuzzing * AFL_NO_X86 - if compiling on non-intel/amd platforms +* NO_ARCH_OPT - builds afl++ without machine architecutre optimizations * LLVM_CONFIG - if your distro doesn't use the standard name for llvm-config (e.g. Debian) e.g.: make ASAN_BUILD=1 -- cgit 1.4.1 From 91f2f057e4eacab4cd3a1a11cde157e3a31470d0 Mon Sep 17 00:00:00 2001 From: Andrea Fioraldi Date: Thu, 11 Feb 2021 21:17:08 +0100 Subject: fix #723 --- qemu_mode/build_qemu_support.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qemu_mode/build_qemu_support.sh b/qemu_mode/build_qemu_support.sh index 608db9e4..e14d238a 100755 --- a/qemu_mode/build_qemu_support.sh +++ b/qemu_mode/build_qemu_support.sh @@ -233,7 +233,6 @@ QEMU_CONF_FLAGS=" \ --disable-xen \ --disable-xen-pci-passthrough \ --disable-xfsctl \ - --enable-pie \ --python=${PYTHONBIN} \ --target-list="${CPU_TARGET}-linux-user" \ --without-default-devices \ @@ -253,6 +252,11 @@ if [ "$STATIC" = "1" ]; then --static \ --extra-cflags=-DAFL_QEMU_STATIC_BUILD=1 \ " + +else + + QEMU_CONF_FLAGS="{$QEMU_CONF_FLAGS} --enable-pie " + fi if [ "$DEBUG" = "1" ]; then -- cgit 1.4.1