From: David Laight <David.Laight@ACULAB.COM>
To: "'Andrey Ryabinin'" <aryabinin@virtuozzo.com>,
Kees Cook <keescook@chromium.org>,
Dmitry Vyukov <dvyukov@google.com>
Cc: Eryu Guan <eguan@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
Chris Metcalf <cmetcalf@ezchip.com>,
Alexander Potapenko <glider@google.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: RE: [PATCH] lib/string: avoid reading beyond src buffer in strscpy
Date: Tue, 12 Dec 2017 10:19:34 +0000 [thread overview]
Message-ID: <2a9ca72e28ba44198f07f4e412970ad9@AcuMS.aculab.com> (raw)
In-Reply-To: <46584b52-f2f2-a602-1ae6-cfa0e321324a@virtuozzo.com>
From: Andrey Ryabinin
> Sent: 11 December 2017 16:44
...
> I suppose that depends on which one strscpy() caller you'd want to test.
> Briefly looking at all current users, it doesn't look like they process huge amounts
> of data through strscpy(), thus we shouldn't suffer from a slight
> performance degradation of strscpy().
Don't most of the fast string functions use the same kind of
optimisations.
strlen() is very likely to do 64 bit reads and then shifts (etc)
to determine whether any of the bytes are zero.
David
next prev parent reply other threads:[~2017-12-12 10:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 11:33 Eryu Guan
2017-12-07 18:26 ` Kees Cook
2017-12-08 15:29 ` Andrey Ryabinin
2017-12-08 15:29 ` Dmitry Vyukov
2017-12-08 20:54 ` Kees Cook
2017-12-11 16:44 ` Andrey Ryabinin
2017-12-12 10:19 ` David Laight [this message]
2017-12-12 16:06 ` Andrey Ryabinin
2017-12-12 22:42 ` Linus Torvalds
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=2a9ca72e28ba44198f07f4e412970ad9@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=cmetcalf@ezchip.com \
--cc=dvyukov@google.com \
--cc=eguan@redhat.com \
--cc=glider@google.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
Powered by JetHome