From: Peter Xu <peterx@redhat.com>
To: Xiaoming Ni <nixiaoming@huawei.com>
Cc: aarcange@redhat.com, akpm@linux-foundation.org,
cracauer@cons.org, dplotnikov@virtuozzo.com, gokhale2@llnl.gov,
hannes@cmpxchg.org, hughd@google.com, jglisse@redhat.com,
kirill@shutemov.name, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, maxime.coquelin@redhat.com,
mcfadden8@llnl.gov, mcgrof@kernel.org, mgorman@suse.de,
mike.kravetz@oracle.com, pbonzini@redhat.com,
rppt@linux.vnet.ibm.com, xemul@virtuozzo.com,
keescook@chromium.org
Subject: Re: [PATCH v2 1/1] userfaultfd/sysctl: add vm.unprivileged_userfaultfd
Date: Wed, 27 May 2020 10:21:43 -0400 [thread overview]
Message-ID: <20200527142143.GC1194141@xz-x1> (raw)
In-Reply-To: <3b64de85-beb4-5a07-0093-cad6e8f2a8d8@huawei.com>
On Wed, May 27, 2020 at 02:54:13PM +0800, Xiaoming Ni wrote:
>
> On Tue, Mar 19, 2019 at 11:07:22AM +0800, Peter Xu wrote:
> > Add a global sysctl knob "vm.unprivileged_userfaultfd" to control
> > whether userfaultfd is allowed by unprivileged users. When this is
> > set to zero, only privileged users (root user, or users with the
> > CAP_SYS_PTRACE capability) will be able to use the userfaultfd
> > syscalls.
>
> Hello
Hi, Xiaoming,
> I am a bit confused about this patch, can you help to answer it.
>
> Why the sysctl interface of fs/userfaultfd.c belongs to vm_table instead of
> fs_table ?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cefdca0a86be517bc390fc4541e3674b8e7803b0
Because I think it makes more sense to put the new key into where it suites
better, irrelevant to which directory the variable is declared. To me,
unprivileged_userfaultfd is definitely more suitable for vm rather than fs,
because userfaultfd is really about memory management rather than file system.
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2020-05-27 14:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 6:54 [PATCH v2 1/1] userfaultfd/sysctl: add vm.unprivileged_userfaultfd Xiaoming Ni
2020-05-27 14:21 ` Peter Xu [this message]
2020-05-28 8:50 ` Xiaoming Ni
2020-05-28 12:49 ` Peter Xu
-- strict thread matches above, loose matches on Subject: below --
2019-03-19 3:07 [PATCH v2 0/1] userfaultfd: allow to forbid unprivileged users Peter Xu
2019-03-19 3:07 ` [PATCH v2 1/1] userfaultfd/sysctl: add vm.unprivileged_userfaultfd Peter Xu
2019-03-19 7:11 ` Mike Rapoport
2019-03-19 18:07 ` Andrea Arcangeli
2019-03-19 18:02 ` Andrew Morton
2019-03-19 18:28 ` Dr. David Alan Gilbert
2019-03-20 0:20 ` Peter Xu
2019-03-20 19:01 ` Andrea Arcangeli
2019-03-21 13:43 ` Luis Chamberlain
2019-03-21 21:06 ` Andrea Arcangeli
2019-04-23 22:19 ` Kees Cook
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=20200527142143.GC1194141@xz-x1 \
--to=peterx@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cracauer@cons.org \
--cc=dplotnikov@virtuozzo.com \
--cc=gokhale2@llnl.gov \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=jglisse@redhat.com \
--cc=keescook@chromium.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maxime.coquelin@redhat.com \
--cc=mcfadden8@llnl.gov \
--cc=mcgrof@kernel.org \
--cc=mgorman@suse.de \
--cc=mike.kravetz@oracle.com \
--cc=nixiaoming@huawei.com \
--cc=pbonzini@redhat.com \
--cc=rppt@linux.vnet.ibm.com \
--cc=xemul@virtuozzo.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).