Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1147045ybi; Wed, 3 Jul 2019 10:17:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxD1JHISb+JyAdNnYA3egTW0rAAqua2hRkMFzhmEhdmqcabQXwowtST63Hct00MFvaHk/ME X-Received: by 2002:a63:61cb:: with SMTP id v194mr35911599pgb.95.1562174222388; Wed, 03 Jul 2019 10:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562174222; cv=none; d=google.com; s=arc-20160816; b=ypH6s3ii6xy05nOLQydmvRFRg90ZFsL53pVN86lzoC076v9/FEo6b/zMWBJp4RRuID Pac+ZWu0GoQ3Jj6+80cEy8K0mDyHixFowAXi6nDA3v1vod2rkBK6eFAZ0uI3EaBYMJOe GWuBt3lrDdVzMjQSNnfS4wovud+l0SBYHu9naJi8AGzAipNH61bRaWgKcQaIMR7MmXb6 TIBP4G4pFLyIf3u+HxNIXoM/zcvTMYb13iHhI/KWQ3T7vOVLaSNf4DR3s57sMFDHdvWF fwaFo1y2JkO0dS7VjS1Qs+7hMMB6wsjcmHgEzqJGKuZmO0cSjr2nX9pnwO0tbnXvJgKG wbNA== 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=lyf0KrpPnZb4TCoa9Grtt6cQowpm0sCAjz+mQJd235w=; b=Cw7QMLnVCJiZWnPr0eH5981Kk6ytLiOvZT8eMQ5ClfefPLkbEN36wXlwjzbQBR4Yd/ ZyqW47ve+fLod/THxPkIVteON1gS89qw+aSHAgQrSkfrukY2QEvIUbKA+pTrGh21Qe/K 3gObTNk8t5ylkAgmnTs0GDkc0MR9WLW9wVjVsmYweMP60oYRJNSDiOuVqd6IfyQIWTSB PqKl7cT49VUP440+pID5NLp01lq2lzt7hMn4rwvQ+NJqxDmGhsoavwamzSQkfHRHG1BF F/eflLoQrwyJyTglhGwC1Il1+1uGVtdScyHLHsvia4o6jJk6vmWnfGt1R2J1Y84m8JZ5 BjEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aXCzjGov; 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 bg2si2532000plb.263.2019.07.03.10.16.47; Wed, 03 Jul 2019 10:17:02 -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=@kernel.org header.s=default header.b=aXCzjGov; 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 S1727045AbfGCRQ1 (ORCPT + 99 others); Wed, 3 Jul 2019 13:16:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:37410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbfGCRQ0 (ORCPT ); Wed, 3 Jul 2019 13:16:26 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 BA2A721881; Wed, 3 Jul 2019 17:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562174185; bh=wAY71ePpwrDaNFkq0PM1Dpq4LuZP2NtIHZTtqRudRyA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aXCzjGovYsJE9GxJZUFPNADxn+l7zIN2HKBArp3F1hPAV1IK7L1Ern/YQCbbMW7mH li5SzyGQ3VrRvnV0s/pRv+iwUEYWuuJb6KbZ6lAhZc2mdfHSVQKi5Sz9AAoqhd4ZbB 4GBlGioG7fpE8qE7mMpzcsyL+8lfUf4ATvsaDI0g= Date: Wed, 3 Jul 2019 19:16:23 +0200 From: Greg Kroah-Hartman To: David Howells Cc: viro@zeniv.linux.org.uk, Casey Schaufler , Stephen Smalley , nicolas.dichtel@6wind.com, raven@themaw.net, Christian Brauner , keyrings@vger.kernel.org, linux-usb@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/9] Add a general, global device notification watch list [ver #5] Message-ID: <20190703171623.GD24672@kroah.com> References: <156173690158.15137.3985163001079120218.stgit@warthog.procyon.org.uk> <156173697086.15137.9549379251509621554.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <156173697086.15137.9549379251509621554.stgit@warthog.procyon.org.uk> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 28, 2019 at 04:49:30PM +0100, David Howells wrote: > Create a general, global watch list that can be used for the posting of > device notification events, for such things as device attachment, > detachment and errors on sources such as block devices and USB devices. > This can be enabled with: > > CONFIG_DEVICE_NOTIFICATIONS > > To add a watch on this list, an event queue must be created and configured: > > fd = open("/dev/event_queue", O_RDWR); > ioctl(fd, IOC_WATCH_QUEUE_SET_SIZE, page_size << n); > > and then a watch can be placed upon it using a system call: > > watch_devices(fd, 12, 0); > > Unless the application wants to receive all events, it should employ > appropriate filters. What "filter"? Who is going to use this and why a new system call for this? You can do this today with udev/netlink/hotplug/whatever so why create yet-another-way? I don't think this is a good idea unless we really nail down the api and who is going to be using it. thanks, greg k-h