[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8572D146-4DB9-46A6-9A0C-C155F48F56F2@kernel.org>
Date: Sat, 20 Sep 2025 13:30:02 -0700
From: Kees Cook <kees@...nel.org>
To: Christopher Fore <csfore@...teo.net>
CC: linux-hardening@...r.kernel.org
Subject: Re: [PATCH] scripts/gcc-plugins: Remove TODO flag
On September 20, 2025 12:51:51 PM PDT, Christopher Fore <csfore@...teo.net> wrote:
>TODO_verify_il was removed by GCC at
>9739ae9384dd7cd3bb1c7683d6b80b7a9116eaf8
>
>Direct link to GCC commit:
>https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9739ae9384dd7cd3bb1c7683d6b80b7a9116eaf8
>
>Signed-off-by: Christopher Fore <csfore@...teo.net>
>---
> scripts/gcc-plugins/gcc-common.h | 5 -----
> scripts/gcc-plugins/latent_entropy_plugin.c | 2 +-
> scripts/gcc-plugins/stackleak_plugin.c | 3 +--
> 3 files changed, 2 insertions(+), 8 deletions(-)
>
>diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
>index 6cb6d1051815..cedc655f4741 100644
>--- a/scripts/gcc-plugins/gcc-common.h
>+++ b/scripts/gcc-plugins/gcc-common.h
>@@ -173,11 +173,6 @@ static inline opt_pass *get_pass_for_id(int id)
> return g->get_passes()->get_pass_for_id(id);
> }
>
>-#define TODO_verify_ssa TODO_verify_il
>-#define TODO_verify_flow TODO_verify_il
>-#define TODO_verify_stmts TODO_verify_il
>-#define TODO_verify_rtl_sharing TODO_verify_il
>-
> #define INSN_DELETED_P(insn) (insn)->deleted()
>
> static inline const char *get_decl_section_name(const_tree decl)
>diff --git a/scripts/gcc-plugins/latent_entropy_plugin.c b/scripts/gcc-plugins/latent_entropy_plugin.c
>index ff0b192be91f..065e1fe58f75 100644
>--- a/scripts/gcc-plugins/latent_entropy_plugin.c
>+++ b/scripts/gcc-plugins/latent_entropy_plugin.c
>@@ -564,7 +564,7 @@ static void latent_entropy_start_unit(void *gcc_data __unused,
>
> #define PASS_NAME latent_entropy
> #define PROPERTIES_REQUIRED PROP_gimple_leh | PROP_cfg
>-#define TODO_FLAGS_FINISH TODO_verify_ssa | TODO_verify_stmts | TODO_dump_func \
>+#define TODO_FLAGS_FINISH TODO_dump_func \
> | TODO_update_ssa
It looks like you've replaced verify_ssa with update_ssa? Is this a valid option for all Linux supported GCC versions? (And is this the correct replacement?)
-Kees
> #include "gcc-generate-gimple-pass.h"
>
>diff --git a/scripts/gcc-plugins/stackleak_plugin.c b/scripts/gcc-plugins/stackleak_plugin.c
>index e486488c867d..6f663bcfda84 100644
>--- a/scripts/gcc-plugins/stackleak_plugin.c
>+++ b/scripts/gcc-plugins/stackleak_plugin.c
>@@ -503,8 +503,7 @@ static bool stackleak_instrument_gate(void)
>
> #define PASS_NAME stackleak_instrument
> #define PROPERTIES_REQUIRED PROP_gimple_leh | PROP_cfg
>-#define TODO_FLAGS_START TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts
>-#define TODO_FLAGS_FINISH TODO_verify_ssa | TODO_verify_stmts | TODO_dump_func \
>+#define TODO_FLAGS_FINISH TODO_dump_func \
> | TODO_update_ssa | TODO_rebuild_cgraph_edges
> #include "gcc-generate-gimple-pass.h"
>
--
Kees Cook
Powered by blists - more mailing lists