From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967486AbcA1LTS (ORCPT ); Thu, 28 Jan 2016 06:19:18 -0500 Received: from verein.lst.de ([213.95.11.211]:45876 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966106AbcA1LTN (ORCPT ); Thu, 28 Jan 2016 06:19:13 -0500 Date: Thu, 28 Jan 2016 12:19:10 +0100 From: Torsten Duwe To: Michael Ellerman Cc: Balbir Singh , Steven Rostedt , Jiri Kosina , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: [PATCH v6 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2) Message-ID: <20160128111910.GD32095@lst.de> References: <20160125170459.14DB7692CE@newverein.lst.de> <20160127215112.080eec56@cotter.ozlabs.ibm.com> <20160127121904.GB32095@lst.de> <20160128134157.1ac3d344@cotter.ozlabs.ibm.com> <1453951918.4108.1.camel@ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453951918.4108.1.camel@ellerman.id.au> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2016 at 02:31:58PM +1100, Michael Ellerman wrote: > > Looking at GCC history it looks like the fix is in 4.9.0 and anything later. Good. But 4.8.5 has a buggy -mprofile-kernel, and there will be no 4.8.6, Bad. > But a version check doesn't work with patched distro/vendor toolchains. So we > probably need some sort of runtime check. Agreed. /bin/echo -e '#include \nnotrace int func() { return 0; }' | gcc -D__KERNEL__ -Iinclude -p -mprofile-kernel -x c -O2 - -S -o - | grep mcount should be empty. If it yields "bl _mcount" your compiler is buggy. I haven't looked at the kernel's "autoconf" yet, but it's probably capable of testing this. Torsten