Thread (13 messages) 13 messages, 2 authors, 2021-05-17

Re: [PATCH 3/6] [v2] hexagon: use generic strncpy/strnlen from_user

From: Arnd Bergmann <arnd@kernel.org>
Date: 2021-05-17 06:47:16
Also in: linux-m68k, linux-riscv, linux-um, lkml

On Mon, May 17, 2021 at 8:16 AM Christoph Hellwig [off-list ref] wrote:
On Sat, May 15, 2021 at 12:18:00PM +0200, Arnd Bergmann wrote:
quoted
From: Arnd Bergmann <arnd@arndb.de>

Most per-architecture versions of these functions are broken in some form,
and they are almost certainly slower than the generic code as well.

Remove the ones for hexagon and instead use the generic version.
This custom version reads the data twice for strncpy() by doing an extra
strnlen(), and it apparently lacks a check for user_addr_max().
I'd be tempted to just remove the first paragraph and reword the second
as:

Remove the hexagon implementation of strncpy/strnlen and instead use the
generic versions.  The hexago version of strncpy reads the data twice by
doing an extra strnlen(), and it apparently lacks a check for
user_addr_max().
Changed to your version now, thanks!

        Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help