From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751534AbbE1GJ7 (ORCPT ); Thu, 28 May 2015 02:09:59 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:45104 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbbE1GJu (ORCPT ); Thu, 28 May 2015 02:09:50 -0400 Message-ID: <5566B0EA.1020007@huawei.com> Date: Thu, 28 May 2015 14:08:42 +0800 From: Li Bin User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Jiri Kosina , AKASHI Takahiro CC: , , , , , , , , , , , , Subject: Re: [RFC 0/4] arm64: add livepatch support References: <1429843449-7388-1-git-send-email-takahiro.akashi@linaro.org> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.181] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.5566B0F0.00CB,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 041f2d22e4fbe7ab3cb71786162dd18a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/4/24 17:27, Jiri Kosina wrote: > On Fri, 24 Apr 2015, AKASHI Takahiro wrote: > >> This patchset enables livepatch support on arm64. >> >> Livepatch was merged in v4.0, and allows replacying a function dynamically >> based on ftrace framework, but it also requires -mfentry option of gcc. >> Currently arm64 gcc doesn't support it, but by adding a helper function to >> ftrace, we will be able to support livepatch on arch's which don't support >> this option. >> >> I submit this patchset as RFC since I'm not quite sure that I'm doing >> in the right way, or we should definitely support -fentry instead. > > I don't have arm64 cross-compiler handy, could you please copy/paste how > does function prologue, generated by gcc -pg on arm64 look like? > The function prologue on arm64 with gcc -pg look like as following: func: stp x29, x30, [sp, -48]! add x29, sp, 0 mov x1, x30 str w0, [x29,28] mov x0, x1 bl _mcount ... Thanks, Li Bin > Thanks, >