[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200507131503.02aba5a6@lwn.net>
Date: Thu, 7 May 2020 13:15:03 -0600
From: Jonathan Corbet <corbet@....net>
To: Peter Xu <peterx@...hat.com>
Cc: Daniel Colascione <dancol@...gle.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Vlastimil Babka <vbabka@...e.cz>,
Mel Gorman <mgorman@...hsingularity.net>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Andrea Arcangeli <aarcange@...hat.com>,
Mike Rapoport <rppt@...ux.ibm.com>,
Jerome Glisse <jglisse@...hat.com>, Shaohua Li <shli@...com>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, timmurray@...gle.com,
minchan@...gle.com, sspatil@...gle.com, lokeshgidra@...gle.com
Subject: Re: [PATCH 2/2] Add a new sysctl knob:
unprivileged_userfaultfd_user_mode_only
On Wed, 6 May 2020 15:38:16 -0400
Peter Xu <peterx@...hat.com> wrote:
> If this is going to be added... I am thinking whether it should be easier to
> add another value for unprivileged_userfaultfd, rather than a new sysctl. E.g.:
>
> "0": unprivileged userfaultfd forbidden
> "1": unprivileged userfaultfd allowed (both user/kernel faults)
> "2": unprivileged userfaultfd allowed (only user faults)
>
> Because after all unprivileged_userfaultfd_user_mode_only will be meaningless
> (iiuc) if unprivileged_userfaultfd=0. The default value will also be the same
> as before ("1") then.
It occurs to me to wonder whether this interface should also let an admin
block *privileged* user from handling kernel-space faults? In a
secure-boot/lockdown setting, this could be a hardening measure that keeps
a (somewhat) restricted root user from expanding their privilege...?
jon
Powered by blists - more mailing lists