Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3865090ima; Mon, 4 Feb 2019 06:30:54 -0800 (PST) X-Google-Smtp-Source: AHgI3IZRjuAhEryngNoNaXWOfVk3hVl7SpCI12SDlIYrkrjGMHAYIVNcO11DmfbTd7seT7C0Vxys X-Received: by 2002:a63:451a:: with SMTP id s26mr13375102pga.150.1549290654419; Mon, 04 Feb 2019 06:30:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549290654; cv=none; d=google.com; s=arc-20160816; b=pPE0FE7Y1ScKDqMR5qJCzKRDOJOzXRpCqpbVGNuBz20P3lcze2J+osBiPbPv35Vh6G ktT2/+VhrBR7PT/IMrVpRLwWZlQBVSP/wrV2kv0NlkXuNRRwM1djGwfke/PdPuwkgVBi A3k1biTA9bGcsO8QI+lM38rHEIVD2lNjA3sO0eCbt7NTauS0TVt2/gd2Qdl40B6kVPzl lATQxmyC6pTIdl/Cw/6QO/uxqujgIkKhT8K4JDopFgebXO4N92LcSFiCH067b9eP9Gpb exQ1yFTHkGRqPlizhy0WnAdo2dQ6f3saIHo0utu/ZNJTXNz+Io+qMCkMjcu+11ZjujZ7 6N6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2qRXtdzfk3K1AL17TPQYLnWwn9x5g9yhTRC4UUzz6Hw=; b=gv5KU+I4aZRcVUSN3/1a0eg4DPBdJfbsWmbF4l6wez2FBn+C9vMOc2M4yhc/6nR0Q8 3grcIYVJRqjgtcSXQMI0pKo+K7e9z3A1w1yOxnvJlyDjqLj6MQh3rSTIcoQ1yn8lJpUj QSncZci35lzWQlirNLprrP8hPH+ZY7cqGMtMiJGs33eKbS2YXtXkzx6Bq9HJhsgce1tu ly02Y0+lIJLHw89by/oFhPqlpBCtqfZ+L9Swwa3oS1X8HQd1wA9yw/RHmOzyEUt+nzs4 w8em8p1nY3s2scGt2ElIKdEp0tFh0NUBhIxYPiXZ6/hytl16rgC0ulcL8ySX7jvfqDir iNNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LKiQ71fa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s84si157856pgs.306.2019.02.04.06.30.38; Mon, 04 Feb 2019 06:30:54 -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; dkim=pass header.i=@linaro.org header.s=google header.b=LKiQ71fa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731369AbfBDNny (ORCPT + 99 others); Mon, 4 Feb 2019 08:43:54 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:40727 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726610AbfBDNnx (ORCPT ); Mon, 4 Feb 2019 08:43:53 -0500 Received: by mail-it1-f194.google.com with SMTP id h193so20998436ita.5 for ; Mon, 04 Feb 2019 05:43:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2qRXtdzfk3K1AL17TPQYLnWwn9x5g9yhTRC4UUzz6Hw=; b=LKiQ71fa+zCG+DyzUs+ZElixKEJiNQMb5YX9Q+YkpoGryrsd3gOZDxlNtPEZCKvskm QwsCVHv5lWYiW8W8hQ7Es6NYKe3RbYmi/FltA6qNlWZni3lgrs/V9w+xy/8yJsD5H41U l7u2nx+0pmB1mRYTac/Q72PauSOvuhT1D2BLk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2qRXtdzfk3K1AL17TPQYLnWwn9x5g9yhTRC4UUzz6Hw=; b=g4P2yFxEr2YTmpcLADNLQ8B0NPHfVGhmNZWLyJ7EunSjFDb+vnfUKEcFEyz/XBDrrz V42dTeAWJS3TXJkF5G9vCFvffaDa0/QIuoFFGojQjYsMCm8NwAZl/SRTdN3uepiPEBlx vTUHGSPhUx0A3T8VIow1tNVbRBAGYwppHrtgcW+hjGW3GEywzQQsKwGAOyF3DucvodmF N8mM6GFkdIJ8z0aYiP5lrcoJ0IUfew7xc/aZ9PlICgn1fLQbxa2lC7kerVaVYV1p7Q4e NbQP9SaYD6LmjQakNWogFRKYxDd7Kms0N6pwt3V0Eq54EMS+OxOD0AsKbz4m6lv1cWy9 OQnQ== X-Gm-Message-State: AHQUAuYLd7tZD8GqrO4rqGrZiQjtVvo7B/XmLRNwR0hB3AeY33ZegQc2 fi+UsFfGjawVVNJJp4lRO+4LWazYYMHKH+BqvHfkxg== X-Received: by 2002:a24:710:: with SMTP id f16mr7559281itf.121.1549287832781; Mon, 04 Feb 2019 05:43:52 -0800 (PST) MIME-Version: 1.0 References: <20190118163736.6A99268CEB@newverein.lst.de> <20190118163908.E338E68D93@newverein.lst.de> <20190122132832.GB16778@lst.de> <20190204120308.GA7660@lst.de> In-Reply-To: <20190204120308.GA7660@lst.de> From: Ard Biesheuvel Date: Mon, 4 Feb 2019 14:43:42 +0100 Message-ID: Subject: Re: [PATCH v7 2/3] arm64: implement ftrace with regs To: Torsten Duwe 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Feb 2019 at 13:03, Torsten Duwe wrote: > > 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? > Ah ok, if it is only for visual recognition, then I guess it doesn't matter. > If there are no other comments I'll send out v8 with the discussed changes. > > Torsten >