Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6134509imd; Wed, 31 Oct 2018 07:20:02 -0700 (PDT) X-Google-Smtp-Source: AJdET5cAGvb8Q4AArLTBOoY2hUmtLltOzLZNEQ7mjB2oOhCFkUq1uOPyFcZFA6iqKEveBa0puUHs X-Received: by 2002:a62:1b83:: with SMTP id b125-v6mr3685180pfb.102.1540995602266; Wed, 31 Oct 2018 07:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540995602; cv=none; d=google.com; s=arc-20160816; b=YxDLTYmJStp10xmncs9nxWnWhrX3rZfzd35KgVz0ILUBvQewgZcOikYbraBzAhieOh OiXPde/ASk9QaqqMOMQ14a0nd2cIY73X2pft4c2/12GTg6TpiwexkO3B/HArIEv32CVV SINX1nnAkt5bLXeHpcw3+nLes5Zl6z5cJDnPxSBXnIM27sRHEyFD7KBNu+nVxcsSkvPB XD6q4uiG2M8EsOwrkJZM4Uo92+o1CQ2Vb70DzF/C+JFGyMAF9CjQ6WEWASjdpvZPM1wl 5+uKlDbjufTAd5GMdGfNO72yerm4P3h9VR45d//r5UScDJ16Sd29uAaPJSkcGanlgFQa CGQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jZ7EPReWoXZDPYoeElNylxpKUx99MWz6P23RSVNJFps=; b=Tcdw8fuKL3bCutpKCXFffJYTVDyq2f9XgJkUm8uKQyTycddYWPX084FHzvwfUrdPUJ hqUbYXjk9m3vk2VDB7qVtg+KDKSedbVQ6BBT4wyygMedt/Zb3FsJnWg8VLiqkOwtAGrA iCkq4XDnfFjwOIXz6NXNmLevz4rrOuHzb3o1gpx5bVWhhcsHLl3kHkHHFfL/SDgGcl9/ cYGQSA4xWR0TawQ5+aEuHl35RxXgYF7bujgIHKg+fOgbx+W8lcqx/yivawlrJe3B5OjV 8uP2Ha2YjpfXR2ghA3asfuah2TiA601SWcmAdPXK9iHCwyCbV8aeZC7HxHcfGZVLUwgA LQVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m17-v6si28840185pgj.155.2018.10.31.07.19.46; Wed, 31 Oct 2018 07:20:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729548AbeJaXQi (ORCPT + 99 others); Wed, 31 Oct 2018 19:16:38 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41634 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729463AbeJaXQh (ORCPT ); Wed, 31 Oct 2018 19:16:37 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 597F7341; Wed, 31 Oct 2018 07:18:24 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D26353F71D; Wed, 31 Oct 2018 07:18:21 -0700 (PDT) Date: Wed, 31 Oct 2018 14:18:19 +0000 From: Mark Rutland To: Jiri Kosina Cc: Torsten Duwe , Will Deacon , Catalin Marinas , Julien Thierry , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Ard Biesheuvel , Arnd Bergmann , AKASHI Takahiro , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, kristina.martsenko@arm.com Subject: Re: [PATCH v4 1/3] arm64: implement ftrace with regs Message-ID: <20181031141819.lv2tuj4ne5nf3lh3@lakrids.cambridge.arm.com> References: <20181026142008.D922868C94@newverein.lst.de> <20181026142148.6353A68C94@newverein.lst.de> <20181031121002.hmag2mwvlpzwobvf@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 31, 2018 at 02:19:07PM +0100, Jiri Kosina wrote: > On Wed, 31 Oct 2018, Mark Rutland wrote: > > > I guess skipping the original function prologue would simplify the > > implementation of the replacement function (and would mean that the regs > > held the function arguments per the procedure call standard), but AFAICT > > other architectures aren't relying on that, so it doesn't seem to be a > > strict requirement. > > > > What am I missing? > > > > How does livepatching handle the pre-mcount function preambles on > > architectures with existing support? > > Other architectures do rely on that. That's exactly for example why on x86 > we use '-pg -mfentry', to make sure we hook the function *before* > prologue. Ah, I'd missed -mfentry for x86. I now see that's also the case with __gnu_mcount_nc on arch/arm, so that covers my confusion. Thanks for correcting me, and sorry for noise! Mark.