[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Dec 2017 10:19:34 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Andrey Ryabinin' <aryabinin@...tuozzo.com>,
Kees Cook <keescook@...omium.org>,
Dmitry Vyukov <dvyukov@...gle.com>
CC: Eryu Guan <eguan@...hat.com>, LKML <linux-kernel@...r.kernel.org>,
"Andrew Morton" <akpm@...ux-foundation.org>,
Chris Metcalf <cmetcalf@...hip.com>,
Alexander Potapenko <glider@...gle.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: RE: [PATCH] lib/string: avoid reading beyond src buffer in strscpy
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
Powered by blists - more mailing lists