Thread (45 messages) 45 messages, 15 authors, 2025-04-26

Re: [PATCH v4 10/14] s390: Add support for suppressing warning backtraces

From: Heiko Carstens <hca@linux.ibm.com>
Date: 2025-03-24 10:48:17
Also in: dri-devel, linux-arch, linux-arm-kernel, linux-doc, linux-kselftest, linux-riscv, linux-s390, linux-sh, lkml, loongarch

On Fri, Mar 21, 2025 at 10:05:42PM +0100, Alessandro Carminati wrote:
quoted
quoted
+#ifdef CONFIG_KUNIT_SUPPRESS_BACKTRACE
+# define HAVE_BUG_FUNCTION
+# define __BUG_FUNC_PTR      "       .long   %0-.\n"
+# define __BUG_FUNC  __func__
gcc 7.5.0 on s390 barfs; it doesn't like the use of "__func__" with "%0-."
...
GCC makes significant efforts to handle this, and for several
architectures, it manages to solve the problem.
However, this is not universally the case.
Additionally, -fPIC is not widely used in kernel code... I have only
seen it used for VDSO, the x86 boot piggyback decompressor, PowerPC
boot, and the s390x architecture.

That said, GCC has been mitigating this issue, allowing us to treat a
non-compile-time constant as if it were one.
A proof of this is that, at least since GCC 11, the s390x version of
GCC is able to build this code.
Before that... certainly in GCC 7.5 it couldn't.

A simple fix would be to restrict usage to GCC versions greater than
11 for s390.
But please add that dependency only for this new feature for the time
being. Right now I would not like to see that s390 is the only architecture
(besides parisc) which requires a much higher minimum gcc level than every
other architecture. Unless there are specific reasons.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help