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 0C43FC2D0A3 for ; Fri, 6 Nov 2020 17:45:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6CA3822203 for ; Fri, 6 Nov 2020 17:45:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="qeMsm1QA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6CA3822203 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AB7BE6B006E; Fri, 6 Nov 2020 12:45:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A699C6B0072; Fri, 6 Nov 2020 12:45:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 90A266B0073; Fri, 6 Nov 2020 12:45:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0161.hostedemail.com [216.40.44.161]) by kanga.kvack.org (Postfix) with ESMTP id 617B56B006E for ; Fri, 6 Nov 2020 12:45:28 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D47EF362A for ; Fri, 6 Nov 2020 17:45:27 +0000 (UTC) X-FDA: 77454720294.24.lip39_32164f9272d4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id B29CA1A4A5 for ; Fri, 6 Nov 2020 17:45:27 +0000 (UTC) X-HE-Tag: lip39_32164f9272d4 X-Filterd-Recvd-Size: 3570 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Fri, 6 Nov 2020 17:45:27 +0000 (UTC) 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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