Re: [PATCH 6/9] fortify: Split reporting and avoid passing string pointer

From: Miguel Ojeda
Date: Thu Apr 06 2023 - 09:45:40 EST


On Thu, Apr 6, 2023 at 2:02 AM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
> +void __fortify_report(u8 reason);
> +void __fortify_panic(u8 reason) __cold __noreturn;

(snip)

> +void __fortify_report(u8 reason)

(snip)

> +void __fortify_panic(const u8 reason)

I am curious: for some reason (no pun intended :) the `reason`s above
are not `const` except this one, but then in a later patch they become
`const` (including the declarations).

So perhaps make everything `const` when they are introduced? Or is
there some other reason? (e.g. I saw one patch that moved a function,
so there it seemed to make sense to keep things as they are to make
the copy 1:1).

Cheers,
Miguel