Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2336030ybi; Thu, 4 Jul 2019 09:05:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXD6VIF1EVt9F0YhhKz79oaPDFJAMLRshQsABpwIurJj1AyRDgMAN7F51Mr8nuWjjqazEQ X-Received: by 2002:a63:4518:: with SMTP id s24mr45137746pga.123.1562256341550; Thu, 04 Jul 2019 09:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562256341; cv=none; d=google.com; s=arc-20160816; b=uxA2x0FxxOuijY4D4HC5lfs3tL8U3HkrWQw+Qfz3j5EpEmvj3CFJfgdSPXN4eALP4B cvX/jVKyN6ncuXL56hZZ/Jundd1aE/BeBX3pjVh9uGHEi2AIPDJUEdWCn0YOCHCXO7nD O01mbydWkpENC1wHIjyEsLheo3+fcIxUA23WJh5wS3loBEFdKXSuXsgN8s/Zold9d/cH tc7S9FoM3+FDDce0An4qyk4af64dQ9Gug//1LZ70+oxdvkWiCJQD9pzXtK/s8V5J3z9i /uF5qrrC3YMwiA7QvND8FhL4osLzfWrBlPT535h25iSRym6Mrhe8lBqYbCP3vfgkGh/H MQDg== 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-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=sAGdnUqvzzKgVrZLCIuMouTEZeD3JyRxab6ajEyETZA=; b=sJjc9HSdg1/HQB6iwCqSJs7h0PPHBSiyJnmZLH15gMs4r3aua2iRtfRF/l+atcha9x E7HwaUvq4dIvVplDAipibIEg3I1+s+auK4+tsk0Lfxax8My1e0bPENkWCh7meZPOp7Me fFjeIdXaS9XpgpVyV1b1et92CxEmjKl0cK/lYlfWIFSz8Vvvp4fxQ4ODPqK8mlzbB7Br ow8m/src0A0VZWTb1afkIrGW802GMcY192qcbN4dJDIRqw0OcD33skWw5+tkczmZh8TY m79gaNR3hNmwVxO/Wp2L98beP6HUxqvGsp+HY94iQc3Yg1r3bkq/uAYvLd9pEldM6TD9 h+rA== 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 v13si5439819pgr.282.2019.07.04.09.05.26; Thu, 04 Jul 2019 09:05:41 -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 S1726881AbfGDQEv (ORCPT + 99 others); Thu, 4 Jul 2019 12:04:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58875 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbfGDQEv (ORCPT ); Thu, 4 Jul 2019 12:04:51 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4784C058CA8; Thu, 4 Jul 2019 16:04:39 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-9.rdu2.redhat.com [10.10.120.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE1C37D958; Thu, 4 Jul 2019 16:04:26 +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: <20190703190846.GA15663@kroah.com> References: <20190703190846.GA15663@kroah.com> <156173690158.15137.3985163001079120218.stgit@warthog.procyon.org.uk> <156173697086.15137.9549379251509621554.stgit@warthog.procyon.org.uk> To: Greg Kroah-Hartman Cc: dhowells@redhat.com, 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] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10294.1562256260.1@warthog.procyon.org.uk> Date: Thu, 04 Jul 2019 17:04:20 +0100 Message-ID: <10295.1562256260@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 04 Jul 2019 16:04:50 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Greg Kroah-Hartman wrote: > Don't we need a manpage and a kselftest for it? I've got part of a manpage, but it needs more work. How do you do a kselftest for this when it does nothing unless hardware events happen? > > + u64 id = 0; /* Might want to allow dev# here. */ > > I don't understand the comment here, what does "dev#" refer to? This is really for mount subtree watches, so I'm removing it for now. The reason it's there is because a mount object may have multiple watches, but each watch is set on a dentry within that mount, and it doesn't have to be the same dentry each time. The queue is shared between all the dentries, and the ID is used (a) to label them so that they can be manually removed, (b) to match them to each dentry when the notification is being propagated rootwards along the tree and (c) to avoid adding another field to struct dentry. David