Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1464264rwn; Thu, 8 Sep 2022 21:19:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4kfY3CNOEorjxMMNRMRxUqoKA4C00RCv6lo9VdxfMtzMuMkJU6NA+fIKP+35seCeCwJZ8+ X-Received: by 2002:a63:4522:0:b0:431:25fd:544b with SMTP id s34-20020a634522000000b0043125fd544bmr10929798pga.595.1662697162139; Thu, 08 Sep 2022 21:19:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662697162; cv=none; d=google.com; s=arc-20160816; b=KegslMO2F5DtNVfCE4Jr1d6kTqgo/eEt7JZQ80gL3rosC71v6as/tCa2W90yg+pxCG 01Ll729Spxm9CtzV7M0kMfOgUfqs+XUrnUDaRza2Fft4IkJAuQXggPk4L5YxHQXgHaQ7 7PPnq6Bz1UcDeXgHZMDwxTwHWacHAdYZC/jr/cCX3EGc2hID33va4ql1ODgFUDf30/C3 U1D7nET+Mei9H9AwX5u43khY196C0QnArNO3S7mklUaAXGGGB9vCyzzGmgpcsTOFyfCF 6s21GaItiCIkXDDmHYUlLDZvUZOUB1OxEvQrZacSN5NombCOcqH7XUR42g1IaTqak2V4 w6lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=slFM8Vfq1w8ltNdHtnQPBjam8+h5JdYTs6yxTf4F8W8=; b=Oybcef3/jxXYS7qsUeMud5bBP65rOMVx8K66KizFLa7sl6cpOW25O2HHedNGcx5R2e Yr7Jm0YIsPwBuvgVIgWC1nFpMbmJoY1pTjJqeIs+dYnz/DRBOyOBifyS2s3pCRtff9Ak bYy3hUySNcaGfdaTChf9GD4ICJ504PSQeC1QIsiQ3JVUebJPB7wIo4uQNr9hLvFpGPq2 htn6JUKr48+MTJr7+YUzHJit1VF1w867oWj3E6px7dH4s6v3Qv5EemE08BYR0Bt7OGQQ vbW4Y00HTzWqj3312VYAJDnFjc1WswftdGif8sjISdrdzsZWJTKpbmPshbNQiBQxgZNQ PmLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hL35hO1U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a170902dacd00b0017145b821d2si859890plx.477.2022.09.08.21.19.10; Thu, 08 Sep 2022 21:19:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hL35hO1U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229930AbiIIEED (ORCPT + 99 others); Fri, 9 Sep 2022 00:04:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbiIIEEA (ORCPT ); Fri, 9 Sep 2022 00:04:00 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0CBD076C for ; Thu, 8 Sep 2022 21:03:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662696238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=slFM8Vfq1w8ltNdHtnQPBjam8+h5JdYTs6yxTf4F8W8=; b=hL35hO1UhrEh6y616ZsH5PF8fv+WZyeUxPsS5GaRtC779M5UY5oPAaMYfPxXcApjIx91kl xuu3jahHmCk9/WaAuApL+6DGE2857SSWDBkwmNz6mTt0Ul8javamd3S0ecAcRPho2FSUcm 2W22EdcUnRboXY46uZ4FeThL5rTAlno= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-241-oYY8UzDONviIPnSY1II-wQ-1; Fri, 09 Sep 2022 00:03:54 -0400 X-MC-Unique: oYY8UzDONviIPnSY1II-wQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 53DD8811E80; Fri, 9 Sep 2022 04:03:54 +0000 (UTC) Received: from x2.localnet (unknown [10.22.32.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E1E3D2026D4C; Fri, 9 Sep 2022 04:03:53 +0000 (UTC) From: Steve Grubb To: Richard Guy Briggs Cc: Paul Moore , Jan Kara , Linux-Audit Mailing List , LKML , linux-fsdevel@vger.kernel.org, Eric Paris , Amir Goldstein Subject: Re: [PATCH v4 3/4] fanotify,audit: Allow audit to use the full permission event response Date: Fri, 09 Sep 2022 00:03:53 -0400 Message-ID: <2254543.ElGaqSPkdT@x2> Organization: Red Hat In-Reply-To: References: <2254258.ElGaqSPkdT@x2> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, September 8, 2022 10:41:44 PM EDT Richard Guy Briggs wrote: > > I'm trying to abide by what was suggested by the fs-devel folks. I can > > live with it. But if you want to make something non-generic for all > > users of fanotify, call the new field "trusted". This would decern when > > a decision was made because the file was untrusted or access denied for > > another reason. > > So, "u32 trusted;" ? How would you like that formatted? > "fan_trust={0|1}" So how does this play out if there is another user? Do they want a num= and trust= if not, then the AUDIT_FANOTIFY record will have multiple formats which is not good. I'd rather suggest something generic that can be interpreted based on who's attached to fanotify. IOW we have a fan_type=0 and then followed by info0= info1= the interpretation of those solely depend on fan_type. If the fan_type does not need both, then any interpretation skips what it doesn't need. If fan_type=1, then it follows what arg0= and arg1= is for that format. But make this pivot on fan_type and not actual names. > > > You mention that you know what you want to put in the struct, why not > > > share the details with all of us so we are all on the same page and > > > can have a proper discussion. > > > > Because I want to abide by the original agreement and not impose > > opinionated requirements that serve no one else. I'd rather have > > something anyone can use. I want to play nice. > > If someone else wants to use something, why not give them a type of > their own other than FAN_RESPONSE_INFO_AUDIT_RULE that they can shape > however they like? Please, let's keep AUDIT_FANOTIFY normalized but pivot on fan_type. -Steve