Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3227823pxb; Tue, 12 Jan 2021 09:19:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3u3gniH+wfIRA8EDJK4sOhqs9bNT8kbZSgWP6t6tsZrEeIvFm0xvpXkYQZWEjkPug1MKk X-Received: by 2002:aa7:cccf:: with SMTP id y15mr162960edt.112.1610471949533; Tue, 12 Jan 2021 09:19:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610471949; cv=none; d=google.com; s=arc-20160816; b=x4QN7TMmbTRsf/USipZNBjKl6cjs5iDy4izu7+kz5ZHDWgtVEBmJ/aCyCjDEvjV1OC XbCBGnjM2U4FORXx7+PyXPrlGRl+g/URQNiWjc5tVNYadyWV70LMS8X/e7xMmwtX4sbp MEdyZE/uflTiAnDGImdfjbe8GXX+baV0bdip0K73iIOk2RWLUaDt6eRdc3rNB8oNOEpC pQapjtr96ChfjCa4UBFI3vsVLQgNOcG9Ylj0/tuadR7GLygDRQ5CkQI1hddA3fpnTo8r NDWsYagbgHUPAqY7AjVmAhAMdxzOQlafah/92vzzeEZ/T4wNvVIdI+DXE6zre34sjqs/ 0vBQ== 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=tlN+SR1GxJrZealRnBj4IK5rirhuxkSGuR3XMgHjbM8=; b=RmOwqRpshHJcrXm5HIwkL0ofkUF59X6w1Adg7DkDXF8VUJAh3YgL3CrbHviEGHwKGl bwBtQ4LvpeTXihoR66Tvhp+M3qoSbohdbH9XHczWPKJnbr57jcDmivwPBBOF0VdwyTlw OlpOXf/VPgaPxGsi7e1c4U/CeymOGPP471ZDx+vj9V+zGMDKsC3ESauJuLgdamDm8upU 8ISjdt7GkjiRP62ZpmFHf3oks+ZKMCcCmUM7PDqJNVsEarFpcKVATuAL2ZrIRA6iww2+ RS62AD9mdp8wQ0IIN26kuggbfYD09eAJ6o1mJNJX3Pz9umvMYOxQQls9L6ZUdQ2sEtpL E2hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=2JSJLgjj; 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 v8si697622edc.382.2021.01.12.09.18.45; Tue, 12 Jan 2021 09:19:09 -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=2JSJLgjj; 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 S2390500AbhALRQT (ORCPT + 99 others); Tue, 12 Jan 2021 12:16:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390525AbhALRQS (ORCPT ); Tue, 12 Jan 2021 12:16:18 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B3FBC061794 for ; Tue, 12 Jan 2021 09:15:37 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id lt17so4625394ejb.3 for ; Tue, 12 Jan 2021 09:15:37 -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=tlN+SR1GxJrZealRnBj4IK5rirhuxkSGuR3XMgHjbM8=; b=2JSJLgjjYoRmh4WKyhvwd7P5EYDVodgao689juYrDTUOryxHHdbBFMvk6F49hQeANI 0ncsHC6TWKiQttECpHZrIyibJPz+veA90aIDcBmWL8CoCxSzcbVkT+1W9ZlazKYMz/h2 1U+NJdpU2NaPSMv/3Vcpq2YAuJEHuqV6eG6jOOiBvDIozHbxI3BklrmCl45uL2220jUW ESl6nOXuVqKatMmHbrqSdiXJkN9Pim4J5Ue8lUTHALCuTETNbMgXoLGGXl/x8o30mu7E c4TyKsipejVO9TqPCAFj2Ot6gBV0ui2tytc4Nb1V65qr081j32kxNtvVrCJ0L/mppkvw eXHw== 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=tlN+SR1GxJrZealRnBj4IK5rirhuxkSGuR3XMgHjbM8=; b=fUPxnCp6L+NpRWoeX6s8coHoi110pEdOjvWOZs4W/4d6Lbph+2kA3v9+J/Yjzy8hJ4 4WV5xo3HXzFEaG9Dj+EtHdcXM5epHwiPhEKCQP5A986C+6Q3s/0RDiTcE48ng3RT6uG2 J92E/IrcwQNXgEfE9W3LfeWsaZErNxP3OWxaMs5+rw1zrQ+YmlWTBekgaPahN+pxoiFr GTQOxBnB/9GddtwfFW86a7e8zksMNeD6Be+Tn0TWthFN9ycu7koC7aS+LFIlNzPt9ab8 NpQBPwzf0sxFvfw8Cf1zRJGa1szeoDpJ9R1PewD8tTiRAVnd0SjssEYkMx0B4dypYg8G qBIg== X-Gm-Message-State: AOAM532jSdV8ePnG1RolObl9xGJYdXCQ0ZFu+EsDosgquluqCFrolPqW 566wuVpzHE05UrKnPOa/2QdmCbv5KohuurtupTAV X-Received: by 2002:a17:906:1393:: with SMTP id f19mr3814197ejc.431.1610471735707; Tue, 12 Jan 2021 09:15:35 -0800 (PST) MIME-Version: 1.0 References: <20210108222223.952458-1-lokeshgidra@google.com> In-Reply-To: <20210108222223.952458-1-lokeshgidra@google.com> From: Paul Moore Date: Tue, 12 Jan 2021 12:15:24 -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 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. Thanks. -- paul moore www.paul-moore.com