From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: Kees Cook <kees@kernel.org>
Cc: Ingo Saitz <ingo@hannover.ccc.de>,
Nathan Chancellor <nathan@kernel.org>,
linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] randstruct: gcc-plugin: Fix attribute addition
Date: Sat, 31 May 2025 01:33:36 -0300 [thread overview]
Message-ID: <87iklhjt5r.fsf@linaro.org> (raw)
In-Reply-To: <20250530221824.work.623-kees@kernel.org> (Kees Cook's message of "Fri, 30 May 2025 15:18:28 -0700")
Hello,
Kees Cook <kees@kernel.org> writes:
> Based on changes in the 2021 public version of the randstruct
> out-of-tree GCC plugin[1], more carefully update the attributes on
> resulting decls, to avoid tripping checks in GCC 15's
> comptypes_check_enum_int() when it has been configured with
> "--enable-checking=misc":
>
> arch/arm64/kernel/kexec_image.c:132:14: internal compiler error: in comptypes_check_enum_int, at c/c-typeck.cc:1519
> 132 | const struct kexec_file_ops kexec_image_ops = {
> | ^~~~~~~~~~~~~~
> internal_error(char const*, ...), at gcc/gcc/diagnostic-global-context.cc:517
> fancy_abort(char const*, int, char const*), at gcc/gcc/diagnostic.cc:1803
> comptypes_check_enum_int(tree_node*, tree_node*, bool*), at gcc/gcc/c/c-typeck.cc:1519
> ...
Great! Thank you.
> Link: https://archive.org/download/grsecurity/grsecurity-3.1-5.10.41-202105280954.patch.gz [1]
> Reported-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
> Closes: https://github.com/KSPP/linux/issues/367
> Closes: https://lore.kernel.org/lkml/20250530000646.104457-1-thiago.bauermann@linaro.org/
> Reported-by: Ingo Saitz <ingo@hannover.ccc.de>
> Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104745
> Fixes: 313dd1b62921 ("gcc-plugins: Add the randstruct plugin")
> Signed-off-by: Kees Cook <kees@kernel.org>
> ---
> Cc: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
> Cc: Ingo Saitz <ingo@hannover.ccc.de>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: <linux-hardening@vger.kernel.org>
> ---
> scripts/gcc-plugins/gcc-common.h | 32 +++++++++++++++++++
> scripts/gcc-plugins/randomize_layout_plugin.c | 22 ++++++-------
> 2 files changed, 43 insertions(+), 11 deletions(-)
Tested-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
--
Thiago
prev parent reply other threads:[~2025-05-31 4:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-30 22:18 [PATCH] randstruct: gcc-plugin: Fix attribute addition Kees Cook
2025-05-31 4:33 ` Thiago Jung Bauermann [this message]
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=87iklhjt5r.fsf@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=ingo@hannover.ccc.de \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@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.