From: Nathan Chancellor <nathan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
stable@vger.kernel.org, patches@lists.linux.dev,
linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, linux@roeck-us.net, shuah@kernel.org,
patches@kernelci.org, lkft-triage@lists.linaro.org,
pavel@denx.de, jonathanh@nvidia.com, f.fainelli@gmail.com,
sudipm.mukherjee@gmail.com, srw@sladewatkins.net, rwarsow@gmx.de,
conor@kernel.org, hargar@microsoft.com, broonie@kernel.org,
clang-built-linux <llvm@lists.linux.dev>,
Anders Roxell <anders.roxell@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Dan Carpenter <dan.carpenter@linaro.org>,
linux-s390@vger.kernel.org, linux-mips@vger.kernel.org,
io-uring@vger.kernel.org, virtualization@lists.linux.dev
Subject: Re: [PATCH 6.1 000/167] 6.1.136-rc1 review
Date: Wed, 30 Apr 2025 16:32:14 -0700 [thread overview]
Message-ID: <20250430233214.GC3715926@ax162> (raw)
In-Reply-To: <2025043049-banked-doorpost-5e06@gregkh>
On Wed, Apr 30, 2025 at 12:58:13PM +0200, Greg Kroah-Hartman wrote:
> On Wed, Apr 30, 2025 at 04:09:18PM +0530, Naresh Kamboju wrote:
> > Regressions on x86_64 with defconfig builds with clang-nightly toolchain
> > on the stable-rc 6.1.136-rc1.
clang-nightly is always a moving target so for the sake of the stable
-rc reports, I would only focus on issues that appear with just those
patches, as you should see this issue on 6.1.136.
> > * x86_64, build
> > - clang-nightly-lkftconfig
> > - clang-nightly-x86_64_defconfig
> >
> > Regression Analysis:
> > - New regression? Yes
> > - Reproducibility? Yes
> >
> > Build regression: x86_64 clang-nightly net ip.h error default
> > initialization of an object of type 'typeof (rt->dst.expires)'
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> >
> > ## Build error x86_64
> > include/net/ip.h:462:14: error: default initialization of an object of
> > type 'typeof (rt->dst.expires)' (aka 'const unsigned long') leaves the
> > object uninitialized and is incompatible with C++
> > [-Werror,-Wdefault-const-init-unsafe]
> > 462 | if (mtu && time_before(jiffies, rt->dst.expires))
> > | ^
>
> This isn't c++, so are you sure this isn't just a clang bug?
Yes, it is intentional that this warns for C code, the clang maintainer
felt that the default initialization behavior of const variables not
marked as static or thread local was worth warning about by default.
https://github.com/llvm/llvm-project/pull/137166
But it is going to be adjusted to allow the kernel to opt-out of the
warning for aggregate members, as that triggers often in the kernel:
https://github.com/llvm/llvm-project/pull/137961
The only instance of -Wdefault-const-init-var-unsafe that I have found
so far is in typecheck(), which should be easy enough to clean up.
Cheers,
Nathan
diff --git a/include/linux/typecheck.h b/include/linux/typecheck.h
index 46b15e2aaefb..5b473c9905ae 100644
--- a/include/linux/typecheck.h
+++ b/include/linux/typecheck.h
@@ -7,8 +7,8 @@
* Always evaluates to 1 so you may use it easily in comparisons.
*/
#define typecheck(type,x) \
-({ type __dummy; \
- typeof(x) __dummy2; \
+({ type __dummy = {}; \
+ typeof(x) __dummy2 = {}; \
(void)(&__dummy == &__dummy2); \
1; \
})
next prev parent reply other threads:[~2025-04-30 23:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250429161051.743239894@linuxfoundation.org>
2025-04-30 10:39 ` [PATCH 6.1 000/167] 6.1.136-rc1 review Naresh Kamboju
2025-04-30 10:47 ` Dan Carpenter
2025-04-30 10:58 ` Greg Kroah-Hartman
2025-04-30 23:32 ` Nathan Chancellor [this message]
2025-04-30 15:54 ` Matthew Rosato
2025-05-01 7:18 ` Greg Kroah-Hartman
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=20250430233214.GC3715926@ax162 \
--to=nathan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=conor@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hargar@microsoft.com \
--cc=io-uring@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkft-triage@lists.linaro.org \
--cc=llvm@lists.linux.dev \
--cc=naresh.kamboju@linaro.org \
--cc=patches@kernelci.org \
--cc=patches@lists.linux.dev \
--cc=pavel@denx.de \
--cc=rwarsow@gmx.de \
--cc=shuah@kernel.org \
--cc=srw@sladewatkins.net \
--cc=stable@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=virtualization@lists.linux.dev \
/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