From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A936F1395E2 for ; Fri, 11 Nov 2016 23:03:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EF16C21C07C; Fri, 11 Nov 2016 23:03:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BD00621C07C for ; Fri, 11 Nov 2016 23:03:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2263F34169A for ; Fri, 11 Nov 2016 23:03:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 75E9C967 for ; Fri, 11 Nov 2016 23:03:39 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1478905400.46ee4b72fa83b9652bf4ac5a92914f7a558b4cab.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/honggfuzz/, app-forensics/honggfuzz/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-forensics/honggfuzz/files/honggfuzz-0.8-bts-perms.patch app-forensics/honggfuzz/honggfuzz-0.8-r1.ebuild X-VCS-Directories: app-forensics/honggfuzz/files/ app-forensics/honggfuzz/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 46ee4b72fa83b9652bf4ac5a92914f7a558b4cab X-VCS-Branch: master Date: Fri, 11 Nov 2016 23:03:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 776d7799-edf8-40f6-b89f-2c4ad6aaf9f3 X-Archives-Hash: 38115f1588a8e9d14285badf8dc2c8f7 commit: 46ee4b72fa83b9652bf4ac5a92914f7a558b4cab Author: Sergei Trofimovich gentoo org> AuthorDate: Fri Nov 11 23:02:48 2016 +0000 Commit: Sergei Trofimovich gentoo 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 +}