Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4183805ybc; Thu, 14 Nov 2019 23:50:18 -0800 (PST) X-Google-Smtp-Source: APXvYqzZ0JHdzRM2lOibqHMGJW9uMrNSKKClIVWfRD6m/X0BI7eNUGQUGK/uUdPdGdhBjlaXjwvM X-Received: by 2002:a17:906:4d93:: with SMTP id s19mr12017615eju.285.1573804218357; Thu, 14 Nov 2019 23:50:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573804218; cv=none; d=google.com; s=arc-20160816; b=wE25vKhlGw7prqhssRF1pHA9H1hjKFQD2+tC45eME8rGZkrO1EOgFW4wIx3GCiuWST JJjB0tjWKFWvQF1Yp1HIi0AiD52x4uSLJ6R9dr5YGAUaDMJnTZMsY8q1iuBSApy/hDDX IV5AUaRkU7+S6ZwfoNJ/nEjNQ6yUfIVN1HpR8CXoK8hzqs/q+6hyyCJCqnHgC7NvNO73 rn0608lOdT57y1nsL3y6ePfYKTsTKVRT2zN9qqsagwuQSzcaJBuYQ/tJWH7gnwpyJku5 +0d/Dr0aT+Ck7ZeidZbuaACiPqdrrXDZETp/iX95X+E4cg+szF7fGL5sMnbEnQVJQMmK a1Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=l0snb5xknfryKv46upogGVqPSQbsyb+zJa2ZdOCIge4=; b=LVtDm91sFdhpPQY6D/IzyqmKoy2zF9m89V5Z/PBVIpVCl1ZO+a1Rs2JU+d/0/1x12o KKYxfmQ35h0KQSLH5tQaYWh/rvrxhX3Z3sfqQ1BvO9oIN3cvY4fHZoEsYsYS+/Ht7M42 6kPS1uXUZow/KmrQlwfTjEYpFKZkEflq2gxqEcP7rCKuM/deZvAyoK+5/jdqdpa7sCsq Z4medkqZQaDPVPD16oeqh2F1mpfU4nDLTHS4SDDQxM/dSQJWtzq3j1TJCT/BQJ7cPqD7 hhcsCCkTMNxZnd/CO6gJ/pojDnZWnt4W7eE7Di7Aps2yo3NZdwgphGN0m2lCxTYEEP9D qOiw== 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 u9si4971399ejk.388.2019.11.14.23.49.52; Thu, 14 Nov 2019 23:50:18 -0800 (PST) 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 S1727418AbfKOHqK (ORCPT + 99 others); Fri, 15 Nov 2019 02:46:10 -0500 Received: from verein.lst.de ([213.95.11.211]:43297 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbfKOHqK (ORCPT ); Fri, 15 Nov 2019 02:46:10 -0500 Received: by verein.lst.de (Postfix, from userid 107) id BAF9F68CFC; Fri, 15 Nov 2019 08:46:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on verein.lst.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_40 autolearn=disabled version=3.3.1 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 Cc: Mark Rutland , James.Bottomley@hansenpartnership.com, amit.kachhap@arm.com, catalin.marinas@arm.com, deller@gmx.de, duwe@suse.de, james.morse@arm.com, jeyu@kernel.org, jpoimboe@redhat.com, jthierry@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, rostedt@goodmis.org, svens@stackframe.org, takahiro.akashi@linaro.org, will@kernel.org 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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