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