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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 26D43C55178 for ; Thu, 5 Nov 2020 22:07:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 74B7020739 for ; Thu, 5 Nov 2020 22:07:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="jNn8K5XK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74B7020739 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 7B7236B01A8; Thu, 5 Nov 2020 17:07:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 766446B01B3; Thu, 5 Nov 2020 17:07:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6565A6B01F0; Thu, 5 Nov 2020 17:07:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 393976B01A8 for ; Thu, 5 Nov 2020 17:07:51 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C912A180AD817 for ; Thu, 5 Nov 2020 22:07:50 +0000 (UTC) X-FDA: 77451752700.19.tank90_4f0771f272cd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id A0E041AD1B3 for ; Thu, 5 Nov 2020 22:07:50 +0000 (UTC) X-HE-Tag: tank90_4f0771f272cd X-Filterd-Recvd-Size: 3696 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Thu, 5 Nov 2020 22:07:50 +0000 (UTC) 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 466352078E; Thu, 5 Nov 2020 22:07:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604614069; bh=178huzaFZ/hAY5sYLanFhkUTFNiQNJfZdx7VDjMneC0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jNn8K5XKu30RZm07Z9rmMLpJnTPLp3iYQl7n6KByggBgD6eZc83m8qrNMdo2DKd5I WYq6t+0VFTFz3CbRrj/XbZ5bHumeWHXdz5ugvtxA/L8lFwt0fAQrULxT/HK2YwM/eP FRs44fyFm7R4UDIqefkUUCi3IxmH3d7AcwGltpgI= Date: Thu, 5 Nov 2020 14:07:45 -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 v11 1/4] security: add inode_init_security_anon() LSM hook Message-ID: <20201105220745.GB2555324@gmail.com> References: <20201105213324.3111570-1-lokeshgidra@google.com> <20201105213324.3111570-2-lokeshgidra@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201105213324.3111570-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 Thu, Nov 05, 2020 at 01:33:21PM -0800, Lokesh Gidra wrote: > This change adds a new LSM hook, inode_init_security_anon(), that > will be used while creating secure anonymous inodes. Will be used to do what? To assign a security context to the inode and to allow/deny creating it, right? > > 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. It looks like the hook also uses the context_inode parameter to assign a security context to the inode. Is that correct? It looks like that's what the code does, so if you could get the commit messages in sync, that would be helpful. I'm actually still not completely sure I'm understanding the intent here, given that different places say different things. - Eric