Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5429444ybi; Wed, 12 Jun 2019 02:19:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9/bh+TKfcZrZHhqZuBEKQRd7x6s5BH4Xhjf7ZJ2yAjopKt2WGyrB2INfwe2Vb753V3g7/ X-Received: by 2002:a17:90a:2224:: with SMTP id c33mr31696759pje.22.1560331148520; Wed, 12 Jun 2019 02:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560331148; cv=none; d=google.com; s=arc-20160816; b=W589tfCrIebTHtE3TZlA0TPFNZ2/nGQEC1v9qkeSErgzcYhD4AsdVXsYncyAK85J/n drduvCcLeJh+Qgjy8kz5M9j1EcldhW2gd47FnztWCkYzK6QFwZ87BBskSI+yk83I9Vbd xkbw0xMBksYzcVZcKZ7ZMnJQRXysUDuGlEW9wlwaC4bNOsuSeYjwJkGe84+A5RyVgJV+ z41qnne3DMmccmwj+puutIPefHTRS/zQ25bQz7msurcSwUdh/fJCkQaNglVLI79xq1XZ 30JTGISgvNODBVvMtRjDFVYbfJ+Q1yrfFOfbHE9qUAr7EYiVSaU+E/FMHuRMYm0EtkmC h/fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization; bh=LypreIwGpGtEJiDvA96djHHo1xdns3XmTafZuTFD4Q4=; b=o1HE9dvSasiEOPvtW/cPv1i3yfeZokpolOq1tpsTWuBfG6CS+fzR6mT+1Cs4HzGD8l Hli7dmhE5TAKTlrSOAx0oAIpGQAFVSeQrM80/8uMcvviHwEprQ8zCXurfGgV5tVHmNwh a0/3K6n7Ne6mAzJCF3yKhU2lZWyLwHSzGCqglqInfCqSQfgoRY7lHlRXkBNEIrvBhSlb gHtZwvh6QXfMOrirJ0oukb+SSzoPq0xJ8HD6ZoCZvrnnqNipIAnrhNtbLKERU1QqCn9e FGpSEkIcvx4DJTmVC3oguSF6bWEPaXt4SF1HySrsSamJFUqARt7KSITnKj5Pi6bFpUij xahA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si4782303pjl.15.2019.06.12.02.18.52; Wed, 12 Jun 2019 02:19:08 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437436AbfFLIz0 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 12 Jun 2019 04:55:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60220 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437421AbfFLIzZ (ORCPT ); Wed, 12 Jun 2019 04:55:25 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A2ADC30832C8; Wed, 12 Jun 2019 08:55:13 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-109.rdu2.redhat.com [10.10.120.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 714AE46; Wed, 12 Jun 2019 08:55:03 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <155991702981.15579.6007568669839441045.stgit@warthog.procyon.org.uk> <0cf7a49d-85f6-fba9-62ec-a378e0b76adf@schaufler-ca.com> <4b7d02b2-2434-8a7c-66cc-7dbebc37efbc@schaufler-ca.com> <25d88489-9850-f092-205e-0a4fc292f41b@schaufler-ca.com> <97BA9EB5-4E62-4E3A-BD97-CEC34F16FCFF@amacapital.net> To: Stephen Smalley Cc: dhowells@redhat.com, Andy Lutomirski , Casey Schaufler , Andy Lutomirski , Al Viro , USB list , LSM List , Greg Kroah-Hartman , raven@themaw.net, Linux FS Devel , Linux API , linux-block@vger.kernel.org, keyrings@vger.kernel.org, LKML , Paul Moore Subject: Re: [RFC][PATCH 00/13] Mount, FS, Block and Keyrings notifications [ver #4] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12979.1560329702.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Wed, 12 Jun 2019 09:55:02 +0100 Message-ID: <12980.1560329702@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 12 Jun 2019 08:55:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stephen Smalley wrote: > 2) If notifications can be triggered by read-like operations (as in fanotify, > for example), then a "read" can be turned into a "write" flow through a > notification. I don't think any of the things can be classed as "read-like" operations. At the moment, there are the following groups: (1) Addition of objects (eg. key_link, mount). (2) Modifications to things (eg. keyctl_write, remount). (3) Removal of objects (eg. key_unlink, unmount, fput+FMODE_NEED_UNMOUNT). (4) I/O or hardware errors (eg. USB device add/remove, EDQUOT, ENOSPC). I have not currently defined any access events. I've been looking at the possibility of having epoll generate events this way, but that's not as straightforward as I'd hoped and fanotify could potentially use it also, but in both those cases, the process is already getting the events currently by watching for them using synchronous waiting syscalls. Instead this would generate an event to say it had happened. David