Kees Cook
5b55a35b8c
randstruct: gcc-plugin: Fix attribute addition
[ Upstream commit f39f18f3c3531aa802b58a20d39d96e82eb96c14 ]
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>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
2025-12-03 05:44:35 -05:00
..
2019-05-08 07:21:51 +02:00
2022-11-24 03:17:53 +02:00
2025-12-03 05:44:35 -05:00
2020-07-29 10:16:51 +02:00
2025-04-03 10:09:47 +02:00
2025-10-05 09:11:31 +00:00
2025-09-02 08:35:50 +00:00
2019-04-17 08:38:45 +02:00
2022-10-26 13:19:24 +02:00
2021-08-12 13:19:42 +02:00
2023-02-21 11:58:04 +00:00
2023-04-26 11:21:53 +02:00
2021-05-22 10:59:50 +02:00
2025-08-28 03:28:24 +03:00
2018-12-10 11:09:45 -08:00
2018-12-10 11:09:45 -08:00
2023-12-15 09:32:12 +00:00
2019-06-25 11:35:58 +08:00
2018-08-22 23:21:40 +09:00
2025-07-17 10:07:56 +02:00
2020-07-29 10:16:51 +02:00
2020-05-14 07:57:23 +02:00
2021-01-12 20:10:16 +01:00
2021-05-22 10:59:50 +02:00
2022-11-25 17:40:20 +01:00
2022-12-08 11:18:32 +01:00
2020-02-11 04:34:01 -08:00
2019-06-04 08:02:34 +02:00
2024-08-19 05:32:17 +02:00
2024-08-19 05:32:17 +02:00
2020-03-10 13:08:52 +00:00
2021-07-21 20:39:33 -07:00
2018-08-22 10:52:48 -07:00
2020-01-04 19:13:09 +01:00
2025-10-05 09:11:31 +00:00
2020-02-24 08:34:50 +01:00
2021-11-26 11:36:06 +01:00
2025-08-28 03:27:11 +03:00
2021-06-23 12:22:01 -07:00
2021-03-05 07:01:18 +01:00
2023-04-06 14:00:28 +03:00
2018-08-28 17:10:42 +05:30
2019-02-09 16:01:59 -08:00
2024-05-07 22:02:57 +03:00
2022-08-25 11:15:42 +02:00
2022-12-17 18:14:34 +02:00
2022-11-24 03:19:30 +02:00
2018-08-28 17:10:42 +05:30
2022-11-24 03:26:55 +02:00
2025-01-10 13:09:21 +02:00
2022-09-28 11:02:53 +02:00
2020-07-23 21:26:11 +00:00
2019-10-29 09:19:36 +01:00
2020-03-25 08:06:08 +01:00
2023-06-08 11:16:01 +00:00
2020-08-27 10:54:55 -07:00
2022-01-05 12:34:58 +01:00
2021-11-17 22:45:48 +00:00
2023-12-20 15:38:01 +01:00
2018-12-19 19:19:50 +01:00
2018-08-23 18:48:43 -07:00
2019-08-16 10:12:44 +02:00
2021-05-22 10:59:50 +02:00
2018-09-05 08:12:09 -06:00
2023-08-11 11:45:01 +02:00
2020-11-16 09:22:34 +01:00
2018-12-08 12:59:06 +01:00