From nobody Sun Feb 8 11:43:21 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09BED1BB680 for ; Thu, 15 Aug 2024 16:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723741076; cv=none; b=kut7+cwYS9TyCk0tuM2Sl6/hZVONnzUzg9h3RsDfMbwOVtF37u6BQtLacmz71s2gzmP45fWYgOVcyZUXJDgNgtjHjMvvd3sa5I8uQfxCt6v/eut2AQZeLdH78T5B5BhQLT9DE1pLgyGobecddOyzH9bKEubbHh4m5ZV3e04us6g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723741076; c=relaxed/simple; bh=hjjExUGKchfhZrxg4MOWggq8zOIerXFFEgT6Ij+pA60=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=Ql9EQc/bSr+Dn/MHcYj+nLgwyGq6yxE4yyc3Iou/5/6xLM3u0OgQ93DrhaH4XKkIXn1zSZJDNzaZCl90RtQODtSS+Cdfd67Adrhi1HyNuKeEkBlmEvJIbVz9erPbsT2R/xSsuyKAFAa1V5Icuyv8b+dfnibrZIYJCGf8XTWIabU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E958C4AF09; Thu, 15 Aug 2024 16:57:55 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1sedng-00000001uL0-0UHU; Thu, 15 Aug 2024 12:58:12 -0400 Message-ID: <20240815165811.972621103@goodmis.org> User-Agent: quilt/0.68 Date: Thu, 15 Aug 2024 12:57:45 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Arnd Bergmann Subject: [for-next][PATCH 1/3] tracing: Fix ifdef of snapshots to not prevent last_boot_info file References: <20240815165744.699054530@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Steven Rostedt The mapping of the ring buffer to memory allocated at boot up will also expose a "last_boot_info" to help tooling to read the raw data from the last boot. As instances that have their ring buffer mapped to fixed memory cannot perform snapshots, they can either have the "snapshot" file or the "last_boot_info" file, but not both. The code that added the "last_boot_info" file failed to notice that the "snapshot" creation was inside a "#ifdef CONFIG_TRACER_SNAPSHOT" and incorrectly placed the creation of the "last_boot_info" file within the ifdef block. Not only does it cause a warning when CONFIG_TRACER_SNAPSHOT is not enabled, it also incorrectly prevents the file from appearing. Link: https://lore.kernel.org/all/20240719102640.718554-1-arnd@kernel.org/ Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Reported-by: Arnd Bergmann Link: https://lore.kernel.org/20240719101312.3d4ac707@rorschach.local.home Fixes: 7a1d1e4b9639 ("tracing/ring-buffer: Add last_boot_info file to boot = instance") Signed-off-by: Steven Rostedt (Google) --- kernel/trace/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index d0af984a5337..8e5a4ca9fd70 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -9828,15 +9828,15 @@ init_tracer_tracefs(struct trace_array *tr, struct = dentry *d_tracer) if (ftrace_create_function_files(tr, d_tracer)) MEM_FAIL(1, "Could not allocate function filter files"); =20 -#ifdef CONFIG_TRACER_SNAPSHOT if (tr->range_addr_start) { trace_create_file("last_boot_info", TRACE_MODE_READ, d_tracer, tr, &last_boot_fops); +#ifdef CONFIG_TRACER_SNAPSHOT } else { trace_create_file("snapshot", TRACE_MODE_WRITE, d_tracer, tr, &snapshot_fops); - } #endif + } =20 trace_create_file("error_log", TRACE_MODE_WRITE, d_tracer, tr, &tracing_err_log_fops); --=20 2.43.0 From nobody Sun Feb 8 11:43:21 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F9351BB697 for ; Thu, 15 Aug 2024 16:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723741076; cv=none; b=qNdKiDacWDO1ZH6dwuxhBz1O9M1VBp+oIG1PL8Bdy0jr8LjH/onleTtqZMTHuVkU0Ikn+gbZqiINqZy0kWUsh4X5WVIWW7oUai6TixB/ashFDjs8WkFQPvQ34Nb67tTIHgPJQOgYvi2JY/H9mhxEXdLzyrCgFK2w0GVAMvwqafY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723741076; c=relaxed/simple; bh=6JCQMt+lgOieYsZiLCsf2KFHCxW1t5SuiWyQPYDXbrg=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=eZnA+CuD+eKMG9BRbvchuXrv51VYeu6od9hX1O3JlirltFHjyfvfJsmMngydwmtT3QB0jzmztxVT8BVCUfuK7GlxqsMGOjOL+ar7QqZBJcBp9Xk2ITAOnsKpDrloZTOwTUs/llRcaDsLxZPd2qOMIImu/Q/GYt+9po/fb2OqDbs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAC6CC4AF10; Thu, 15 Aug 2024 16:57:55 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1sedng-00000001uLU-1AOo; Thu, 15 Aug 2024 12:58:12 -0400 Message-ID: <20240815165812.138795645@goodmis.org> User-Agent: quilt/0.68 Date: Thu, 15 Aug 2024 12:57:46 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Linus Torvalds , Ross Zwisler , Vincent Donnefort Subject: [for-next][PATCH 2/3] tracing: Allow boot instances to use reserve_mem boot memory References: <20240815165744.699054530@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Steven Rostedt (Google)" Allow boot instances to use memory reserved by the reserve_mem boot option. reserve_mem=3D12M:4096:trace trace_instance=3Dboot_mapped@trace The above will allocate 12 megs with 4096 alignment and label it "trace". The second parameter will create a "boot_mapped" instance and use the memory reserved and labeled as "trace" as the memory for the ring buffer. That will create an instance called "boot_mapped": /sys/kernel/tracing/instances/boot_mapped Note, because the ring buffer is using a defined memory ranged, it will act just like a memory mapped ring buffer. It will not have a snapshot buffer, as it can't swap out the buffer. The snapshot files as well as any tracers that uses a snapshot will not be present in the boot_mapped instance. Also note that reserve_mem is not reliable in acquiring the same physical memory at each soft reboot. It is possible that KALSR could map the kernel at the previous boot memory location forcing the reserve_mem to return a different memory location. In this case, the previous ring buffer will be lost. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Linus Torvalds Cc: Ross Zwisler Cc: Vincent Donnefort Link: https://lore.kernel.org/20240815082811.669f7d8c@gandalf.local.home Signed-off-by: Steven Rostedt (Google) --- .../admin-guide/kernel-parameters.txt | 13 +++++++++++ kernel/trace/trace.c | 23 ++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 35b592823338..388653448e72 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -6752,6 +6752,19 @@ memory at 0x284500000 that is 12Megs. The per CPU buffers of that instance will be split up accordingly. =20 + Alternatively, the memory can be reserved by the reserve_mem option: + + reserve_mem=3D12M:4096:trace trace_instance=3Dboot_map@trace + + This will reserve 12 megabytes at boot up with a 4096 byte alignment + and place the ring buffer in this memory. Note that due to KASLR, the + memory may not be the same location each time, which will not preserve + the buffer content. + + Also note that the layout of the ring buffer data may change between + kernel versions where the validator will fail and reset the ring buffer + if the layout is not the same as the previous kernel. + trace_options=3D[option-list] [FTRACE] Enable or disable tracer options at boot. The option-list is a comma delimited list of options diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 8e5a4ca9fd70..9bcef199ae90 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -10465,22 +10465,20 @@ __init static void enable_instances(void) str =3D boot_instance_info; =20 while ((curr_str =3D strsep(&str, "\t"))) { - unsigned long start =3D 0; - unsigned long size =3D 0; + phys_addr_t start =3D 0; + phys_addr_t size =3D 0; unsigned long addr =3D 0; =20 tok =3D strsep(&curr_str, ","); name =3D strsep(&tok, "@"); - if (tok) { + + if (tok && isdigit(*tok)) { start =3D memparse(tok, &tok); if (!start) { pr_warn("Tracing: Invalid boot instance address for %s\n", name); continue; } - } - - if (start) { if (*tok !=3D ':') { pr_warn("Tracing: No size specified for instance %s\n", name); continue; @@ -10492,10 +10490,19 @@ __init static void enable_instances(void) name); continue; } + } else if (tok) { + if (!reserve_mem_find_by_name(tok, &start, &size)) { + start =3D 0; + pr_warn("Failed to map boot instance %s to %s\n", name, tok); + continue; + } + } + + if (start) { addr =3D map_pages(start, size); if (addr) { - pr_info("Tracing: mapped boot instance %s at physical memory 0x%lx of = size 0x%lx\n", - name, start, size); + pr_info("Tracing: mapped boot instance %s at physical memory %pa of si= ze 0x%lx\n", + name, &start, (unsigned long)size); } else { pr_warn("Tracing: Failed to map boot instance %s\n", name); continue; --=20 2.43.0 From nobody Sun Feb 8 11:43:21 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 299971BB696 for ; Thu, 15 Aug 2024 16:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723741076; cv=none; b=NKm3qJFlxtx2hXTCe6ZtvVDLZ7V3VH/put94pVbGupS0l//1fpi/8QY1jZWBfcTENrCKl9fGVVovddRco3Frdv8IH2Spc6U2YALhnrVeME9hzAAdSKLapGE3DO4Nu7n+lvd7Q1jSqGnK8Zz0/JXNDs6Akgdb5r97t2IzQ71ByKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723741076; c=relaxed/simple; bh=xfWU3XuAqZqyTXefIqyf9DlelEbM06kkB1qL8Z09GD8=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=GVy/xZ91Bb+KpIO5XYcws6gOWNBAQCg9Koe7oryzzWIwWF+lSVsF/ClF34Oz/COORNlLfPAsIYO2TBwb/dRACMias2Y5/UMv1Zm3HSbrO4VBcEoKoseDVj+4ZKGe+9aq6fJKc80gQDuueytiQW4dJcTQUr8B1kz9lGqVBQf29yQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F181FC4AF0D; Thu, 15 Aug 2024 16:57:55 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1sedng-00000001uLy-1qZY; Thu, 15 Aug 2024 12:58:12 -0400 Message-ID: <20240815165812.299370296@goodmis.org> User-Agent: quilt/0.68 Date: Thu, 15 Aug 2024 12:57:47 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Linus Torvalds , Ross Zwisler , Vincent Donnefort Subject: [for-next][PATCH 3/3] tracing/fgraph: Have fgraph handle previous boot function addresses References: <20240815165744.699054530@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Steven Rostedt Update the function graph code to modify the function addresses for a previous boot buffer so that it matches the current kallsyms (note this does not handle module addresses, yet). After a reboot, instead of seeing: # trace-cmd show -B boot_mapped | tail -n30 swapper/0-1 [000] d..2. 56.286470: 0) 0.481 us | = 0xffffffff925da5c4(); swapper/0-1 [000] d.... 56.286471: 0) 4.065 us | = } swapper/0-1 [000] d.... 56.286471: 0) 4.920 us | = } swapper/0-1 [000] d..1. 56.286472: 0) | = 0xffffffff92536254() { swapper/0-1 [000] d..1. 56.286472: 0) + 28.974 us | = 0xffffffff92534e30(); swapper/0-1 [000] d.... 56.286516: 0) + 43.881 us | = } swapper/0-1 [000] d..1. 56.286517: 0) | = 0xffffffff925136c4() { swapper/0-1 [000] d..1. 56.286518: 0) | = 0xffffffff92514a14() { swapper/0-1 [000] d..1. 56.286518: 0) 6.003 us | = 0xffffffff92514200(); swapper/0-1 [000] d.... 56.286529: 0) + 11.510 us | = } swapper/0-1 [000] d.... 56.286529: 0) + 12.895 us | = } swapper/0-1 [000] d.... 56.286530: 0) ! 382.884 us | = } swapper/0-1 [000] d..1. 56.286530: 0) | = 0xffffffff92536444() { swapper/0-1 [000] d..1. 56.286531: 0) | = 0xffffffff92536254() { swapper/0-1 [000] d..1. 56.286531: 0) + 26.335 us | = 0xffffffff92534e30(); swapper/0-1 [000] d.... 56.286560: 0) + 29.511 us | = } swapper/0-1 [000] d.... 56.286561: 0) + 30.452 us | = } swapper/0-1 [000] d..1. 56.286562: 0) | = 0xffffffff9253c014() { swapper/0-1 [000] d..1. 56.286562: 0) | = 0xffffffff9253bed4() { swapper/0-1 [000] d..1. 56.286563: 0) + 13.465 us | = 0xffffffff92536684(); swapper/0-1 [000] d.... 56.286577: 0) + 14.651 us | = } swapper/0-1 [000] d.... 56.286577: 0) + 15.821 us | = } swapper/0-1 [000] d..1. 56.286578: 0) 0.667 us | = 0xffffffff92547074(); swapper/0-1 [000] d..1. 56.286579: 0) 0.453 us | = 0xffffffff924f35c4(); swapper/0-1 [000] d.... 56.286580: 0) # 3906.348 us | = } swapper/0-1 [000] d..1. 56.286581: 0) | = 0xffffffff92531a14() { swapper/0-1 [000] d..1. 56.286581: 0) 0.518 us | = 0xffffffff92505cb4(); swapper/0-1 [000] d..1. 56.286595: 0) | = 0xffffffff92db83c4() { swapper/0-1 [000] d..1. 56.286596: 0) | = 0xffffffff92dec2e4() { swapper/0-1 [000] d..1. 56.286597: 0) | = 0xffffffff92db5304() { It now shows: # trace-cmd show -B boot_mapped | tail -n30 swapper/0-1 [000] d..2. 363.079099: 0) 0.483 us | = preempt_count_sub(); swapper/0-1 [000] d.... 363.079100: 0) 4.112 us | = } swapper/0-1 [000] d.... 363.079101: 0) 4.979 us | = } swapper/0-1 [000] d..1. 363.079101: 0) | = disable_local_APIC() { swapper/0-1 [000] d..1. 363.079102: 0) + 29.153 us | = clear_local_APIC.part.0(); swapper/0-1 [000] d.... 363.079148: 0) + 46.517 us | = } swapper/0-1 [000] d..1. 363.079149: 0) | = mcheck_cpu_clear() { swapper/0-1 [000] d..1. 363.079149: 0) | = mce_intel_feature_clear() { swapper/0-1 [000] d..1. 363.079150: 0) 5.871 us | = lmce_supported(); swapper/0-1 [000] d.... 363.079161: 0) + 11.340 us | = } swapper/0-1 [000] d.... 363.079161: 0) + 12.638 us | = } swapper/0-1 [000] d.... 363.079162: 0) ! 383.518 us | = } swapper/0-1 [000] d..1. 363.079162: 0) | = lapic_shutdown() { swapper/0-1 [000] d..1. 363.079163: 0) | = disable_local_APIC() { swapper/0-1 [000] d..1. 363.079163: 0) + 26.144 us | = clear_local_APIC.part.0(); swapper/0-1 [000] d.... 363.079192: 0) + 29.424 us | = } swapper/0-1 [000] d.... 363.079192: 0) + 30.376 us | = } swapper/0-1 [000] d..1. 363.079193: 0) | = restore_boot_irq_mode() { swapper/0-1 [000] d..1. 363.079194: 0) | = native_restore_boot_irq_mode() { swapper/0-1 [000] d..1. 363.079194: 0) + 13.863 us | = disconnect_bsp_APIC(); swapper/0-1 [000] d.... 363.079209: 0) + 14.933 us | = } swapper/0-1 [000] d.... 363.079209: 0) + 16.009 us | = } swapper/0-1 [000] d..1. 363.079210: 0) 0.694 us | = hpet_disable(); swapper/0-1 [000] d..1. 363.079211: 0) 0.511 us | = iommu_shutdown_noop(); swapper/0-1 [000] d.... 363.079212: 0) # 3980.260 us | = } swapper/0-1 [000] d..1. 363.079212: 0) | = native_machine_emergency_restart() { swapper/0-1 [000] d..1. 363.079213: 0) 0.495 us | = tboot_shutdown(); swapper/0-1 [000] d..1. 363.079230: 0) | = acpi_reboot() { swapper/0-1 [000] d..1. 363.079231: 0) | = acpi_reset() { swapper/0-1 [000] d..1. 363.079232: 0) | = acpi_os_write_port() { Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Linus Torvalds Cc: Ross Zwisler Cc: Vincent Donnefort Link: https://lore.kernel.org/20240813171257.478901820@goodmis.org Signed-off-by: Steven Rostedt (Google) --- kernel/trace/trace_functions_graph.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_func= tions_graph.c index 13d0387ac6a6..a569daaac4c4 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c @@ -544,6 +544,8 @@ print_graph_irq(struct trace_iterator *iter, unsigned l= ong addr, struct trace_seq *s =3D &iter->seq; struct trace_entry *ent =3D iter->ent; =20 + addr +=3D iter->tr->text_delta; + if (addr < (unsigned long)__irqentry_text_start || addr >=3D (unsigned long)__irqentry_text_end) return; @@ -710,6 +712,7 @@ print_graph_entry_leaf(struct trace_iterator *iter, struct ftrace_graph_ret *graph_ret; struct ftrace_graph_ent *call; unsigned long long duration; + unsigned long func; int cpu =3D iter->cpu; int i; =20 @@ -717,6 +720,8 @@ print_graph_entry_leaf(struct trace_iterator *iter, call =3D &entry->graph_ent; duration =3D graph_ret->rettime - graph_ret->calltime; =20 + func =3D call->func + iter->tr->text_delta; + if (data) { struct fgraph_cpu_data *cpu_data; =20 @@ -747,10 +752,10 @@ print_graph_entry_leaf(struct trace_iterator *iter, * enabled. */ if (flags & __TRACE_GRAPH_PRINT_RETVAL) - print_graph_retval(s, graph_ret->retval, true, (void *)call->func, + print_graph_retval(s, graph_ret->retval, true, (void *)func, !!(flags & TRACE_GRAPH_PRINT_RETVAL_HEX)); else - trace_seq_printf(s, "%ps();\n", (void *)call->func); + trace_seq_printf(s, "%ps();\n", (void *)func); =20 print_graph_irq(iter, graph_ret->func, TRACE_GRAPH_RET, cpu, iter->ent->pid, flags); @@ -766,6 +771,7 @@ print_graph_entry_nested(struct trace_iterator *iter, struct ftrace_graph_ent *call =3D &entry->graph_ent; struct fgraph_data *data =3D iter->private; struct trace_array *tr =3D iter->tr; + unsigned long func; int i; =20 if (data) { @@ -788,7 +794,9 @@ print_graph_entry_nested(struct trace_iterator *iter, for (i =3D 0; i < call->depth * TRACE_GRAPH_INDENT; i++) trace_seq_putc(s, ' '); =20 - trace_seq_printf(s, "%ps() {\n", (void *)call->func); + func =3D call->func + iter->tr->text_delta; + + trace_seq_printf(s, "%ps() {\n", (void *)func); =20 if (trace_seq_has_overflowed(s)) return TRACE_TYPE_PARTIAL_LINE; @@ -863,6 +871,8 @@ check_irq_entry(struct trace_iterator *iter, u32 flags, int *depth_irq; struct fgraph_data *data =3D iter->private; =20 + addr +=3D iter->tr->text_delta; + /* * If we are either displaying irqs, or we got called as * a graph event and private data does not exist, @@ -990,11 +1000,14 @@ print_graph_return(struct ftrace_graph_ret *trace, s= truct trace_seq *s, unsigned long long duration =3D trace->rettime - trace->calltime; struct fgraph_data *data =3D iter->private; struct trace_array *tr =3D iter->tr; + unsigned long func; pid_t pid =3D ent->pid; int cpu =3D iter->cpu; int func_match =3D 1; int i; =20 + func =3D trace->func + iter->tr->text_delta; + if (check_irq_return(iter, flags, trace->depth)) return TRACE_TYPE_HANDLED; =20 @@ -1033,7 +1046,7 @@ print_graph_return(struct ftrace_graph_ret *trace, st= ruct trace_seq *s, * function-retval option is enabled. */ if (flags & __TRACE_GRAPH_PRINT_RETVAL) { - print_graph_retval(s, trace->retval, false, (void *)trace->func, + print_graph_retval(s, trace->retval, false, (void *)func, !!(flags & TRACE_GRAPH_PRINT_RETVAL_HEX)); } else { /* @@ -1046,7 +1059,7 @@ print_graph_return(struct ftrace_graph_ret *trace, st= ruct trace_seq *s, if (func_match && !(flags & TRACE_GRAPH_PRINT_TAIL)) trace_seq_puts(s, "}\n"); else - trace_seq_printf(s, "} /* %ps */\n", (void *)trace->func); + trace_seq_printf(s, "} /* %ps */\n", (void *)func); } =20 /* Overrun */ --=20 2.43.0