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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 812A5C10F13 for ; Sun, 14 Apr 2019 19:26:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9032D2084D for ; Sun, 14 Apr 2019 19:26:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726283AbfDNT0M (ORCPT ); Sun, 14 Apr 2019 15:26:12 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:51946 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725797AbfDNT0M (ORCPT ); Sun, 14 Apr 2019 15:26:12 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hFklN-0002xR-Ne; Sun, 14 Apr 2019 19:26:01 +0000 Date: Sun, 14 Apr 2019 20:26:01 +0100 From: Al Viro To: Amir Goldstein Cc: Jan Kara , linux-fsdevel , LSM List , "Serge E. Hallyn" , James Morris , Miklos Szeredi , Matthew Bobrowski , Kentaro Takeda , Tetsuo Handa , John Johansen Subject: Re: fanotify and LSM path hooks Message-ID: <20190414192601.GR2217@ZenIV.linux.org.uk> References: <20190414163950.GQ2217@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sun, Apr 14, 2019 at 09:51:38PM +0300, Amir Goldstein wrote: > But the truth is I would much rather that users have a way to mark > a subtree root and ask fanotify for events under that subtree. > As a matter of fact, I have some private POC patches that allow users to > setup a mark on a "subtree root" dentry, which really marks the super block > and keep a reference to the dentry. Than every event on that super block > is filtered with is_subdir() against the marked dentry. And that is_subdir() is protected by what, exactly? And what happens if you have many such dentries? Or, for that matter, what happens if that dentry gets invalidated?