Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp825603pxb; Thu, 5 Nov 2020 14:09:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhxT5VVJqL/7pMEVrRHKpwRLz2/J1vviJrqwc2cD2xaa1P9QlRw4dsTzUSNrf5E8Sv4Gpt X-Received: by 2002:a50:abe6:: with SMTP id u93mr4703554edc.277.1604614193949; Thu, 05 Nov 2020 14:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604614193; cv=none; d=google.com; s=arc-20160816; b=hIHmEKyJJ20h2QImqmL5TRZ2TUqlH7oaYYO0evimKSuaWK+R0tmUEZvSboCfQ+v/1g 9KY05y81KM7IPELGk/kCeDqnAr5tztk5G04HEjWZLuXtv29SPj4kNF6g8EfjnN49Gt3R gnofvMl2h740rcXWkHCa06VMvbsuraPU5mbnizfDxqW1sJXPjKPnuu5+CqlGNzOvZt1S 8B9Amuv1ZAiu/B9/00MRvMEBwHZMflsYyZF2pj4Vxyl86l0x3FnUBQNLkpLd9sGOa7Xr k7fviFWL5yf8QpBdSz6frrTyL6+ysgv/0nttqnJoS3Bnq5UVHbUn7ADdVwn9i/aU535V pX5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DfLX0P6QnMH1QfGz+ioVSo0thgh2SeehNaHy72qJfT8=; b=mlP2QSeWF6oqyIiseSChxm/Dni4npd9FoV2IHNJBjWgwLD/imjENhuzHyQTLE68wUJ KVugW3+ZTFG1XxDDHbwM1sgPGfPsQyj15WS0gV47fCjH6OXfCrr1F/hbM3FMLq/5Kr/y X4Szd0F07k6GOxwzaPx+nLks1TZfGpGTakR1khAt0FLBshPtz6GkdbVCn+jzK8cIVRE2 Bp3ZbZdP5dQkm4+p2dsC2ZtN7ink/qiauxSY+LsB1cL9O9U9+fC47K9OrwbF5M8tWOvO +JuRX7Ra3cUNNf6VfMnXGmhk9V6IjyZVG1CkeNfGQe16D2r3EKw+SvUMXzDrorE/BaUt LTyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jNn8K5XK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si2363789edq.44.2020.11.05.14.09.31; Thu, 05 Nov 2020 14:09:53 -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=@kernel.org header.s=default header.b=jNn8K5XK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732591AbgKEWHu (ORCPT + 99 others); Thu, 5 Nov 2020 17:07:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:33808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732517AbgKEWHt (ORCPT ); Thu, 5 Nov 2020 17:07:49 -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 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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