Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756444AbcLSR2s (ORCPT ); Mon, 19 Dec 2016 12:28:48 -0500 Received: from ud10.udmedia.de ([194.117.254.50]:33782 "EHLO mail.ud10.udmedia.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753932AbcLSR2r (ORCPT ); Mon, 19 Dec 2016 12:28:47 -0500 Date: Mon, 19 Dec 2016 18:28:42 +0100 From: Markus Trippelsdorf To: linux-kernel@vger.kernel.org Cc: Arnaldo Carvalho de Melo , Ingo Molnar Subject: Re: *** buffer overflow detected ***: /usr/src/linux/tools/perf/perf terminated Message-ID: <20161219172842.GB289@x4> References: <20161219161821.GA294@x4> <20161219165243.GA289@x4> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161219165243.GA289@x4> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1581 Lines: 45 On 2016.12.19 at 17:52 +0100, Markus Trippelsdorf wrote: > On 2016.12.19 at 17:18 +0100, Markus Trippelsdorf wrote: > > Running the latest kernel git tree, I get buffer overflow warnings when > > I try to run "perf top": > > > > *** buffer overflow detected ***: /usr/src/linux/tools/perf/perf terminated > > It only happens when I link my kernel with gold. > > (with ld.bfd) > markus@x4 linux % readelf -n vmlinux > > Displaying notes found in: .notes > Owner Data size Description > GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) > Build ID: 74b478c2194c0ba07481acf30f6f8781d4ffcdee > > (with ld.gold) > markus@x4 linux % readelf -n vmlinux > > Displaying notes found in: .note.gnu.build-id > Owner Data size Description > GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) > Build ID: 017ef6e6f8ce3b44332d0baa0767526bb3a77bf8 > > Displaying notes found in: .note.gnu.gold-version > Owner Data size Description > GNU 0x00000009 NT_GNU_GOLD_VERSION (gold version) > Version: gold 1.12 > > And perf than chokes when parsing /sys/kernel/notes. Started with gold commit: commit bfbf34de2f27672282d4fa4c0916cc41890dcc6c Author: Cary Coutant Date: Mon Dec 12 18:51:29 2016 -0800 When using linker scripts, place linker-generated sections by the output section name. I've opened a gold bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20983 -- Markus