From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D5ADC54EBC for ; Tue, 10 Jan 2023 15:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238652AbjAJP15 (ORCPT ); Tue, 10 Jan 2023 10:27:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239010AbjAJP1c (ORCPT ); Tue, 10 Jan 2023 10:27:32 -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 4C6D58D5E7 for ; Tue, 10 Jan 2023 07:26:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673364372; 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=EBc2qjldm3LpPRmR4SSOHYIqB/O9Rk1/M7WP2JXLhV6rlEGMFD3RpsW45JJVkciIe2iRbz GEG9rpP3/CsWVWClw+fs+j63IJoqMo12ANwjq5MwlmQZ6sAUWuEdSC8QQAVijFinR/JnTq ZrCvR0n3bOwmDkcEspOPiC4JBFDOxRA= 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 Precedence: bulk List-ID: X-Mailing-List: linux-api@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