From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 390C9C55178 for ; Wed, 4 Nov 2020 20:36:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E5ADA206FA for ; Wed, 4 Nov 2020 20:36:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604522197; bh=gdHLBewM29xjdysVQ8k+xSAiNUOH+jGJ/NlCzBTnS5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=rKmL6mf8raPShP7OptvuDERFIUoC/6pF5jwSniwRCqHIrzl2vemHOdcKc7UpKxmej x6836G4X+9esRmy5MkOi876dYv6fwMx6C2MlfZzcTC9ECpZcbZqIcloUOW1u+bnKRr F4UNSngLMYqKFxNLCmqTrm6rc2CPY51WWgfJ8SIQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731902AbgKDUgg (ORCPT ); Wed, 4 Nov 2020 15:36:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:56926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbgKDUgf (ORCPT ); Wed, 4 Nov 2020 15:36:35 -0500 Received: from gmail.com (unknown [104.132.1.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 313D9204EF; Wed, 4 Nov 2020 20:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604522194; bh=gdHLBewM29xjdysVQ8k+xSAiNUOH+jGJ/NlCzBTnS5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mjbu9PJOOA1g+sP+WoGDsZOisFRCL6Bz49sDkHg5Q51d8QnC/ezomCXxjBfASWFpS 8HbWnCFyy53x9+hMyhljnxrXpjyrEsSuGBeYrESOR9KMRfbsnF8ByzS2zZQfHASiDl O4MrwwWMDwbZc56kmz7ZYnmEsySsj0pyebWkr0yo= Date: Wed, 4 Nov 2020 12:36:31 -0800 From: Eric Biggers To: Lokesh Gidra Cc: Alexander Viro , James Morris , Stephen Smalley , Casey Schaufler , "Serge E. Hallyn" , Paul Moore , Eric Paris , Daniel Colascione , Kees Cook , "Eric W. Biederman" , KP Singh , David Howells , Thomas Cedeno , Anders Roxell , Sami Tolvanen , Matthew Garrett , Aaron Goidel , Randy Dunlap , "Joel Fernandes (Google)" , YueHaibing , Christian Brauner , Alexei Starovoitov , Alexey Budankov , 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, nnk@google.com, jeffv@google.com, kernel-team@android.com, Daniel Colascione Subject: Re: [PATCH v10 3/3] Use secure anon inodes for userfaultfd Message-ID: <20201104203631.GD1796392@gmail.com> References: <20201011082936.4131726-1-lokeshgidra@google.com> <20201011082936.4131726-4-lokeshgidra@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201011082936.4131726-4-lokeshgidra@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 11, 2020 at 01:29:36AM -0700, Lokesh Gidra wrote: > From: Daniel Colascione > > This change gives userfaultfd file descriptors a real security > context, allowing policy to act on them. > > Signed-off-by: Daniel Colascione > > [Remove owner inode from userfaultfd_ctx] > [Use anon_inode_getfd_secure() instead of anon_inode_getfile_secure() > in userfaultfd syscall] > [Use inode of file in userfaultfd_read() in resolve_userfault_fork()] > > Signed-off-by: Lokesh Gidra > --- I'm not an expert in userfaultfd or SELinux, but I don't see any issues with this patch, and the comments I made earlier were resolved (except for the patch title which I just pointed out -- it should have "userfaultfd:" prefix). So feel free to add: Reviewed-by: Eric Biggers