linux-stable/scripts
Kees Cook eabc92d1fb randstruct: gcc-plugin: Fix attribute addition
[ Upstream commit f39f18f3c3 ]

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
 ...

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: 313dd1b629 ("gcc-plugins: Add the randstruct plugin")
Tested-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Link: https://lore.kernel.org/r/20250530221824.work.623-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-09 18:45:23 +02:00
..
atomic
basic
clang-tools
coccinelle
dtc
dummy-tools
gcc-plugins randstruct: gcc-plugin: Fix attribute addition 2025-09-09 18:45:23 +02:00
gdb
genksyms genksyms: fix memory leak when the same symbol is read from *.symref file 2025-03-13 12:46:58 +01:00
kconfig kconfig: lxdialog: fix 'space' to (de)select options 2025-08-28 16:22:47 +02:00
ksymoops
mod
package
selinux selinux: Chain up tool resolving errors in install_policy.sh 2025-04-10 14:30:55 +02:00
tracing
.gitignore
adjust_autoksyms.sh
as-version.sh kbuild: Update assembler calls to use proper flags and language target 2025-06-27 11:04:10 +01:00
asn1_compiler.c
bin2c.c
bloat-o-meter
bootgraph.pl
bpf_helpers_doc.py
cc-can-link.sh
check_extable.sh
check-sysctl-docs
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl
checkstack.pl
checksyscalls.sh
checkversion.pl
clang-version.sh
cleanfile
cleanpatch
coccicheck
config kbuild: fix argument parsing in scripts/config 2025-06-04 14:37:00 +02:00
const_structs.checkpatch
decode_stacktrace.sh
decodecode
depmod.sh
dev-needs.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line
file-size.sh
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_autoksyms.sh
gen_ksymdeps.sh
get_abi.pl
get_dvb_firmware
get_maintainer.pl
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh
insert-sys-cert.c
jobserver-exec
kallsyms.c
Kbuild.include kbuild: Add KBUILD_CPPFLAGS to as-option invocation 2025-06-27 11:04:10 +01:00
Kconfig.include kbuild: Update assembler calls to use proper flags and language target 2025-06-27 11:04:10 +01:00
kernel-doc
ld-version.sh
leaking_addresses.pl
Lindent
link-vmlinux.sh
lld-version.sh
Makefile
Makefile.asm-generic
Makefile.build
Makefile.clean
Makefile.dtbinst
Makefile.extrawarn kbuild: Move -Wenum-enum-conversion to W=2 2025-03-13 12:47:10 +01:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host
Makefile.kasan
Makefile.kcov
Makefile.kcsan
Makefile.lib
Makefile.modfinal
Makefile.modinst
Makefile.modpost
Makefile.modsign
Makefile.package
Makefile.ubsan
Makefile.userprogs
makelst
markup_oops.pl
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
module.lds.S
modules-check.sh
nsdeps
objdiff
pahole-flags.sh
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl
setlocalversion
show_delta
sign-file.c
sorttable.c
sorttable.h scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity 2025-02-01 18:22:21 +01:00
spdxcheck-test.sh
spdxcheck.py
spelling.txt
sphinx-pre-install
split-man.pl
stackdelta
stackusage
subarch.include
tags.sh
tools-support-relr.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh