Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1407258rwn; Thu, 8 Sep 2022 19:57:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR76NPZnHZN4GgKjUJuplyUUOWcSoqKXgkoeSlWctCmhS2n/kv4j5XMZOMya2HEBw9Ge8W4V X-Received: by 2002:a17:90b:254b:b0:200:a860:5bf9 with SMTP id nw11-20020a17090b254b00b00200a8605bf9mr7234393pjb.176.1662692231774; Thu, 08 Sep 2022 19:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662692231; cv=none; d=google.com; s=arc-20160816; b=B0iJvvw2942eNlWI20jNpFrWTPrIyeGufyYlsKqr890dLwEImQZCv38hAqDa2hxeVE DoJvU0kP/Q3hxHWrdu+e90c65mWex9GlBPy2Pe6rPO50+wB/NyucvstqUfpcYyda8pKb 6vKmOkM6ibpObXr9wXwklfmvVeIbYh5jzwuXZvvP/9SbAQ4m8XX6OxXjnAqk+3s2VOvv 9oJffvUsA94VX+SKzjW5CXc9V+xEduUduD9yDp7mJktcm1zqmZwB1bP47UFKIYkkofLs flIOnpP457beGud6OJUgOsJECYKJxN4vgG4ZrcQJthDztn6Ud5Z+rn95TUQi14xlLF+T Xl/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YGIe/WchtTjeaQkmut/pp7gUU33urnk5jTM85S8dT9E=; b=ATj9S01ChdQ5cYTIradXlTN2V3UjGD7Y3plAVUUDBI6Q8JWJbY4t/ZhglUDZu1+DY4 Tk1bcIu2hyR+TOlFrL7jXtQ25HS1gs7Ug3RvVplc66OlkM93AU5Z7iKXuBuo/2/qVR2u TaY2kSVfMvE4iWkg2UGBaRjn8lJS46PvX40un8e7BHuvAr0V5BN04G4VwFLtS6X5DGir HjvaZrkhWl1+Lkd1tcRWflfgXGAa1+gvOkan1Htq2jt4IJJg83w0p1NXOUh5rt7+Q0yx LSb3c05SEKhKqBxeHmM2vWS4zjQiaBw4/WmaVvWghPwsg/CMVHNJFfx4xL/1AdhebU0g d7Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZzXp3cLK; 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 t12-20020a17090a4e4c00b00200a82da911si163594pjl.20.2022.09.08.19.56.51; Thu, 08 Sep 2022 19:57:11 -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=ZzXp3cLK; 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 S229776AbiIICmA (ORCPT + 99 others); Thu, 8 Sep 2022 22:42:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbiIICly (ORCPT ); Thu, 8 Sep 2022 22:41:54 -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 6C636F10FF for ; Thu, 8 Sep 2022 19:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662691312; 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: in-reply-to:in-reply-to:references:references; bh=YGIe/WchtTjeaQkmut/pp7gUU33urnk5jTM85S8dT9E=; b=ZzXp3cLK4mwiePmCh78fQPd3M4fruDAJwtXPV+6sEA795HQKgzReS5i+u+tigU/zlKDSDI inVsS7H7HPfM3lS0hO7HJt2Kw458qXW0Y3gcFTndOfqQH2b5m6OyNU1M6UIBOQ/dE5W6fF ZutVikTLDjayTM2/4cAAk7wu5CYFTFw= 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-669-4qCtdkEgM66uKLeR1hNVMA-1; Thu, 08 Sep 2022 22:41:48 -0400 X-MC-Unique: 4qCtdkEgM66uKLeR1hNVMA-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 25F2380231E; Fri, 9 Sep 2022 02:41:48 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.22.48.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A7A12026D4C; Fri, 9 Sep 2022 02:41:46 +0000 (UTC) Date: Thu, 8 Sep 2022 22:41:44 -0400 From: Richard Guy Briggs To: Steve Grubb 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 Message-ID: References: <2603742.X9hSmTKtgW@x2> <2254258.ElGaqSPkdT@x2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2254258.ElGaqSPkdT@x2> 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=unavailable 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 2022-09-08 22:20, Steve Grubb wrote: > On Thursday, September 8, 2022 5:22:15 PM EDT Paul Moore wrote: > > On Thu, Sep 8, 2022 at 5:14 PM Steve Grubb wrote: > > > On Wednesday, September 7, 2022 4:23:49 PM EDT Paul Moore wrote: > > > > On Wed, Sep 7, 2022 at 4:11 PM Steve Grubb wrote: > > > > > On Wednesday, September 7, 2022 2:43:54 PM EDT Richard Guy Briggs > wrote: > > > > > > > > Ultimately I guess I'll leave it upto audit subsystem what it > > > > > > > > wants > > > > > > > > to > > > > > > > > have in its struct fanotify_response_info_audit_rule because > > > > > > > > for > > > > > > > > fanotify subsystem, it is just an opaque blob it is passing. > > > > > > > > > > > > > > In that case, let's stick with leveraging the type/len fields in > > > > > > > the > > > > > > > fanotify_response_info_header struct, that should give us all the > > > > > > > flexibility we need. > > > > > > > > > > > > > > Richard and Steve, it sounds like Steve is already aware of > > > > > > > additional > > > > > > > information that he wants to send via the > > > > > > > fanotify_response_info_audit_rule struct, please include that in > > > > > > > the > > > > > > > next revision of this patchset. I don't want to get this merged > > > > > > > and > > > > > > > then soon after have to hack in additional info. > > > > > > > > > > > > Steve, please define the type and name of this additional field. > > > > > > > > > > Maybe extra_data, app_data, or extra_info. Something generic that can > > > > > be > > > > > reused by any application. Default to 0 if not present. > > > > > > > > I think the point is being missed ... The idea is to not speculate on > > > > additional fields, as discussed we have ways to handle that, the issue > > > > was that Steve implied that he already had ideas for "things" he > > > > wanted to add. If there are "things" that need to be added, let's do > > > > that now, however if there is just speculation that maybe someday we > > > > might need to add something else we can leave that until later. > > > > > > This is not speculation. I know what I want to put there. I know you want > > > to pin it down to exactly what it is. However, when this started a > > > couple years back, one of the concerns was that we're building something > > > specific to 1 user of fanotify. And that it would be better for all > > > future users to have a generic facility that everyone could use if they > > > wanted to. That's why I'm suggesting something generic, its so this is > > > not special purpose that doesn't fit any other use case. > > > > Well, we are talking specifically about fanotify in this thread and > > dealing with data structures that are specific to fanotify. I can > > understand wanting to future proof things, but based on what we've > > seen in this thread I think we are all set in this regard. > > 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}" > > 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? > -Steve - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635