[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c9ba301e-8451-441d-8212-2913a76ff32d@linux.ibm.com>
Date: Thu, 30 Jan 2025 17:17:33 +0100
From: Jens Remus <jremus@...ux.ibm.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>, x86@...nel.org
Cc: Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
linux-kernel@...r.kernel.org, Indu Bhagat <indu.bhagat@...cle.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org, Mark Brown <broonie@...nel.org>,
linux-toolchains@...r.kernel.org, Jordan Rome <jordalgo@...a.com>,
Sam James <sam@...too.org>, linux-trace-kernel@...r.kernel.org,
Andrii Nakryiko <andrii.nakryiko@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Florian Weimer <fweimer@...hat.com>, Andy Lutomirski <luto@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>, Weinan Liu <wnliu@...gle.com>,
Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>
Subject: Re: [PATCH v4 25/39] unwind_user/sframe: Show file name in debug
output
On 22.01.2025 03:31, Josh Poimboeuf wrote:
> When debugging sframe issues, the error messages aren't all that helpful
> without knowing what file a corresponding .sframe section belongs to.
> Prefix debug output strings with the file name.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
> diff --git a/kernel/unwind/sframe_debug.h b/kernel/unwind/sframe_debug.h
> +static inline void dbg_init(struct sframe_section *sec)
> +{
> + struct mm_struct *mm = current->mm;
> + struct vm_area_struct *vma;
> +
> + guard(mmap_read_lock)(mm);
> + vma = vma_lookup(mm, sec->sframe_start);
> + if (!vma)
> + sec->filename = kstrdup("(vma gone???)", GFP_KERNEL);
> + else if (vma->vm_file)
> + sec->filename = kstrdup_quotable_file(vma->vm_file, GFP_KERNEL);
> + else if (!vma->vm_mm)
This condition does not appear to work for vdso on s390. The following
does:
else if (in_range(sec->sframe_start, current->mm->context.vdso_base, vdso_text_size()))
> + sec->filename = kstrdup("(vdso)", GFP_KERNEL);
> + else
> + sec->filename = kstrdup("(anonymous)", GFP_KERNEL);
> +}
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@...ibm.com
IBM
IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
Powered by blists - more mailing lists