Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1697023

Re: [PATCH] lib/strscpy: avoid KASAN false positive

From Dmitry Vyukov <dvyukov@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH] lib/strscpy: avoid KASAN false positive
Date 2017-07-26 14:10 +0200
Message-ID <u7tix-7n-3@gated-at.bofh.it> (permalink)
References (3 earlier) <u4Hi2-71I-21@gated-at.bofh.it> <u4IQO-86Q-25@gated-at.bofh.it> <u4IQO-86Q-23@gated-at.bofh.it> <u4ZHY-2x4-17@gated-at.bofh.it> <u4ZHY-2x4-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] lib/strscpy: avoid KASAN false positive Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-18 19:30 +0200
  Re: [PATCH] lib/strscpy: avoid KASAN false positive Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-18 22:30 +0200
    Re: [PATCH] lib/strscpy: avoid KASAN false positive Andrew Morton <akpm@linux-foundation.org> - 2017-07-19 00:10 +0200
      Re: [PATCH] lib/strscpy: avoid KASAN false positive Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-19 00:40 +0200
        Re: [PATCH] lib/strscpy: avoid KASAN false positive Dmitry Vyukov <dvyukov@google.com> - 2017-07-19 09:50 +0200
      Re: [PATCH] lib/strscpy: avoid KASAN false positive Dave Jones <davej@codemonkey.org.uk> - 2017-07-19 18:10 +0200
        Re: [PATCH] lib/strscpy: avoid KASAN false positive Dmitry Vyukov <dvyukov@google.com> - 2017-07-26 14:10 +0200

csiph-web