Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7977621rwl; Tue, 10 Jan 2023 07:37:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXtqtlcx3gUf1/uHhGBqjEClysygV03c2EBLpiRl8JTjHu41YgGOjxKq+5aV375vM0lOjx/k X-Received: by 2002:a05:6a21:398a:b0:af:8e92:3eeb with SMTP id ad10-20020a056a21398a00b000af8e923eebmr86257695pzc.9.1673365079115; Tue, 10 Jan 2023 07:37:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673365079; cv=none; d=google.com; s=arc-20160816; b=BKoAMaziEL2EeYOe+kvtg3tMac7cYdpEIKauiBjoY5vzCFCsXkHMBjSlxwKYkNiHOu iz/240ZAGCsur49lcrbCIVB2NokSpM+CBX6iYRx2+wfEQE8zcgyTokQFqQQHSxH/AfgJ lKe5xSI9FbO3qHfOw/bKkTAA6Rp7kWVOkB9zRHCZK8+w7HQGBPIPwJNNzCYjC63H0L8f 95sGij2BGy91xVj19373TWGoR8PHE7FDRCXtFAoNJhdWaJ8cRpijSeE8CTmeQN354ple e5B+/aNBF619H6k8alGu9mjkLrBP4nqPz8TP2AGf+FmhBAfwE9vlnhYbhKuLPc3SX+3d 42rA== 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=v+NefOpcxugrX/y4MYy0C1CL3s92hQ9uzP66eCvp/+E=; b=vttLDwUuDMBiupx0TT5YDYlN23gsSWohfwduFwlI/Z7mlSv5O9Xw6GvkaqOQD6NWi4 cuP+ygrRTFd4IEzm/oF4w/1Q4Y2O8TsaZZpHELKRPxazlUvrxi4gtGtL0v/9p6aq5Lcc pPeHifcIatjVsVjnoTu0/zBtKu2RaFXkiBg4gRIyFWfwBzwtwS1+nkGA1go2EPOE8Hv5 dRXt0SpVeByVNWfu+uRwW5FGx+D4G9qfGdMMBtU0dcAiLJKoFDMsGej9rtVm0DVLH2GJ KyUrB75VcwXR3sIy2LVzcjuHY9n+2LYevzx2cYbohAVh05nOaGTcHQHo385EIJH1c/pa 3yjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C1dWkzXl; 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 v62-20020a638941000000b004b4afe8b2b6si3291783pgd.488.2023.01.10.07.37.51; Tue, 10 Jan 2023 07:37:59 -0800 (PST) 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=C1dWkzXl; 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 S238977AbjAJP16 (ORCPT + 53 others); Tue, 10 Jan 2023 10:27:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238861AbjAJP13 (ORCPT ); Tue, 10 Jan 2023 10:27:29 -0500 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 6266F8D5DF for ; Tue, 10 Jan 2023 07:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673364370; 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=v+NefOpcxugrX/y4MYy0C1CL3s92hQ9uzP66eCvp/+E=; b=C1dWkzXl94e1m4s8b9THwsUzi2hUSrnl/5wa/r8DO2qce/iR69vHAZLa9DS8dA4C3mtFgM HvUGB96G2RvkmAsn5C4IZFaV8v5HaTm+MOOL3FXWq2UDHwy2ve0KomBuV0rn9qluKSG9PE y+z400XYte+n1GyS6sJisOzmTEzwdAU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-217-Afb7B3CoPiGxRwoGcJ0-BQ-1; Tue, 10 Jan 2023 10:26:08 -0500 X-MC-Unique: Afb7B3CoPiGxRwoGcJ0-BQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6263B1C08790; Tue, 10 Jan 2023 15:26:01 +0000 (UTC) Received: from x2.localnet (unknown [10.22.9.158]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C58831121314; Tue, 10 Jan 2023 15:26:00 +0000 (UTC) From: Steve Grubb To: Richard Guy Briggs Cc: Linux-Audit Mailing List , LKML , linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, Paul Moore , Eric Paris , Jan Kara , Amir Goldstein Subject: Re: [PATCH v5 3/3] fanotify,audit: Allow audit to use the full permission event response Date: Tue, 10 Jan 2023 10:26:00 -0500 Message-ID: <4778109.GXAFRqVoOG@x2> Organization: Red Hat In-Reply-To: References: <3211441.aeNJFYEL58@x2> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 Hello Richard, On Monday, January 9, 2023 10:08:04 PM EST Richard Guy Briggs wrote: > When I use an application that expected the old API, meaning it simply > does: > > > > response.fd = metadata->fd; > > response.response = reply; > > close(metadata->fd); > > write(fd, &response, sizeof(struct fanotify_response)); > > > > I get access denials. Every time. If the program is using the new API and > > sets FAN_INFO, then it works as expected. I'll do some more testing but I > > think there is something wrong in the compatibility path. > > I'll have a closer look, because this wasn't the intended behaviour. I have done more testing. I think what I saw might have been caused by a stale selinux label (label exists, policy is deleted). With selinux in permissive mode it's all working as expected - both old and new API. -Steve