Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7418925imu; Tue, 22 Jan 2019 05:51:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN7iuDLYky2ohwXCc7mnQwji+B4+ljjzmpmeuiwfTYgXkDk3MS74pbpP8D1sEBqcfeh3o4xq X-Received: by 2002:a63:fa06:: with SMTP id y6mr32174039pgh.177.1548165101679; Tue, 22 Jan 2019 05:51:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548165101; cv=none; d=google.com; s=arc-20160816; b=tnBzln6Flo9/pPKRAkiODTOY0FbRkS2llZlko8ENVBXxq4QJ6wDlYYLZnBqlEFw/Ol uXMDxeOCO3LrwJ/ClGqMbDPvBC3zpAf0WuMoX8y/4Khw2phk+cnEVzThwgvv41VJMc9S zJfjkKDLxHyhUYJMPhS9pl+902iL1VZ5C0Xk6ski7YObr7F0frgefF9T8NQ0AqbECgho oBIerD/f4ZozOT+7kQrxzCsiB6DIwBSZl1sP5yVKaHEivWH3XZchioIB1n5vnkHJGx/U n8++r1XnnzeF7XP5U2JXvQAlMuiIUTGey6m4iEJEN2VZdiZVVtBIOXQq1bSwzglTm3AS ILqA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=8JVuZnLcxSsFY4/BqbAfilHhciie4q/cxb/mkmzcabs=; b=iXj7sLsu+H0Lbxfa3uc/zz4YKLZhil6D0XBzxdrCEofpTvL0BK85izqdJcgeXpk8ID By9IxcdDLrROSs2K9a5PFBnb4baYIT9Ha1YCTh9MuAvVGK1KTfdNYsTjvHxyo9Dfse70 ytHvWRy0Fl/ZtvJUYudG1MUpj1kEWqk+Cr/vUSj2mEWRcrNhbnaKVHfdtf8UT7dmcNi/ EvWZ+wcUlvqEzo34pqrAhfTln1JF4/qU9ao90mAd2K6BbFslic7GBlAqh40L8UIoadxu zeYE5vrYmigtSFX+iZdGQNjLvnUtuLypyM0+SYDRRT/f2vQCZlUHSHmdmqHFGD1OZySC l0ew== 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 14si13614636pgg.425.2019.01.22.05.51.26; Tue, 22 Jan 2019 05:51:41 -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 S1728605AbfAVNtz (ORCPT + 99 others); Tue, 22 Jan 2019 08:49:55 -0500 Received: from foss.arm.com ([217.140.101.70]:53702 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728305AbfAVNty (ORCPT ); Tue, 22 Jan 2019 08:49:54 -0500 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 73030EBD; Tue, 22 Jan 2019 05:49:54 -0800 (PST) Received: from [10.1.197.45] (e112298-lin.cambridge.arm.com [10.1.197.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1229B3F614; Tue, 22 Jan 2019 05:49:51 -0800 (PST) Subject: Re: [PATCH v7 2/3] arm64: implement ftrace with regs To: Torsten Duwe Cc: Mark Rutland , Will Deacon , Catalin Marinas , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Ard Biesheuvel , Arnd Bergmann , AKASHI Takahiro , Amit Daniel Kachhap , "Singh, Balbir" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org References: <20190118163736.6A99268CEB@newverein.lst.de> <20190118163908.E338E68D93@newverein.lst.de> <20190122132832.GB16778@lst.de> From: Julien Thierry Message-ID: <72a3bb44-60d6-daba-0c9b-099eab2d05e7@arm.com> Date: Tue, 22 Jan 2019 13:49:50 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190122132832.GB16778@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/01/2019 13:28, Torsten Duwe wrote: > On Tue, Jan 22, 2019 at 10:18:17AM +0000, Julien Thierry wrote: >> Hi Torsten, >> >> A few suggestions below. >> >>> +#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS >>> +#define ARCH_SUPPORTS_FTRACE_OPS 1 >>> +#define REC_IP_BRANCH_OFFSET AARCH64_INSN_SIZE >>> +/* All we need is some magic value. Simply use "_mCount:" */ >> >> Nit: Should the casing be "_mcount" ? > > No! The string makes it clear what it's supposed to be and the peculiar > casing makes it unique and leaves no doubt were it came from. So whenever > you see this register value in a crash dump you don't have to wonder about > weird linkage errors, as it surely did not originate from a symtab. > Right, I had missed the point that the value below is actually the binary representation of that string. Things make more sense now, thanks. >>> +#define MCOUNT_ADDR (0x5f6d436f756e743a) >>> +#else >>> +#define REC_IP_BRANCH_OFFSET 0 >>> +#define MCOUNT_ADDR ((unsigned long)_mcount) >>> +#endif >>> + -- Julien Thierry