All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Torsten Duwe <duwe@lst.de>
Cc: Julien Thierry <julien.thierry@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Ingo Molnar <mingo@redhat.com>, Arnd Bergmann <arnd@arndb.de>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Amit Daniel Kachhap <amit.kachhap@arm.com>,
	"Singh, Balbir" <bsingharora@gmail.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	live-patching@vger.kernel.org
Subject: Re: [PATCH v7 2/3] arm64: implement ftrace with regs
Date: Mon, 4 Feb 2019 14:43:42 +0100	[thread overview]
Message-ID: <CAKv+Gu-3vzo4YJxN=qQ5yRDJnWjCt7L96HkoG3y2AUJk_zX3ag@mail.gmail.com> (raw)
In-Reply-To: <20190204120308.GA7660@lst.de>

On Mon, 4 Feb 2019 at 13:03, Torsten Duwe <duwe@lst.de> wrote:
>
> On Tue, Jan 22, 2019 at 02:55:12PM +0100, Ard Biesheuvel wrote:
> > On Tue, 22 Jan 2019 at 14:28, Torsten Duwe <duwe@lst.de> 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
>

WARNING: multiple messages have this Message-ID (diff)
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Torsten Duwe <duwe@lst.de>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Julien Thierry <julien.thierry@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"Singh, Balbir" <bsingharora@gmail.com>,
	Will Deacon <will.deacon@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Ingo Molnar <mingo@redhat.com>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Amit Daniel Kachhap <amit.kachhap@arm.com>,
	live-patching@vger.kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v7 2/3] arm64: implement ftrace with regs
Date: Mon, 4 Feb 2019 14:43:42 +0100	[thread overview]
Message-ID: <CAKv+Gu-3vzo4YJxN=qQ5yRDJnWjCt7L96HkoG3y2AUJk_zX3ag@mail.gmail.com> (raw)
In-Reply-To: <20190204120308.GA7660@lst.de>

On Mon, 4 Feb 2019 at 13:03, Torsten Duwe <duwe@lst.de> wrote:
>
> On Tue, Jan 22, 2019 at 02:55:12PM +0100, Ard Biesheuvel wrote:
> > On Tue, 22 Jan 2019 at 14:28, Torsten Duwe <duwe@lst.de> 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
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-02-04 13:43 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 16:37 [PATCH v7 0/3] arm64: ftrace with regs Torsten Duwe
2019-01-18 16:37 ` Torsten Duwe
2019-01-18 16:39 ` [PATCH v7 1/3] arm64: replace -pg with CC_FLAGS_FTRACE in Makefiles Torsten Duwe
2019-01-18 16:39   ` Torsten Duwe
2019-01-18 17:24   ` Mark Rutland
2019-01-18 17:24     ` Mark Rutland
2019-01-18 16:39 ` [PATCH v7 2/3] arm64: implement ftrace with regs Torsten Duwe
2019-01-18 16:39   ` Torsten Duwe
2019-01-22  1:39   ` Singh, Balbir
2019-01-22  1:39     ` Singh, Balbir
2019-01-22 13:09     ` Torsten Duwe
2019-01-22 13:09       ` Torsten Duwe
2019-01-23 20:38       ` Singh, Balbir
2019-01-23 20:38         ` Singh, Balbir
2019-01-22 10:18   ` Julien Thierry
2019-01-22 10:18     ` Julien Thierry
2019-01-22 13:28     ` Torsten Duwe
2019-01-22 13:28       ` Torsten Duwe
2019-01-22 13:49       ` Julien Thierry
2019-01-22 13:49         ` Julien Thierry
2019-01-22 13:55       ` Ard Biesheuvel
2019-01-22 13:55         ` Ard Biesheuvel
2019-02-04 12:03         ` Torsten Duwe
2019-02-04 12:03           ` Torsten Duwe
2019-02-04 13:43           ` Ard Biesheuvel [this message]
2019-02-04 13:43             ` Ard Biesheuvel
2019-02-06  8:59   ` Julien Thierry
2019-02-06  8:59     ` Julien Thierry
2019-02-06  9:30     ` Julien Thierry
2019-02-06  9:30       ` Julien Thierry
2019-02-06 14:09     ` Steven Rostedt
2019-02-06 14:09       ` Steven Rostedt
2019-02-06 15:05     ` Torsten Duwe
2019-02-06 15:05       ` Torsten Duwe
2019-02-07 10:33       ` Julien Thierry
2019-02-07 10:33         ` Julien Thierry
2019-02-07 12:51         ` Torsten Duwe
2019-02-07 12:51           ` Torsten Duwe
2019-02-07 13:47           ` Julien Thierry
2019-02-07 13:47             ` Julien Thierry
2019-02-07 14:51         ` Steven Rostedt
2019-02-07 14:51           ` Steven Rostedt
2019-02-07 14:58           ` Julien Thierry
2019-02-07 14:58             ` Julien Thierry
2019-02-07 15:00           ` Torsten Duwe
2019-02-07 15:00             ` Torsten Duwe
2019-04-03  2:48   ` Mark Rutland
2019-04-03  2:48     ` Mark Rutland
2019-04-03 12:30     ` Steven Rostedt
2019-04-03 12:30       ` Steven Rostedt
2019-04-03 13:05     ` Torsten Duwe
2019-04-03 13:05       ` Torsten Duwe
2019-01-18 16:39 ` [PATCH v7 3/3] arm64: use -fpatchable-function-entry if available Torsten Duwe
2019-01-18 16:39   ` Torsten Duwe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKv+Gu-3vzo4YJxN=qQ5yRDJnWjCt7L96HkoG3y2AUJk_zX3ag@mail.gmail.com' \
    --to=ard.biesheuvel@linaro.org \
    --cc=amit.kachhap@arm.com \
    --cc=arnd@arndb.de \
    --cc=bsingharora@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=duwe@lst.de \
    --cc=jpoimboe@redhat.com \
    --cc=julien.thierry@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.