From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Josh Poimboeuf <jpoimboe@redhat.com>,
Jiri Kosina <jikos@kernel.org>, Miroslav Benes <mbenes@suse.cz>,
Petr Mladek <pmladek@suse.com>,
Joe Lawrence <joe.lawrence@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
"Naveen N . Rao" <naveen.n.rao@linux.vnet.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"live-patching@vger.kernel.org" <live-patching@vger.kernel.org>
Subject: Re: [PATCH v2 02/13] tracing: Fix selftest config check for function graph start up test
Date: Thu, 24 Feb 2022 13:43:02 +0000 [thread overview]
Message-ID: <74775d33-2e54-96ab-4546-57eb2c9e50e0@csgroup.eu> (raw)
In-Reply-To: <bdc7e594e13b0891c1d61bc8d56c94b1890eaed7.1640017960.git.christophe.leroy@csgroup.eu>
Hi Michael,
Le 20/12/2021 à 17:38, Christophe Leroy a écrit :
> CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS is required to test
> direct tramp.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
You didn't apply this patch when you merged the series. Without it I get
the following :
[ 6.191287] Testing ftrace recursion: PASSED
[ 6.473308] Testing ftrace recursion safe: PASSED
[ 6.755759] Testing ftrace regs: PASSED
[ 7.037994] Testing tracer nop: PASSED
[ 7.042256] Testing tracer function_graph: FAILED!
[ 12.216112] ------------[ cut here ]------------
[ 12.220436] WARNING: CPU: 0 PID: 1 at kernel/trace/trace.c:1953
run_tracer_selftest+0x138/0x1b4
[ 12.229045] CPU: 0 PID: 1 Comm: swapper Not tainted
5.17.0-rc2-s3k-dev-02096-g28b040bd2357 #1030
[ 12.237735] NIP: c00d01b4 LR: c00d01b4 CTR: c03d37fc
[ 12.242724] REGS: c902bd90 TRAP: 0700 Not tainted
(5.17.0-rc2-s3k-dev-02096-g28b040bd2357)
[ 12.251157] MSR: 00029032 <EE,ME,IR,DR,RI> CR: 28000242 XER: 00000000
[ 12.257870]
[ 12.257870] GPR00: c00d01b4 c902be50 c2140000 00000007 c108d224
00000001 c11ed2e8 c108d340
[ 12.257870] GPR08: 3fffbfff 00000000 c129beac 3fffc000 22000244
00000000 c0004b78 00000000
[ 12.257870] GPR16: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 c1039020
[ 12.257870] GPR24: c12d0000 c1000144 c1223c48 c12b53c4 c12b55dc
c1293118 fffffdf4 c1223c38
[ 12.293843] NIP [c00d01b4] run_tracer_selftest+0x138/0x1b4
[ 12.299265] LR [c00d01b4] run_tracer_selftest+0x138/0x1b4
[ 12.304603] Call Trace:
[ 12.307012] [c902be50] [c00d01b4] run_tracer_selftest+0x138/0x1b4
(unreliable)
[ 12.314155] [c902be70] [c100cf44] register_tracer+0x14c/0x218
[ 12.319835] [c902be90] [c10011a0] do_one_initcall+0x8c/0x17c
[ 12.325430] [c902bef0] [c10014c0] kernel_init_freeable+0x1a8/0x254
[ 12.331540] [c902bf20] [c0004ba8] kernel_init+0x30/0x150
[ 12.336789] [c902bf30] [c001222c] ret_from_kernel_thread+0x5c/0x64
[ 12.342902] Instruction dump:
[ 12.345828] 4bf9a135 813d0030 7fc4f378 7d2903a6 7fa3eb78 4e800421
7c7e1b79 939f0f60
[ 12.353657] 41820014 3c60c08a 3863644c 4bf9a109 <0fe00000> 387f00b0
4bff76bd 893d0052
[ 12.361659] ---[ end trace 0000000000000000 ]---
With the patch I get:
[ 6.191286] Testing ftrace recursion: PASSED
[ 6.473307] Testing ftrace recursion safe: PASSED
[ 6.755758] Testing ftrace regs: PASSED
[ 7.037993] Testing tracer nop: PASSED
[ 7.042255] Testing tracer function_graph: PASSED
Is this patch going to be merged via another tree ?
Thanks
Christophe
> ---
> kernel/trace/trace_selftest.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
> index afd937a46496..abcadbe933bb 100644
> --- a/kernel/trace/trace_selftest.c
> +++ b/kernel/trace/trace_selftest.c
> @@ -784,9 +784,7 @@ static struct fgraph_ops fgraph_ops __initdata = {
> .retfunc = &trace_graph_return,
> };
>
> -#if defined(CONFIG_DYNAMIC_FTRACE) && \
> - defined(CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS)
> -#define TEST_DIRECT_TRAMP
> +#ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
> noinline __noclone static void trace_direct_tramp(void) { }
> #endif
>
> @@ -849,7 +847,7 @@ trace_selftest_startup_function_graph(struct tracer *trace,
> goto out;
> }
>
> -#ifdef TEST_DIRECT_TRAMP
> +#ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
> tracing_reset_online_cpus(&tr->array_buffer);
> set_graph_array(tr);
>
next prev parent reply other threads:[~2022-02-24 13:43 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 16:37 [PATCH v2 00/13] Implement livepatch on PPC32 and more Christophe Leroy
2021-12-20 16:38 ` [PATCH v2 01/13] livepatch: Fix build failure on 32 bits processors Christophe Leroy
2021-12-22 13:47 ` Miroslav Benes
2022-01-04 19:35 ` Joe Lawrence
2021-12-20 16:38 ` [PATCH v2 02/13] tracing: Fix selftest config check for function graph start up test Christophe Leroy
2022-02-24 13:43 ` Christophe Leroy [this message]
2022-02-24 14:53 ` Steven Rostedt
2022-02-24 15:13 ` Christophe Leroy
2022-02-24 15:17 ` Steven Rostedt
2022-02-25 2:42 ` Michael Ellerman
2021-12-20 16:38 ` [PATCH v2 03/13] powerpc/module_32: Fix livepatching for RO modules Christophe Leroy
2022-01-04 19:44 ` Joe Lawrence
2021-12-20 16:38 ` [PATCH v2 04/13] powerpc/ftrace: Add support for livepatch to PPC32 Christophe Leroy
2021-12-22 14:00 ` Miroslav Benes
2021-12-20 16:38 ` [PATCH v2 05/13] powerpc/ftrace: Don't save again LR in ftrace_regs_caller() on PPC32 Christophe Leroy
2021-12-20 16:38 ` [PATCH v2 06/13] powerpc/ftrace: Simplify PPC32's return_to_handler() Christophe Leroy
2021-12-20 16:38 ` [PATCH v2 07/13] powerpc/ftrace: Prepare PPC32's ftrace_caller() for CONFIG_DYNAMIC_FTRACE_WITH_ARGS Christophe Leroy
2021-12-20 16:38 ` [PATCH v2 08/13] powerpc/ftrace: Prepare PPC64's " Christophe Leroy
2022-02-14 15:19 ` Naveen N. Rao
2021-12-20 16:38 ` [PATCH v2 09/13] powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS Christophe Leroy
2021-12-22 14:19 ` Miroslav Benes
2022-02-14 15:25 ` Naveen N. Rao
2022-02-15 8:00 ` Christophe Leroy
2022-02-15 11:05 ` Michael Ellerman
2022-02-15 13:36 ` Naveen N. Rao
2022-02-15 14:28 ` Christophe Leroy
2022-02-15 14:51 ` Christophe Leroy
2022-02-15 16:25 ` Naveen N. Rao
2022-02-16 13:04 ` Heiko Carstens
2022-02-16 13:27 ` Sven Schnelle
2022-02-15 14:38 ` Steven Rostedt
2022-02-15 16:26 ` Naveen N. Rao
2021-12-20 16:38 ` [PATCH v2 10/13] powerpc/ftrace: Refactor ftrace_{en/dis}able_ftrace_graph_caller Christophe Leroy
2021-12-20 16:38 ` [PATCH v2 11/13] powerpc/ftrace: directly call of function graph tracer by ftrace caller Christophe Leroy
2022-02-14 17:24 ` Naveen N. Rao
2022-02-14 19:03 ` Steven Rostedt
2021-12-20 16:38 ` [PATCH v2 12/13] powerpc/ftrace: Prepare ftrace_64_mprofile.S for reuse by PPC32 Christophe Leroy
2022-02-14 17:51 ` Naveen N. Rao
2022-02-15 8:33 ` Christophe Leroy
2021-12-20 16:38 ` [PATCH v2 13/13] powerpc/ftrace: Remove ftrace_32.S Christophe Leroy
2022-02-16 12:26 ` [PATCH v2 00/13] Implement livepatch on PPC32 and more Michael Ellerman
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=74775d33-2e54-96ab-4546-57eb2c9e50e0@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).