From: Guenter Roeck <linux@roeck-us.net>
To: Kees Cook <keescook@chromium.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jonathan Corbet <corbet@lwn.net>, Len Baker <len.baker@gmx.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Francis Laniel <laniel_francis@privacyrequired.com>,
Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2] string: Introduce strtomem() and strtomem_pad()
Date: Fri, 2 Sep 2022 14:47:04 -0700 [thread overview]
Message-ID: <20220902214704.GA4094673@roeck-us.net> (raw)
In-Reply-To: <202209021351.13203B669@keescook>
On Fri, Sep 02, 2022 at 01:52:35PM -0700, Kees Cook wrote:
> On Thu, Sep 01, 2022 at 12:34:34PM -0700, Guenter Roeck wrote:
> > On 9/1/22 12:09, Kees Cook wrote:
> > > [...]
> > > -If a caller is using non-NUL-terminated strings, strncpy() can
> > > -still be used, but destinations should be marked with the `__nonstring
> > > +If a caller is using non-NUL-terminated strings, strtomem() should be
> > > +be used, and the destinations should be marked with the `__nonstring
> >
> > s/be //
>
> Thanks!
>
> > > [...]
> > > +++ b/include/linux/fortify-string.h
> > > @@ -77,6 +77,36 @@ extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size)
> > > #define POS __pass_object_size(1)
> > > #define POS0 __pass_object_size(0)
> > > +/** strncpy - Copy a string to memory with non-guaranteed NUL padding
> >
> > Does that need a newline before strncpy() ?
>
> What do you mean here? I think this is valid kerndoc, but I'll
> double-check. (And will continue in the neighboring htmldoc build thread.)
>
Just asking. "/** strncpy - Copy a string ..." seemed unusual without
newline between "/**" and the function name.
Guenter
next prev parent reply other threads:[~2022-09-02 21:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 19:09 [PATCH v2] string: Introduce strtomem() and strtomem_pad() Kees Cook
2022-09-01 19:34 ` Guenter Roeck
2022-09-02 20:52 ` Kees Cook
2022-09-02 21:47 ` Guenter Roeck [this message]
2022-09-02 22:37 ` Kees Cook
2022-09-02 1:53 ` Bagas Sanjaya
2022-09-02 20:56 ` Kees Cook
2022-09-02 4:21 ` Bagas Sanjaya
2022-09-02 21:01 ` Kees Cook
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=20220902214704.GA4094673@roeck-us.net \
--to=linux@roeck-us.net \
--cc=corbet@lwn.net \
--cc=geert@linux-m68k.org \
--cc=gustavoars@kernel.org \
--cc=keescook@chromium.org \
--cc=laniel_francis@privacyrequired.com \
--cc=len.baker@gmx.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ndesaulniers@google.com \
--cc=pabeni@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=wsa+renesas@sang-engineering.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.