From: Al Viro <viro@ZenIV.linux.org.uk>
To: Pavel Machek <pavel@ucw.cz>
Cc: mtk.manpages@gmail.com, Dmitry Vyukov <dvyukov@google.com>,
Alexander Potapenko <glider@google.com>,
Kostya Serebryany <kcc@google.com>,
Eric Dumazet <edumazet@google.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [iov_iter] use memmove() when copying to/from user page
Date: Thu, 25 May 2017 19:22:01 +0100 [thread overview]
Message-ID: <20170525182201.GG390@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20170525170457.GA3085@amd>
On Thu, May 25, 2017 at 07:04:57PM +0200, Pavel Machek wrote:
> Date: Tue, 16 May 2017 14:27:34 +0200
> From: Alexander Potapenko <glider@google.com>
> Subject: [PATCH] [iov_iter] use memmove() when copying to/from user
> page
>
> BUG: memcpy-param-overlap in generic_perform_write+0x551/0xa20
> __msan_memcpy(ffff88013c6e3001, ffff88013c6e3000, 105)
> CPU: 0 PID: 1040 Comm: probe Not tainted 4.11.0-rc5+ #2562
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs
> 01/01/2011
>
> At the very least, we do not want userland to trigger kernel
> BUG()s... so this needs fixes beyond documentation.
Sure. Which is to say, the instrumentation that throws such
BUG() is broken and needs to be fixed.
This is bullshit; the _only_ value memmove() would have here is
"doesn't yield false positives from fuck knows what out-of-tree
patches".
It does not make overlapping sendfile() work reliably (while
creating an impression that it just might, as we'd seen in
this thread). It does not do anything to kernel-vs-userland
aliasing either - copy_from_user() is definitely memcpy()-like,
not memmove()-like. Not that memmove() worked in situations
when source and destination point to the same memory object
seen at two virtial addresses...
next prev parent reply other threads:[~2017-05-25 18:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 12:27 [PATCH] [iov_iter] use memmove() when copying to/from user page Alexander Potapenko
2017-05-16 18:48 ` Al Viro
2017-05-16 18:53 ` Dmitry Vyukov
2017-05-16 19:37 ` Al Viro
2017-05-16 20:10 ` Dmitry Vyukov
2017-05-16 20:52 ` Al Viro
2017-05-16 21:01 ` Dmitry Vyukov
2017-05-16 21:33 ` Al Viro
2017-05-16 22:15 ` Dmitry Vyukov
2017-05-16 22:48 ` Al Viro
2017-05-25 17:04 ` Pavel Machek
2017-05-25 17:15 ` Eric Dumazet
2017-05-25 21:27 ` Pavel Machek
2017-05-25 18:22 ` Al Viro [this message]
2017-05-25 19:15 ` Al Viro
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=20170525182201.GG390@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dvyukov@google.com \
--cc=edumazet@google.com \
--cc=glider@google.com \
--cc=kcc@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=pavel@ucw.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.