Re: [PATCH 6/9] fortify: Split reporting and avoid passing string pointer
From: Kees Cook
Date: Thu Apr 06 2023 - 18:54:43 EST
On Thu, Apr 06, 2023 at 03:44:54PM +0200, Miguel Ojeda wrote:
> 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).
I will adjust it -- this was an artifact of splitting up my patches.
Thanks!
--
Kees Cook