[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202502241928.4405326B13@keescook>
Date: Mon, 24 Feb 2025 19:29:55 -0800
From: Kees Cook <kees@...nel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc: Andy Shevchenko <andy@...nel.org>, linux-hardening@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: Question about strings of string_choices.h
On Tue, Feb 25, 2025 at 01:43:55AM +0000, Kuninori Morimoto wrote:
>
> Hi Kees, Andy
>
> I would like to use string_choices helper, and want to add well used
> but not yet supported strings. But before that I would like to ask one
> thing about it.
>
> I wonder is it guaranteed that the strings were persist after the
> function returned ? In normally, function local variable will disappear
> when it returns from the function. But I'm not sure in case of
> static inline const, etc.
>
> If it is guaranteed, I'm very happy.
Yes, the compiler puts them in the .rodata section, so they will always
be present.
-Kees
--
Kees Cook
Powered by blists - more mailing lists