From: Kees Cook <kees@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: linux-hardening@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: -Wformat-trunctation with `make W=1`
Date: Tue, 10 Sep 2024 17:26:14 -0700 [thread overview]
Message-ID: <202409101722.C8E47DF@keescook> (raw)
In-Reply-To: <Zt73a3t8Y8uH5MHG@smile.fi.intel.com>
On Mon, Sep 09, 2024 at 04:26:03PM +0300, Andy Shevchenko wrote:
> Recently I'm trying to compile my (almost) x86_64_defconfig based kernel with
> `make W=1` while having CONFIG_WERROR=y. With a handful of patches I was able
> to achieve that with clang-18, however GCC 14.2.0 issues a lot of additional
> warnings that are mostly related to -Wformat-truncation [1]. Any suggestions,
> plans, comments on how to address them?
>
> [1]: https://paste.debian.net/hidden/46106f2a/
Since it's behind W=1, fixing those issues hasn't been a very high
priority. That said, I would love to see it done. Patches have slowly
been landing for various W=1 things related to the -Wstringop-... and
-Wformat... options, though. But I don't think there has been a
concerted effort to wipe them out completely. And at least sometimes
these warnings are effectively false positives, related to unexpected
behaviors in GCC's value range tracking, though that has mostly been an
issue for getting -Warray-bounds to build cleanly.
As for fixing them, I think one will need to just look at each instance
one at a time to figure out the best solution.
-Kees
--
Kees Cook
next prev parent reply other threads:[~2024-09-11 0:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 13:26 -Wformat-trunctation with `make W=1` Andy Shevchenko
2024-09-11 0:26 ` Kees Cook [this message]
2024-09-11 7:05 ` Arnd Bergmann
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=202409101722.C8E47DF@keescook \
--to=kees@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=arnd@arndb.de \
--cc=linux-hardening@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.