public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/honggfuzz/, app-forensics/honggfuzz/files/
Date: Fri, 11 Nov 2016 23:03:39 +0000 (UTC)	[thread overview]
Message-ID: <1478905400.46ee4b72fa83b9652bf4ac5a92914f7a558b4cab.slyfox@gentoo> (raw)

commit:     46ee4b72fa83b9652bf4ac5a92914f7a558b4cab
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 11 23:02:48 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Nov 11 23:03:20 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46ee4b72

app-forensics/honggfuzz: unbreak --linux_perf_bts_block flag

Workaround --linux_perf_bts_block flag breakage.

Mateusz reports that running honggfuzz fails as:
    [2016-11-11T21:54:27+0000][W][1190] arch_perfOpen():223 mmap(mmapAuxBuf) failed,
    try increasing the kernel.perf_event_mlock_kb sysctl (up to even 300000000): Cannot allocate memory

It seems aux data also needs WRITE permissions.

Reported-by: Mateusz Lenik

Package-Manager: portage-2.3.2

 .../honggfuzz/files/honggfuzz-0.8-bts-perms.patch  | 19 ++++++++++
 app-forensics/honggfuzz/honggfuzz-0.8-r1.ebuild    | 42 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/app-forensics/honggfuzz/files/honggfuzz-0.8-bts-perms.patch b/app-forensics/honggfuzz/files/honggfuzz-0.8-bts-perms.patch
new file mode 100644
index 00000000..e8ac491
--- /dev/null
+++ b/app-forensics/honggfuzz/files/honggfuzz-0.8-bts-perms.patch
@@ -0,0 +1,19 @@
+Workaround --linux_perf_bts_block flag breakage.
+
+Mateusz reports that running honggfuzz fails as:
+    [2016-11-11T21:54:27+0000][W][1190] arch_perfOpen():223 mmap(mmapAuxBuf) failed,
+    try increasing the kernel.perf_event_mlock_kb sysctl (up to even 300000000): Cannot allocate memory
+
+It seems aux data also needs WRITE permissions.
+
+Reported-by: Mateusz Lenik
+diff --git a/linux/perf.c b/linux/perf.c
+index d8ede5f..2f71b3d 100644
+--- a/linux/perf.c
++++ b/linux/perf.c
+@@ -217,3 +217,4 @@ static bool arch_perfOpen(honggfuzz_t * hfuzz, fuzzer_t * fuzzer UNUSED, pid_t p
+     fuzzer->linux.perfMmapAux =
+-        mmap(NULL, pem->aux_size, PROT_READ, MAP_SHARED, *perfFd, pem->aux_offset);
++        mmap(NULL, pem->aux_size, PROT_READ | PROT_WRITE, MAP_SHARED, *perfFd, pem->aux_offset);
++
+     if (fuzzer->linux.perfMmapAux == MAP_FAILED) {

diff --git a/app-forensics/honggfuzz/honggfuzz-0.8-r1.ebuild b/app-forensics/honggfuzz/honggfuzz-0.8-r1.ebuild
new file mode 100644
index 00000000..8c9774c
--- /dev/null
+++ b/app-forensics/honggfuzz/honggfuzz-0.8-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="A general purpose fuzzer with feedback support"
+HOMEPAGE="http://google.github.io/honggfuzz/"
+SRC_URI="https://github.com/google/honggfuzz/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="
+	sys-libs/binutils-libs:=
+	sys-libs/libunwind
+"
+
+DEPEND="${RDEPEND}"
+
+DOCS=(
+	CHANGELOG
+	COPYING
+	CONTRIBUTING
+	README.md
+)
+
+PATCHES=("${FILESDIR}"/${P}-bts-perms.patch)
+
+src_compile() {
+	CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" emake
+}
+
+src_install() {
+	dobin ${PN}
+
+	einstalldocs
+}


             reply	other threads:[~2016-11-11 23:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 23:03 Sergei Trofimovich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-06-30 21:38 [gentoo-commits] repo/gentoo:master commit in: app-forensics/honggfuzz/, app-forensics/honggfuzz/files/ Sergei Trofimovich
2018-02-07 22:03 Sergei Trofimovich
2018-11-23 16:18 Sergei Trofimovich
2019-12-07 17:23 Sergei Trofimovich
2021-11-29 19:33 Marek Szuba
2022-09-19 20:39 Marek Szuba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478905400.46ee4b72fa83b9652bf4ac5a92914f7a558b4cab.slyfox@gentoo \
    --to=slyfox@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox