From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754298AbcBPIXG (ORCPT ); Tue, 16 Feb 2016 03:23:06 -0500 Received: from verein.lst.de ([213.95.11.211]:35916 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbcBPIXF (ORCPT ); Tue, 16 Feb 2016 03:23:05 -0500 Date: Tue, 16 Feb 2016 09:23:02 +0100 From: Torsten Duwe To: Kamalesh Babulal Cc: Petr Mladek , Balbir Singh , Jessica Yu , linux-kernel@vger.kernel.org, Steven Rostedt , Jiri Kosina , live-patching@vger.kernel.org, Miroslav Benes , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v8 8/8] livepatch: Detect offset for the ftrace location during build Message-ID: <20160216082302.GA20522@lst.de> References: <20160210174221.EBBEC692C8@newverein.lst.de> <20160210174517.8347D692C8@newverein.lst.de> <1455293609.16012.9.camel@gmail.com> <20160212164517.GO12548@pathway.suse.cz> <20160216054701.GA20570@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160216054701.GA20570@linux.vnet.ibm.com> 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 Tue, Feb 16, 2016 at 11:17:02AM +0530, Kamalesh Babulal wrote: > * Petr Mladek [2016-02-12 17:45:17]: > > int test(int a) > > { > > + printk("%d\n", a); > > return ++a; > > } > > Thanks. This workaround, helped to load sample livepatch module. N.b.: if you try to livepatch/trace such a leaf function without global dependencies, it will crash if that function got called with a different TOC value. Hence this whole testing. You may alternatively try my gcc patch ;-) Another caveat is functions with stack arguments (>8 args, varargs). My code needs special precautions then because of the return helper. Torsten