From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934391AbcCKDho (ORCPT ); Thu, 10 Mar 2016 22:37:44 -0500 Received: from mail-pa0-f67.google.com ([209.85.220.67]:36332 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933603AbcCKDhi (ORCPT ); Thu, 10 Mar 2016 22:37:38 -0500 Subject: Re: [PATCH 1/2] ppc64le live patch: clear out storage location(s) in mini stack frame To: Torsten Duwe , Petr Mladek References: <20160309172821.GC27913@lst.de> Cc: jeyu@redhat.com, jkosina@suse.cz, jikos@kernel.org, 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 From: Balbir Singh Message-ID: <56E23D7A.4040903@gmail.com> Date: Fri, 11 Mar 2016 14:37:30 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160309172821.GC27913@lst.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/03/16 04:28, Torsten Duwe wrote: > This can be applied on top of Petr Mladek's v4 rework of the ppc64le > live patching. Inspired by Balbir Singh's v5, information about the > callee's r2 is stored in a "reserved" 32 bit location in the caller's > stack frame, instead of 64 bits in the newly created mini frame 24(r1). > > It only needs to work for a local call, when caller's TOC == callee's > TOC, and along with the return address (LR) it's all within a 4GiB > range (+-31 bits). If the original call already was global, we are > allowed to restore any nonsense into r2, because the global caller > will restore its TOC anyway from the ABI compliant location 24(r1) > right after return. > > Hi, Torsten Sorry, I've had no time to test this. Caught up with something else for the moment. Hopefully I'll get a chance over the weekend. Have you tested this against Petr's sample changes to patch printk? Balbir Singh.