Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3851871ima; Mon, 4 Feb 2019 06:18:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IbiXCwZZXPkz3S8ER2wjOk26EQ1V9afrCbHb4nTsDaqKXi9g3Ehf0E4YRxwAMCla6mkxTAe X-Received: by 2002:a63:920a:: with SMTP id o10mr12732122pgd.141.1549289928159; Mon, 04 Feb 2019 06:18:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549289928; cv=none; d=google.com; s=arc-20160816; b=K6QVaIqHeO4FsKFMY4xytwS2Hn4V+MWmj9SnN1Olz1ALC4uaQYzpyUcYlyFDWVkZTT /P5ap682vrlaFVecXK8KcjQJCCCYh+wDla0tPKVRZHw0i5e3/cYa7YRzAB7mNPxV1wsR EM3JXN4u9twS5Tpve1MxIZHYsd5eR714DbgveopbrUkzGgS3Gms6d6lwCQErbd5RRfeL vBRq4csbhmXj/gqAfL/+xDR8bWVQ4B8cXim2usIeGjhiNPL4MN8H0rWZAnC7ya6wkMEp bND5ms6d5ifS3Gl05k+7oK2UBfYT2wNyW5pKKa621BUad6uy9Mvyst8A4ra2fAxsdZar sDLw== 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=ikzFtHFO//dLfyxekSzZpktQspRDKhERpgvFCexMkAc=; b=NYyeu3t/VJ11M9K7PWoDhgcZ+ydQt5MISiTt9V2wit+oLA5C9tnJvJi5uZEZ18EWvm YN4q2uT9jevLrCFOepqvJ7O+yVlz05PJD2cbTfzsUd4INNPeZFM0BT67IROfe7qtAnSw i9xa7fbSK8IQeetq28/PhpSLozXdye1hsG/hx5P3qYvL0X9aHz511J1iNp1GJVPqr4iI l6qhMrDf4zZME40Y3N3BS26XdhCdATVyMqfjSKQZD2iM1X93eCQRsJO+kOHF5jQuAV6D Vm7EJ5ZOPjDIiV5Ga1e5UMU07Lio7sY+4o8WxE+8d6J+Ed35mqu4BN7VNkv5L103VvGe lBgg== 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 c26si154567pgm.210.2019.02.04.06.18.31; Mon, 04 Feb 2019 06:18:48 -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 S1729722AbfBDMDL (ORCPT + 99 others); Mon, 4 Feb 2019 07:03:11 -0500 Received: from verein.lst.de ([213.95.11.211]:48528 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbfBDMDL (ORCPT ); Mon, 4 Feb 2019 07:03:11 -0500 Received: by newverein.lst.de (Postfix, from userid 2005) id 0B62868D93; Mon, 4 Feb 2019 13:03:09 +0100 (CET) Date: Mon, 4 Feb 2019 13:03:09 +0100 From: Torsten Duwe To: Ard Biesheuvel Cc: Julien Thierry , Mark Rutland , Will Deacon , Catalin Marinas , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Arnd Bergmann , AKASHI Takahiro , Amit Daniel Kachhap , "Singh, Balbir" , linux-arm-kernel , Linux Kernel Mailing List , live-patching@vger.kernel.org Subject: Re: [PATCH v7 2/3] arm64: implement ftrace with regs Message-ID: <20190204120308.GA7660@lst.de> References: <20190118163736.6A99268CEB@newverein.lst.de> <20190118163908.E338E68D93@newverein.lst.de> <20190122132832.GB16778@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 22, 2019 at 02:55:12PM +0100, Ard Biesheuvel wrote: > On Tue, 22 Jan 2019 at 14: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. > > > > In that case, do you need to deal with endianness here? > > > > > +#define MCOUNT_ADDR (0x5f6d436f756e743a) Strictly speaking, yes. OTOH "wrong-andian" machines always show a difference when memory is dumped in bigger units than bytes, so when you see the register value in hex... Since all that's needed is a somewhat unique constant, let's not over-engineer this ok? If there are no other comments I'll send out v8 with the discussed changes. Torsten