lkml.org 
[lkml]   [2022]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] string: Introduce strtomem() and strtomem_pad()
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

\
 
 \ /
  Last update: 2022-09-02 23:48    [W:0.041 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site