Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp634659pxb; Thu, 14 Jan 2021 14:49:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyd9TlKAdV9ZzFiG8elxhxUHK4n9Gi46F7cAaAkWUmJFl7d7gf3odFiL/YlvUczN2iknahb X-Received: by 2002:a17:906:8301:: with SMTP id j1mr6870473ejx.397.1610664582365; Thu, 14 Jan 2021 14:49:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610664582; cv=none; d=google.com; s=arc-20160816; b=ZR/xEAJOusl3uRunMTg7AQRBT3hp9qM0VvGCCBQLTIcmznzcG620+7BpU6IxbAi32F Asmeij3Mb0z+KNp85j+Xs4xLz3OuzlUj6TqMrdAbi0MiGlNlhBKh5E9gyEEFh3Ey2qJo 7zawOofUHcm1Y8fxynVAURtlIkCO9OljmNjJyBDI7RT6zDgT46VFGX/enqSSvQeluT4f knzozDT2tKDeyDxVl5MbWuSXxC74VC/sbR9fn5ZDQ02Yh19VSLbIgTmoCo098c4VIazd O1kRRi9qiULJbbup5KBpJ5gG2VAb0/kFbTm4Dw+0jbXKt521h2XpDxsmdXdIETgTWj3h VoRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2zyDFVEgfwCeZaxKwpzwQSp3ENtudOHEif4oCCEAR3E=; b=0Uf9DMvrSpWR2qE8qo/fyMMeXMJ6ZRb1G6UHD69/CutbtX3jTxFthcJYZq/2/5rE6l 0B6Elcc1IvzVL8Yw1itodVgwuV9mHH7nl6WIvFVzPdw4UOXOoZCIgY6P7IlegJqKhN5g diwsUANZ0kiXYtI2GH9mTghWqrrt7QVOIuXbdss+U3vSo1u3i8a5INayUvzdNZZjGj8F KZFlsWTQBnMJgjtVTZTjd234N0Si7YGewHV+A1bWB0+RxmjnlJxYS+GnoGftWigTqXeU aUrDQUqbGrVOjwReyGuZOC6fAy3pAPgUyZo0212twlIX9vjbrR3ZM06nuIudg2aBoaGG lI9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=TqNDT0u5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt21si3581293edb.569.2021.01.14.14.49.18; Thu, 14 Jan 2021 14:49:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=TqNDT0u5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730885AbhANWsM (ORCPT + 99 others); Thu, 14 Jan 2021 17:48:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730563AbhANWsM (ORCPT ); Thu, 14 Jan 2021 17:48:12 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ED65C061757 for ; Thu, 14 Jan 2021 14:47:31 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id g12so10599035ejf.8 for ; Thu, 14 Jan 2021 14:47:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2zyDFVEgfwCeZaxKwpzwQSp3ENtudOHEif4oCCEAR3E=; b=TqNDT0u54KKuZPvEJdgLc1BhKdSRJPLW1LJHvOvGAaBvBs4kHyzeqQHQo0Zyrkqjx1 lzX6EDXpknEf0RoD3BqR1cWEvy7Z8uUBHF/xWiL+0I8VBjJFwRvAS/8aoouOpLGXmRa7 R45rYHgZYLxfjqP3oOGi6u//o07lC9Rgib+kTkm+RXWb6jTjtPe2cWfwVav1JlOPw3sz 2JCzNBccFYm//zfrDFPjG6s0COtZziTcerO1SBeMPQNem6Zxuga3Xqxf/r7TbTZqa5mp Rf6D14gNJ1nRU3RODPPftA61SRAPdRRR/U1Jz4R25o4tL7ChogkPHvGilIwEnRVfJoFq F1OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2zyDFVEgfwCeZaxKwpzwQSp3ENtudOHEif4oCCEAR3E=; b=XGYC3B0Dhd8CWpGgIQyLQkjLpAY05eClhKEQNr7GsOdpKAwv62S4XZ+XWyP5EdR9OF IBH39xbGzd16Kl+H/1gmJvxl1AOBOBeEkQqWhxGDInho7w18v0PINxhdLQN0/d4ONloa NYW2woLfMZirsSZP2SEsWZU2f4bHYJ2M1Ql/soMJyldj8CuqUMKStibdAXf1Icm4PjAi BirHCCH7fOKfq+lKL0xRmUQuaZ5ToDfpp1ZS6hZMRlA4SO99XFehy38SsFaGcg3LXxup RdeyfUbyZtibnl5EBKarcwkd7bcnZW6xrpR/rt3AVlDEoVJe7KHHyEWYSt/Wv/btM+RE nFtg== X-Gm-Message-State: AOAM530P7zTSXhleY6NAxhYRw9QK9U7e2/pXVVDzbBnhv73fcoRNys9R jmUHg9tF13HxzOiLnu1qEZiiJa0VO3zpWuTZvMET X-Received: by 2002:a17:906:2e82:: with SMTP id o2mr6947496eji.106.1610664450156; Thu, 14 Jan 2021 14:47:30 -0800 (PST) MIME-Version: 1.0 References: <20210108222223.952458-1-lokeshgidra@google.com> In-Reply-To: From: Paul Moore Date: Thu, 14 Jan 2021 17:47:19 -0500 Message-ID: Subject: Re: [PATCH v15 0/4] SELinux support for anonymous inodes and UFFD To: Lokesh Gidra Cc: Andrea Arcangeli , Alexander Viro , James Morris , Stephen Smalley , Casey Schaufler , Eric Biggers , "Serge E. Hallyn" , Eric Paris , Daniel Colascione , Kees Cook , "Eric W. Biederman" , KP Singh , David Howells , Anders Roxell , Sami Tolvanen , Matthew Garrett , Randy Dunlap , "Joel Fernandes (Google)" , YueHaibing , Christian Brauner , Alexei Starovoitov , Adrian Reber , Aleksa Sarai , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, kaleshsingh@google.com, calin@google.com, surenb@google.com, jeffv@google.com, kernel-team@android.com, linux-mm@kvack.org, Andrew Morton , hch@infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2021 at 12:15 PM Paul Moore wrote: > > On Fri, Jan 8, 2021 at 5:22 PM Lokesh Gidra wrote: > > > > Userfaultfd in unprivileged contexts could be potentially very > > useful. We'd like to harden userfaultfd to make such unprivileged use > > less risky. This patch series allows SELinux to manage userfaultfd > > file descriptors and in the future, other kinds of > > anonymous-inode-based file descriptor. > > ... > > > Daniel Colascione (3): > > fs: add LSM-supporting anon-inode interface > > selinux: teach SELinux about anonymous inodes > > userfaultfd: use secure anon inodes for userfaultfd > > > > Lokesh Gidra (1): > > security: add inode_init_security_anon() LSM hook > > > > fs/anon_inodes.c | 150 ++++++++++++++++++++-------- > > fs/libfs.c | 5 - > > fs/userfaultfd.c | 19 ++-- > > include/linux/anon_inodes.h | 5 + > > include/linux/lsm_hook_defs.h | 2 + > > include/linux/lsm_hooks.h | 9 ++ > > include/linux/security.h | 10 ++ > > security/security.c | 8 ++ > > security/selinux/hooks.c | 57 +++++++++++ > > security/selinux/include/classmap.h | 2 + > > 10 files changed, 213 insertions(+), 54 deletions(-) > > With several rounds of reviews done and the corresponding SELinux test > suite looking close to being ready I think it makes sense to merge > this via the SELinux tree. VFS folks, if you have any comments or > objections please let me know soon. If I don't hear anything within > the next day or two I'll go ahead and merge this for linux-next. With no comments over the last two days I merged the patchset into selinux/next. Thanks for all your work and patience on this Lokesh. Also, it looks like you are very close to getting the associated SELinux test suite additions merged, please continue to work with Ondrej to get those merged soon. -- paul moore www.paul-moore.com