lkml.org 
[lkml]   [2017]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] lib/strscpy: avoid KASAN false positive
On Wed, Jul 19, 2017 at 6:05 PM, Dave Jones <davej@codemonkey.org.uk> wrote:
> On Wed, Jul 19, 2017 at 11:39:32AM -0400, Chris Metcalf wrote:
>
> > > We could just remove all that word-at-a-time logic. Do we have any
> > > evidence that this would harm anything?
> >
> > The word-at-a-time logic was part of the initial commit since I wanted
> > to ensure that strscpy could be used to replace strlcpy or strncpy without
> > serious concerns about performance.
>
> I'm curious what the typical length of the strings we're concerned about
> in this case are if this makes a difference.


My vote is for proceeding with the original Andrey's patch. It's not
perfect, but it's simple, short, minimally intrusive and fixes the
problem at hand. We can do something more fundamental when/if we have
more such cases.

\
 
 \ /
  Last update: 2017-07-26 14:08    [W:0.115 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site