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 99B19C388F2 for ; Fri, 6 Nov 2020 17:45:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 499CB22203 for ; Fri, 6 Nov 2020 17:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604684730; bh=Mtx+hFU31M02TKQ5DcxfpDTcYIT2hQlVQVC2Rv/oUjk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=XSUuiXM8zHAfeVS5wQECzn6O6Am/l5Mp/UyVMUPd/n/K1WcGuEuGY4U0m/St0NFel fVYrZ/xNWX21E8VA1d9gIILf785xeP/sTWY8b8n0Q8l3iG/uysqRdq1fupgNzwZt+x QPpYkrBaSyiWNUmgLQJa4kBNvRz8K+oKPG80iOjY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727892AbgKFRp2 (ORCPT ); Fri, 6 Nov 2020 12:45:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:53254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727626AbgKFRp1 (ORCPT ); Fri, 6 Nov 2020 12:45:27 -0500 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (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 99B542151B; Fri, 6 Nov 2020 17:45:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604684726; bh=Mtx+hFU31M02TKQ5DcxfpDTcYIT2hQlVQVC2Rv/oUjk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qeMsm1QArTp3WPXKj6cD8UKxfEv3ll2IOnu+E/CEDxXb4peyc+IRWt+ObJWzc1LOT xVmVdTaRA22CYhRAbExV0Kpl1RhlfFP/+Z9eJ53hfGA140BTmHfxJ47SPNNjLNixcw WzE0buNDHeTOolCkwwlAedj2IeeTK5YzhIpH2Me8= Date: Fri, 6 Nov 2020 09:45:22 -0800 From: Eric Biggers To: Lokesh Gidra Cc: Andrea Arcangeli , 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, linux-mm@kvack.org, Andrew Morton , hch@infradead.org Subject: Re: [PATCH v12 1/4] security: add inode_init_security_anon() LSM hook Message-ID: <20201106174522.GB845@sol.localdomain> References: <20201106155626.3395468-1-lokeshgidra@google.com> <20201106155626.3395468-2-lokeshgidra@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201106155626.3395468-2-lokeshgidra@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 06, 2020 at 07:56:23AM -0800, Lokesh Gidra wrote: > This change adds a new LSM hook, inode_init_security_anon(), that will > be used while creating secure anonymous inodes. The hook allows/denies > its creation and assigns a security context to the inode. > > The new hook accepts an optional context_inode parameter that callers > can use to provide additional contextual information to security modules > for granting/denying permission to create an anon-inode of the same type. > This context_inode's security_context can also be used to initialize the > newly created anon-inode's security_context. > > Signed-off-by: Lokesh Gidra Reviewed-by: Eric Biggers