From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 242BDC432C3 for ; Fri, 15 Nov 2019 07:46:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E674E20740 for ; Fri, 15 Nov 2019 07:46:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GQwhg/BQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E674E20740 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=N95AfFPxwKqPE1f8IpoUhUkVpJ1iJQex+Nq1KqK5xh8=; b=GQwhg/BQxUohiZ ru4Ui0IJBbxIDCK74a12AK2AA8YIijylvlUd99ern2zQQ53+wsx3PsbFu4VdNwJbQl4/LxzcBP6L8 751+YA8M1ngeQOyAEprRckOOjrF9j6JOWJekjJlJpx17TkAwTgj53sKrrflGPFDQWRTqoQf0kL2pB lHiLl0Qlsv+mO+9Mw1f+whA6PZKThnCjqlWtPGF7kCc/LbuL/IBh0pmv3cL28QeClTtx2/ey9gBrV HB3RBsYDGmIF8Xe8gAySnM+7F7pE1uzR/FvDThMk0eU2jsQgdXbROIjDwk/Cp81cUi5fLPcPVYx+X qllJDNfuFJtOZN7EU3EQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVWJ6-00025e-KJ; Fri, 15 Nov 2019 07:46:16 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVWJ3-00024a-S2 for linux-arm-kernel@lists.infradead.org; Fri, 15 Nov 2019 07:46:15 +0000 Received: by verein.lst.de (Postfix, from userid 107) id 352D168CEC; Fri, 15 Nov 2019 08:46:08 +0100 (CET) Received: from blackhole.lan (p5B0D82C7.dip0.t-ipconnect.de [91.13.130.199]) by verein.lst.de (Postfix) with ESMTPSA id E2D4A67329; Fri, 15 Nov 2019 08:45:45 +0100 (CET) Date: Fri, 15 Nov 2019 08:45:38 +0100 From: Torsten Duwe To: Itaru Kitayama Subject: Re: [PATCHv2 7/8] arm64: implement ftrace with regs Message-ID: <20191115084538.1bf2612c@blackhole.lan> In-Reply-To: References: <20191029165832.33606-1-mark.rutland@arm.com> <20191029165832.33606-8-mark.rutland@arm.com> Organization: LST e.V. X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191114_234614_055634_171FA6C2 X-CRM114-Status: GOOD ( 10.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , jthierry@redhat.com, linux-parisc@vger.kernel.org, peterz@infradead.org, catalin.marinas@arm.com, duwe@suse.de, jpoimboe@redhat.com, linux-kernel@vger.kernel.org, rostedt@goodmis.org, James.Bottomley@hansenpartnership.com, takahiro.akashi@linaro.org, will@kernel.org, mingo@redhat.com, james.morse@arm.com, jeyu@kernel.org, amit.kachhap@arm.com, svens@stackframe.org, deller@gmx.de, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 15 Nov 2019 07:05:39 +0900 Itaru Kitayama wrote: > Is this feature avail even when building kernel with Clang? If your compiler can ... [...] > > compiler insert a configurable number of NOPs between the function > > entry point and the usual prologue. This also ensures functions are > > AAPCS compliant (e.g. disabling inter-procedural register > > allocation). > > > > For example, with -fpatchable-function-entry=2, GCC 8.1.0 compiles > > the following: > > > > | unsigned long bar(void); > > | > > | unsigned long foo(void) > > | { > > | return bar() + 1; > > | } > > > > ... to: > > > > | : > > | nop > > | nop > > | stp x29, x30, [sp, #-16]! * insert e.g. 2 NOPs * record all those locations in a section called "patchable_function_entries" * stick to the AAPCS then: yes. So far I only implemented this for gcc. Torsten _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel