Kees Cook
56c27f55e3
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-10-16 12:15:30 +02:00
..
2018-07-18 01:18:05 +09:00
2019-05-08 07:21:51 +02:00
2022-01-27 09:04:33 +01:00
2025-10-16 12:15:30 +02:00
2020-07-29 10:16:51 +02:00
2025-04-03 10:09:47 +02:00
2025-09-16 13:55:17 +02:00
2025-02-07 03:34:27 +01: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-04-26 11:21:53 +02:00
2018-07-18 01:18:05 +09:00
2021-05-22 10:59:50 +02:00
2017-05-14 11:20:44 +09:00
2024-03-01 13:06:11 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-12-30 11:26:04 +01:00
2019-06-25 11:35:58 +08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2025-07-17 10:07:56 +02:00
2014-04-30 17:34:32 +02:00
2016-10-11 15:06:30 -07: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
2018-07-02 11:25:00 -06:00
2017-05-14 11:20:44 +09:00
2018-05-04 06:21:06 -04:00
2022-11-25 17:40:20 +01:00
2018-07-08 09:32:32 +09: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
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2024-08-19 05:32:17 +02:00
2024-08-19 05:32:17 +02:00
2018-08-22 10:52:48 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-26 02:01:18 +09:00
2017-11-02 11:10:55 +01:00
2016-02-26 15:30:20 +00:00
2020-01-04 19:13:09 +01:00
2025-09-16 13:55:19 +02:00
2020-02-24 08:34:50 +01:00
2018-08-06 13:36:20 -06:00
2021-11-26 11:36:06 +01:00
2017-11-02 11:10:55 +01:00
2018-08-24 08:22:08 +09:00
2021-03-04 09:39:29 +01:00
2017-11-17 17:45:29 -08:00
2023-03-17 08:31:43 +01:00
2018-08-09 21:51:17 +09:00
2024-04-13 12:50:06 +02:00
2022-08-25 11:15:42 +02:00
2017-11-17 17:45:29 -08:00
2018-07-18 01:18:05 +09:00
2019-12-13 08:52:18 +01:00
2018-08-03 00:47:00 +09:00
2018-07-06 22:04:03 +09:00
2022-09-05 10:26:33 +02:00
2017-11-02 11:10:55 +01:00
2017-05-14 11:20:44 +09:00
2024-12-05 10:59:29 +01:00
2017-11-02 11:10:55 +01:00
2022-09-28 11:02:53 +02:00
2017-03-13 09:40:28 -07:00
2019-10-29 09:19:36 +01:00
2017-03-11 11:13:38 +09:00
2020-03-25 08:06:08 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2023-05-30 12:42:10 +01:00
2019-07-31 07:27:03 +02:00
2022-01-05 12:34:58 +01:00
2020-11-05 11:08:31 +01:00
2014-06-10 00:04:06 +02:00
2023-12-20 15:38:01 +01:00
2016-11-14 11:11:51 +11:00
2014-10-14 02:18:23 +02: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
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-05 08:12:09 -06:00
2023-08-11 11:45:01 +02:00
2018-12-08 12:59:06 +01:00
2018-07-07 17:44:52 +02:00