[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wibzqo7C+mS+BgZxRbgdWe2w5F39EhuFUhZUxvotoGLuA@mail.gmail.com>
Date: Fri, 2 Nov 2018 10:10:45 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: mst@...hat.com
Cc: mark.rutland@....com, Kees Cook <keescook@...omium.org>,
kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
netdev@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
bijan.mottahedeh@...cle.com, gedwards@....com, joe@...ches.com,
lenaic@...ard.fr, liang.z.li@...el.com, mhocko@...nel.org,
mhocko@...e.com, stefanha@...hat.com, wei.w.wang@...el.com,
jasowang@...hat.com
Subject: Re: [PULL] vhost: cleanups and fixes
On Fri, Nov 2, 2018 at 9:59 AM Michael S. Tsirkin <mst@...hat.com> wrote:
>
> Just for completeness I'd like to point out for vhost the copies are
> done from the kernel thread. So yes we can switch to copy_to/from_user
> but for e.g. 32-bit userspace running on top of a 64 bit kernel it is
> IIUC not sufficient - we must *also* do access_ok checks on control path
> when addresses are passed to the kernel and when current points to the
> correct task struct.
Don't you take over the VM with "use_mm()" when you do the copies? So
yes, it's a kernel thread, but it has a user VM, and though that
should have the user limits.
No?
Linus
Powered by blists - more mailing lists