From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965529AbcAZMtA (ORCPT ); Tue, 26 Jan 2016 07:49:00 -0500 Received: from mx2.suse.de ([195.135.220.15]:46309 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932671AbcAZMs4 (ORCPT ); Tue, 26 Jan 2016 07:48:56 -0500 Date: Tue, 26 Jan 2016 13:48:53 +0100 From: Petr Mladek To: Miroslav Benes Cc: Torsten Duwe , Steven Rostedt , Michael Ellerman , Jiri Kosina , linuxppc-dev@lists.ozlabs.org, Linux Kernel Mailing List , live-patching@vger.kernel.org Subject: Re: [PATCH v6 8/9] Implement kernel live patching for ppc64le (ABIv2) Message-ID: <20160126124853.GL3305@pathway.suse.cz> References: <20160125170459.14DB7692CE@newverein.lst.de> <20160125170804.A11DB692DD@newverein.lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2016-01-26 11:50:25, Miroslav Benes wrote: > > [ added Petr to CC list ] > > On Mon, 25 Jan 2016, Torsten Duwe wrote: > > > * create the appropriate files+functions > > arch/powerpc/include/asm/livepatch.h > > klp_check_compiler_support, > > klp_arch_set_pc > > arch/powerpc/kernel/livepatch.c with a stub for > > klp_write_module_reloc > > This is architecture-independent work in progress. > > * introduce a fixup in arch/powerpc/kernel/entry_64.S > > for local calls that are becoming global due to live patching. > > And of course do the main KLP thing: return to a maybe different > > address, possibly altered by the live patching ftrace op. > > > > Signed-off-by: Torsten Duwe > > Hi, > > I have a few questions... > > We still need Petr's patch from [1] to make livepatch work, right? Could > you, please, add it to this patch set to make it self-sufficient? > > Second, what is the situation with mcount prologue between gcc < 6 and > gcc-6? Are there only 12 bytes in gcc-6 prologue? If yes, we need to > change Petr's patch to make it more general and to be able to cope with > different prologues. This is unfortunate. Either way, please mention it > somewhere in a changelog. I am going to update the extra patch. There is an idea to detect the offset during build by scrips/recordmcount. This tool looks for the ftrace locations. The offset should always be a constant that depends on the used architecture, compiler, and compiler flags. The tool is called post build. We might need to pass the constant as a symbol added to the binary. The tool already adds some symbols. Best Regards, Petr