Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753272AbcCIK2d (ORCPT ); Wed, 9 Mar 2016 05:28:33 -0500 Received: from ozlabs.org ([103.22.144.67]:48197 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932183AbcCIK2I (ORCPT ); Wed, 9 Mar 2016 05:28:08 -0500 Message-ID: <1457519279.8111.2.camel@ellerman.id.au> Subject: Re: [PATCH][v6][RFC] livepatch/ppc: Enable livepatching on powerpc From: Michael Ellerman To: Torsten Duwe , Petr Mladek Cc: jeyu@redhat.com, jkosina@suse.cz, linux-kernel@vger.kernel.org, rostedt@goodmis.org, kamalesh@linux.vnet.ibm.com, linuxppc-dev@ozlabs.org, live-patching@vger.kernel.org, mbenes@suse.cz Date: Wed, 09 Mar 2016 21:27:59 +1100 In-Reply-To: <20160309100328.GB23039@lst.de> References: <1457506780-19556-1-git-send-email-bsingharora@gmail.com> <20160309091904.GA23039@lst.de> <20160309094423.GH10940@pathway.suse.cz> <20160309100328.GB23039@lst.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1522 Lines: 35 On Wed, 2016-03-09 at 11:03 +0100, Torsten Duwe wrote: > On Wed, Mar 09, 2016 at 10:44:23AM +0100, Petr Mladek wrote: > > find a solution that would work transparently. I mean that adding > > an extra hacks into selected functions in the patch might be quite > > error prone and problems hard to debug. I think that we all want this > > but I wanted to be sure :-) > > Full ACK. Again, the TOC restore needs to go _after_ the replacement function, > and the klp_return_helper works as transparently as possible, so this > was my first choice. Arguments on the stack? I thought we'll deal with them > once we get there (e.g. _really_ need to patch a varargs function or one > with a silly signature). I agree it's unlikely many people will want to patch varargs functions, or functions with stupid numbers of parameters. But at least with the current proposals, we have no way of preventing them from doing so. Which means the first sign they'll get that it doesn't work is when they've applied the patch and their production system goes down. And not even when they insert the patch, only when the patched function is called, possibly some time later. Now perhaps in reality most people are only applying livepatches from their distro, in which case the distro should have tested it. But I don't know for sure. Still I'm happy for the current solution to go in (klp_return_helper creating a minimal frame). I think we can probably come up with a fully robust solution. But not tonight, and not this week :) cheers