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