[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250204193357.wdlram4qfghccre6@jpoimboe>
Date: Tue, 4 Feb 2025 11:33:57 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Jens Remus <jremus@...ux.ibm.com>
Cc: x86@...nel.org, 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>,
Alexander Gordeev <agordeev@...ux.ibm.com>
Subject: Re: [PATCH v4 26/39] unwind_user/sframe: Enable debugging in uaccess
regions
On Thu, Jan 30, 2025 at 05:38:24PM +0100, Jens Remus wrote:
> Add a similar debug message for SFRame FDE user copy failures?
>
> diff --git a/kernel/unwind/sframe.c b/kernel/unwind/sframe.c
>
> @@ -125,6 +125,7 @@ static __always_inline int __find_fde(struct sframe_section *sec,
> return 0;
>
> Efault:
> + dbg_sec_uaccess("fde usercopy failed\n");
> return -EFAULT;
> }
Indeed.
> Printing the IP is probably not an option due to security concerns?
> Printing the the CFA, FP, and RA offsets is too much traffic? To debug
> issues on s390 I had to add tons of additional debug messages to make
> sense of what was actually going on.
I guess it depends on what you're trying to debug. These messages are
intended to help diagnose problems with the section format. It gets
unloaded if any of these errors are detected, so it helps to try to
communicate why that happened.
So yeah, they're intended to be very low traffic, only used for errors
where an .sframe section is getting unloaded (i.e., all the -EFAULTs).
Corrupt CFA/FP/RA offset values are harder to detect, that could also be
related to some other issue like stack corruption.
--
Josh
Powered by blists - more mailing lists