Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9482201ybi; Wed, 10 Jul 2019 11:03:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJKocZvNfCEDQLIK7eO6yegDWg/AgvbygpHrif82qYMk5kIRvHkFi/so9Sn4IJdMz5adK4 X-Received: by 2002:a63:4105:: with SMTP id o5mr39715667pga.308.1562781829521; Wed, 10 Jul 2019 11:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562781829; cv=none; d=google.com; s=arc-20160816; b=zwgnKsAdIauMrrGcP5XyI0PNK7+yN/FdwqDSocuQ35s374Smr3CMN5rM27MrD2tOBJ 5CeZ29YFK9we+j7y43foVWA8BAkyIBWdYEtcQNvs8Mqas5J43Q02UJqzjVx4pb7xA1q6 yIKSE4WFOZjUCjjUlklgdzTWu9qnT/rlVLHw0Lt9R/pILSJG+96KCuxsitX9Nq6ZD7Go J0uXqLGPv82NbUuj8LVT90uI69XwAzTgrwJC/8IjmDGLh4YMe7ZxEjoChZ4RRDjHrAgF okIJPkGOTLkiiIc8egKcENZmEXP5RqvwhbAMrwnZN1uoXkMjofXG3AmU7+7qhdPlqtgQ 9mIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=W40o5XEMU4rCorrLR1kCtJCvcMpNySpd3aGGCzCSXcs=; b=BE9AtbTFZ65wJjIeGx9gRSp9G+m19atCoIe9t+x2H/1ZU1nmUGTBUdPOQ649R10cYB MwjDJStnrhQ92/40g43HOVEtmyj/46Eo860gqGNN+Yj75sV0zVZ4d9PZhVsXC8A8ny9r I8N+K48J2Qc2OkXzZdN5dtyTvTDp+QtZvU0QaotzaHx3O28nT61v6dLH6eSkSItddpvE RnuchTwTUlrbl1mnHi1Q/6eKzcjP7DHxEtTCzda/Zxt19w7i7Y2sWtQhkbOmteZyXofN JaiAJD7fBBHMI95m7ys8LTicRIlvZO7i3hv9bMyvyyRLHHCOLOZz0Dx85altymzMLQ55 z6ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=CDc1IrYj; 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 x7si2809266pfi.257.2019.07.10.11.03.33; Wed, 10 Jul 2019 11:03:49 -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=@yahoo.com header.s=s2048 header.b=CDc1IrYj; 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 S1728316AbfGJQz4 (ORCPT + 99 others); Wed, 10 Jul 2019 12:55:56 -0400 Received: from sonic301-38.consmr.mail.ne1.yahoo.com ([66.163.184.207]:39541 "EHLO sonic301-38.consmr.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727487AbfGJQzz (ORCPT ); Wed, 10 Jul 2019 12:55:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1562777753; bh=W40o5XEMU4rCorrLR1kCtJCvcMpNySpd3aGGCzCSXcs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=CDc1IrYjsWE/qtbUnYro8I/+BTfkRvDNb1wF4QcCEuSzhSuJRGjBP43cgwd4XzPJqZ0/8MHu7rmrUxh5znQbfb2xlt+YsjGitqYpcWmK+Tyq3TFBmj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13dWQwUC7BJna5Uktm0CWLoOFU2eNRDYC0J0VIvbJSVSXMpjbIG9la p_0Li7YW9ZhVpyrX.X.5oMTbFB0i_yBOcjcVxmiydYewHWvlW5SbxPZUgNqwPJUTwXrPtzr7vQyJ 1gbJBlyzS1k9AZ2kA7QL2t7q_imw0iG304ixt1LupxZWv43vopuLVFA81BKL0hwfN.t4gWsCSSdY xKpTvM45sgSl8Yc57YzE0ES8AOqXTIUTSDnR6jvH9L62yFwzDOfxP7het1iEIjz4a_wvw.g3lXt7 DzKWFeMtrPZfgoIPerrU1mZaHgQu1dMZMlmpkGYBeR4rgE_C09JjXA0ysBVQteUtuajFbzQkWWrQ Z3jF9ap1AVTcxAE30zSNlarUrK0uQAtSmltTq5jn6iIoz2hRS469T56KkAJTpqwanvTIKA8J_rMd R08uwVqI95ALIbrKG3NPGONOdXdk- Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Wed, 10 Jul 2019 16:55:53 +0000 Received: by smtp417.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 6255bb8bfa49d8f1a733324de6ae7414; Wed, 10 Jul 2019 16:55:53 +0000 (UTC) Subject: Re: [RFC PATCH] fanotify, inotify, dnotify, security: add security hook for fs notifications To: Randy Dunlap , Aaron Goidel , paul@paul-moore.com Cc: selinux@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, dhowells@redhat.com, jack@suse.cz, amir73il@gmail.com, jmorris@namei.org, sds@tycho.nsa.gov, linux-kernel@vger.kernel.org, Joe Perches , casey@schaufler-ca.com References: <20190710133403.855-1-acgoide@tycho.nsa.gov> <4fd98c88-61a6-a155-5028-db22a778d3c1@schaufler-ca.com> From: Casey Schaufler Openpgp: preference=signencrypt Autocrypt: addr=casey@schaufler-ca.com; keydata= mQINBFzV9HABEAC/mmv3jeJyF7lR7QhILYg1+PeBLIMZv7KCzBSc/4ZZipoWdmr77Lel/RxQ 1PrNx0Ua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ikcef/E7HXQf/ij Dxf9HG2o5hOlMIAkJq/uLNMvABEBAAGJAjwEGAEIACYWIQQL720fVjJTAhDNQh44pRV8jEPI EQUCXNX0cAIbDAUJEswDAAAKCRA4pRV8jEPIEWkzEACKFUnpp+wIVHpckMfBqN8BE5dUbWJc GyQ7wXWajLtlPdw1nNw0Wrv+ob2RCT7qQlUo6GRLcvj9Fn5tR4hBvR6D3m8aR0AGHbcC62cq I7LjaSDP5j/em4oVL2SMgNTrXgE2w33JMGjAx9oBzkxmKUqprhJomPwmfDHMJ0t7y39Da724 oLPTkQDpJL1kuraM9TC5NyLe1+MyIxqM/8NujoJbWeQUgGjn9uxQAil7o/xSCjrWCP3kZDID vd5ZaHpdl8e1mTExQoKr4EWgaMjmD/a3hZ/j3KfTVNpM2cLfD/QwTMaC2fkK8ExMsz+rUl1H icmcmpptCwOSgwSpPY1Zfio6HvEJp7gmDwMgozMfwQuT9oxyFTxn1X3rn1IoYQF3P8gsziY5 qtTxy2RrgqQFm/hr8gM78RhP54UPltIE96VywviFzDZehMvuwzW//fxysIoK97Y/KBZZOQs+ /T+Bw80Pwk/dqQ8UmIt2ffHEgwCTbkSm711BejapWCfklxkMZDp16mkxSt2qZovboVjXnfuq wQ1QL4o4t1hviM7LyoflsCLnQFJh6RSBhBpKQinMJl/z0A6NYDkQi6vEGMDBWX/M2vk9Jvwa v0cEBfY3Z5oFgkh7BUORsu1V+Hn0fR/Lqq/Pyq+nTR26WzGDkolLsDr3IH0TiAVH5ZuPxyz6 abzjfg== Message-ID: <83818a21-ef3d-8c47-dd95-82272ca85622@schaufler-ca.com> Date: Wed, 10 Jul 2019 09:55:52 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/10/2019 9:49 AM, Randy Dunlap wrote: > On 7/10/19 9:38 AM, Casey Schaufler wrote: >> On 7/10/2019 6:34 AM, Aaron Goidel wrote: >>> @@ -3261,6 +3262,26 @@ static int selinux_inode_removexattr(struct dentry *dentry, const char *name) >>> return -EACCES; >>> } >>> >>> +static int selinux_inode_notify(struct inode *inode, u64 mask) >>> +{ >>> + u32 perm = FILE__WATCH; // basic permission, can a watch be set? >> We don't use // comments in the Linux kernel. >> > I thought that we had recently moved into the 21st century on that issue, > but I don't see it mentioned in coding-style.rst. Maybe we need a Doc update. Really? Yuck. Next thing you know M4 macros will be allowed. > > checkpatch allows C99 comments by default. > Joe, do you recall about this? > > thanks.