Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9479618ybi; Wed, 10 Jul 2019 11:01:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqw03Ac3NphH9L+Gv3qXXnwZ5e0WRsGEQAUboGuPaAiqkONvnsafKETF9UusVW6F6whyfbvH X-Received: by 2002:a17:90a:8c18:: with SMTP id a24mr8119479pjo.111.1562781690108; Wed, 10 Jul 2019 11:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562781690; cv=none; d=google.com; s=arc-20160816; b=bdQ/56stkMqhiz9S2m+NRM6b+YoiyIIMU6NVuqW6Od7ttPuNApXRvKvM+UuC7YvzH0 vNCTTU/IgfnZFPIstZMcsd3C1SP4ai56T/d5y6kuR7pgbaFxzoqDpoa05fiVDpLo1rHI mXqd8Mf6I4sNZb0SaEr63xTEnhMiRwBDk695kLPPIGKcxIR8J4DnrMiBCC6yazCr3pF4 0eI0xvVPNjDbuc64jfptRZyvnGYEGlGmcZ8bKOUeBo6B3KMHBVEdvJqCkU5SlH4VLzED weOii6/Sg62aItOARDorU6qBV9ERLcTAAc9YZ/aDpKe87qyzVcIBcOJdP2WuYjfGIaQJ 8olg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=a8Magxb04BgDjSI4OQWgNmwKyRSckuRhLmFaoPzvT5w=; b=hNSMqpwWl9bFyM5QpkUsSylct3LovM12hzHsMyZiEWB+5Y4wX0LQBprMRsSSlkCpfA Nf+iYSLDwM6wdt8b3k1EoikTCdmQfh19RUVRulopCs84Q2X0koVIIpRrYfdvg19IPq1y TdEIFEdRrpjzPcoiFfYw659SlPYBbT3gnXoqBW7hGRUA0QWFI/jPXlab+v4aseRVG9bP l+1O8MjC377yjam6iYUxQ9lRNdgJKGBc1JqtFcBRISU4+nfR5yySKxwZDXO7GgBwOPfE hG5Jw3u0nouA2OmHjn2ppa7OLip8APkGXUEONg36RESCmN0kj4cNI1XlD8sUGedVbwUj wPhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=RPALncVm; 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.01.13; Wed, 10 Jul 2019 11:01:30 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=RPALncVm; 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 S1727717AbfGJQtt (ORCPT + 99 others); Wed, 10 Jul 2019 12:49:49 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48956 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726957AbfGJQtt (ORCPT ); Wed, 10 Jul 2019 12:49:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=a8Magxb04BgDjSI4OQWgNmwKyRSckuRhLmFaoPzvT5w=; b=RPALncVmFFKUm7YFTHnRLEd/gj lV+8UPCdlZC4Du5HZLEZQ1hW7NnQEPr1CCoCPtgDO0XZqHQ/+XPjwD+lpQyGDaWQEyY9ngiBB8Nxi vmMVXXafwIhouY4/BtEsDjwA3xSxFil/fO6JeIyBRlJfl+BAvcRCYyH33t9xCT0examCUw5OWhStb DOInsCH0DlNkjLNmEzVBVd+j8IrFJgSkSkHmS74CD6p3w466qAHoZT3daKgjHaEyy0oL1DeD+Z5wk dwqakfkclQ9A3QbSSFoNuZfjnwJBzkkoOHHzHgz+WhuGYqg/YBDjNlmUA5sYMUA86ulAH97x4P1pk gIHK+rgg==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=[192.168.1.17]) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hlFmp-0006Qo-TU; Wed, 10 Jul 2019 16:49:44 +0000 Subject: Re: [RFC PATCH] fanotify, inotify, dnotify, security: add security hook for fs notifications To: Casey Schaufler , 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 References: <20190710133403.855-1-acgoide@tycho.nsa.gov> <4fd98c88-61a6-a155-5028-db22a778d3c1@schaufler-ca.com> From: Randy Dunlap Message-ID: Date: Wed, 10 Jul 2019 09:49:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <4fd98c88-61a6-a155-5028-db22a778d3c1@schaufler-ca.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. checkpatch allows C99 comments by default. Joe, do you recall about this? thanks. -- ~Randy