From: Kees Cook <kees@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Andy Shevchenko <andy@kernel.org>,
linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Question about strings of string_choices.h
Date: Mon, 24 Feb 2025 19:29:55 -0800 [thread overview]
Message-ID: <202502241928.4405326B13@keescook> (raw)
In-Reply-To: <87eczmssrp.wl-kuninori.morimoto.gx@renesas.com>
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
next prev parent reply other threads:[~2025-02-25 3:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 1:43 Question about strings of string_choices.h Kuninori Morimoto
2025-02-25 3:29 ` Kees Cook [this message]
2025-02-25 3:40 ` Kuninori Morimoto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202502241928.4405326B13@keescook \
--to=kees@kernel.org \
--cc=andy@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox