lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] userfaultfd: allow to forbid unprivileged users
Hi, Kirill,

On Tue, Mar 12, 2019 at 10:49:51AM +0300, Kirill A. Shutemov wrote:
> On Mon, Mar 11, 2019 at 05:36:58PM +0800, Peter Xu wrote:
> > Hi,
> >
> > (The idea comes from Andrea, and following discussions with Mike and
> > other people)
> >
> > This patchset introduces a new sysctl flag to allow the admin to
> > forbid users from using userfaultfd:
> >
> > $ cat /proc/sys/vm/unprivileged_userfaultfd
> > [disabled] enabled kvm
>
> CC linux-api@
>
> This is unusual way to return current value for sysctl. Does it work fine
> with sysctl tool?

It can work, though it displays the same as "cat":

$ sysctl vm.unprivileged_userfaultfd
vm.unprivileged_userfaultfd = disabled enabled [kvm]

>
> Have you considered to place the switch into /sys/kernel/mm instead?
> I doubt it's the last tunable for userfaultfd. Maybe we should have an
> directory for it under /sys/kernel/mm?

I haven't thought about sysfs, if that's preferred I can consider to
switch to that. And yes I think creating a directory should be a good
idea.

Thanks,

--
Peter Xu

\
 
 \ /
  Last update: 2019-03-12 13:43    [W:0.155 / U:3.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site