From: Paolo Bonzini Subject: Re: [PATCH 0/3] userfaultfd: allow to forbid unprivileged users Date: Thu, 14 Mar 2019 11:58:15 +0100 Message-ID: <298b9469-abd2-b02b-5c71-529b8976a46c@redhat.com> References: <20190311093701.15734-1-peterx@redhat.com> <58e63635-fc1b-cb53-a4d1-237e6b8b7236@oracle.com> <20190313060023.GD2433@xz-x1> <3714d120-64e3-702e-6eef-4ef253bdb66d@redhat.com> <20190313185230.GH25147@redhat.com> <1934896481.7779933.1552504348591.JavaMail.zimbra@redhat.com> <20190313234458.GJ25147@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Peter Xu , Mike Kravetz , linux-kernel@vger.kernel.org, Hugh Dickins , Luis Chamberlain , Maxime Coquelin , kvm@vger.kernel.org, Jerome Glisse , Pavel Emelyanov , Johannes Weiner , Martin Cracauer , Denis Plotnikov , linux-mm@kvack.org, Marty McFadden , Maya Gokhale , Mike Rapoport , Kees Cook , Mel Gorman , "Kirill A . Shutemov" , linux-fsdevel@vger.kernel.org, "Dr . David Alan Gilbert" , To: Andrea Arcangeli Return-path: In-Reply-To: <20190313234458.GJ25147@redhat.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 14/03/19 00:44, Andrea Arcangeli wrote: > Then I thought we can add a tristate so an open of /dev/kvm would also > allow the syscall to make things more user friendly because > unprivileged containers ideally should have writable mounts done with > nodev and no matter the privilege they shouldn't ever get an hold on > the KVM driver (and those who do, like kubevirt, will then just work). I wouldn't even bother with the KVM special case. Containers can use seccomp if they want a fine-grained policy. (Actually I wouldn't bother with the knob at all; the attack surface of userfaultfd is infinitesimal compared to the BPF JIT...). Paolo