Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6593787ybi; Wed, 5 Jun 2019 03:29:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsMRkH8I/XTpHR2L37YIOaOsJW3nA47232BP85EX5RSVOFWAWPwbuxztmnjUDP2J1B1okZ X-Received: by 2002:aa7:818b:: with SMTP id g11mr3011502pfi.207.1559730540992; Wed, 05 Jun 2019 03:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559730540; cv=none; d=google.com; s=arc-20160816; b=a5l19sGveDqXCLXDj0y74mePHuy5FDZsWew5UpvXeBVFTd5TV8lzLSblGce3tu0Mfo sDCr2A5Kq2FDuDA4d4A1xXA5krC/Lxrfk8Wlbna3uYrwxcPyzLJlsB1SDugtvr275qcC aDnkAtZX+m/d9pgbW6a0xz+voPTzHhd8mmZbnmJfxsKFLb7CMvoiOh+i76RKOJlzQgpO 8onSw3ynNcvc8I/xSoVoxuD5UNEUrIeKwH6wv7zQMBgvVLG8WmTt9sBgZDdkOIBhcCca y+wKguxqvvmTvfon4JTiPCWnNJ/SbQGJnpvWaIBQ237THzCNNsZciM79Zp/dAcGPDhX+ /FTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=M1ULtVTBaRjJ1PHd8skCpbTVO6zbbI/pi1e0gXp7yc0=; b=fofLDxC08kALxGPWz9ia3iaBW9XyLHZZ4ffxzF3pEH5hm99Apjaf0G2gOw+Zg0jZna Wy4Sb4xFoztrfho1DKIFlAIjXAnc1Lo6Uj0Aa3L3AN7+pzLSGbMZwPX6YX12qpNohs+D 3yaXEAxe8g4Faj9K20mBzuX4IE6mTJgbwlUmOlixaCxp5sVwPfAVWDKxRZwrXxzHdV7z H+PF3XaeEnqVaXwz1PzF/QkaUtpK/9UqKtsYChU11Ai5eOYCNYVX3WBSuWG/8DWRoxLv Nt1cZ97l+I3HTqRe/9RbqfPhvGbsFhcxaiNFZHKvoUADMpf+jiMwDdSZIqkkGbuIrcLf tIWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mbobrowski-org.20150623.gappssmtp.com header.s=20150623 header.b=jAQ7fFrG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z17si24847829pgv.485.2019.06.05.03.28.42; Wed, 05 Jun 2019 03:29:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mbobrowski-org.20150623.gappssmtp.com header.s=20150623 header.b=jAQ7fFrG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727206AbfFEK0W (ORCPT + 99 others); Wed, 5 Jun 2019 06:26:22 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43483 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727112AbfFEK0V (ORCPT ); Wed, 5 Jun 2019 06:26:21 -0400 Received: by mail-pg1-f194.google.com with SMTP id f25so12144911pgv.10 for ; Wed, 05 Jun 2019 03:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mbobrowski-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=M1ULtVTBaRjJ1PHd8skCpbTVO6zbbI/pi1e0gXp7yc0=; b=jAQ7fFrGO0TepAjaeIU8cFqLQxHx3KjiTOlpJHN1i0lpGgHHU5xkuYBwY5v31GkgKL pJPivwXOu550agdJIYhlPftZMBzP0X7kfNUgAK1FayYvt8LHGpXhis876t6/AELoj4Ix LteoO3odnsLY/gznyLnkIIRH4x4bn6QYccT5RQmKC05p9Jje9UPyLlgJehd5351xQC5m EK+mjbCGXLppVyRoCHYSC6lUQ61Z63AqXSjp/BCcL7MK3CCKVljkD2p+chMO+3wCNhU/ eX7Dv99osaWfMFdlpwiGXyGvPW8KPEZ7RaaNjMwyuc8wLKK+LFyoZXxOZqBqvfiQV3jw U0zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=M1ULtVTBaRjJ1PHd8skCpbTVO6zbbI/pi1e0gXp7yc0=; b=rcQ1hIh4ZpWL1QJT5PZKHe3oJREjeRhA81xHcsbCcGvas9tW8vefuynEbkFMN6EZRT 4sXoZTOCv9znprS18EMuYetw11OUtWhfM6DVi/J9pzUnbaUOEoVxlYEtxoFaoZ8GXy4v dXMlrJC9m0IufZY1WBxZbzgHVtOVHEV90adWY/QbMGxsxgaWovWmtdlyTpfp7om6MFxk eJyTuNdWMsJgBIX4JskyFvtDOpMHLZchwXdbejTvWqlhPPVukENSXIceNCzwE6f5Y9S4 vn52mFocSTkasNKzAM6KsZnG0P2m2MNYb2GaJD8IDgcUZAefBbtUPssWb/4/N7h5z34P jVIQ== X-Gm-Message-State: APjAAAX9IgEEalyHgNFhU6kA+loN2e0HBokSWrndpjsfl/uLW9hjFYiU BoZNq/DT5k8TDYDenhGvSYzE X-Received: by 2002:a63:4e07:: with SMTP id c7mr3389206pgb.350.1559730380269; Wed, 05 Jun 2019 03:26:20 -0700 (PDT) Received: from poseidon.Home ([114.78.0.167]) by smtp.gmail.com with ESMTPSA id i5sm14705123pfk.49.2019.06.05.03.26.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Jun 2019 03:26:19 -0700 (PDT) Date: Wed, 5 Jun 2019 20:26:13 +1000 From: Matthew Bobrowski To: Amir Goldstein Cc: Christian Brauner , Jan Kara , linux-fsdevel , linux-kernel Subject: Re: [PATCH] fanotify: remove redundant capable(CAP_SYS_ADMIN)s Message-ID: <20190605102611.GA4546@poseidon.Home> References: <20190522163150.16849-1-christian@brauner.io> <20190523095506.nyei5nogvv63lm4a@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 23, 2019 at 01:25:08PM +0300, Amir Goldstein wrote: ... > > > > Interesting. When do you think the gate can be removed? > > > > > > Nobody is working on this AFAIK. > > > What I posted was a simple POC, but I have no use case for this. > > > In the patchwork link above, Jan has listed the prerequisites for > > > removing the gate. > > > > > > One of the prerequisites is FAN_REPORT_FID, which is now merged. > > > When events gets reported with fid instead of fd, unprivileged user > > > (hopefully) cannot use fid for privilege escalation. > > > > > > > I was looking into switching from inotify to fanotify but since it's not usable from > > > > non-initial userns it's a no-no > > > > since we support nested workloads. > > > > > > One of Jan's questions was what is the benefit of using inotify-compatible > > > fanotify vs. using inotify. > > > So what was the reason you were looking into switching from inotify to fanotify? > > > Is it because of mount/filesystem watch? Because making those available for > > > > Yeah. Well, I would need to look but you could probably do it safely for > > filesystems mountable in user namespaces (which are few). > > Can you do a bind-mount and then place a watch on the bind-mount or is > > this superblock based? > > > > Either. > FAN_MARK_MOUNT was there from day 1 of fanotify. > FAN_MARK_FILESYSTEM was merged to Linux Linux 4.20. > > But directory modification events that are supported since v5.1 are > not available > with FAN_MARK_MOUNT, see: > https://github.com/amir73il/man-pages/blob/fanotify_fid/man2/fanotify_init.2#L97 > > Matthew, > > Perhaps this fact is worth a mention in the linked entry for FAN_REPORT_FID > in fanotify_init.2 in addition to the comment on the entry for FAN_MARK_MOUNT > in fanotify_mark.2. Sorry, a little late to the party... The fact being that directory modification events that are supported since v5.1 are not available when used in conjunction with FAN_MARK_MOUNT? -- Matthew Bobrowski