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 2BBD6C64EC5 for ; Thu, 9 Feb 2023 21:54:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbjBIVyK (ORCPT ); Thu, 9 Feb 2023 16:54:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbjBIVyG (ORCPT ); Thu, 9 Feb 2023 16:54:06 -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 DD59063120 for ; Thu, 9 Feb 2023 13:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675979600; 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=kZXtytW52eF9I6Wk1wiK455K/DS7KMbgwYg8Bzqjx40=; b=c0sYeKeyQkRvau33MnvvFYGjMRPZHsZoXiTlYAVWS03hagfULy3Fo8vVmGNMVT3m6EsjO6 4K5PwczZvDrdBcuK0E06jWld1Idt7clIzWMNakQwhv8s+ZfZjFbIUEMPTWaUyvqYOlIxwZ ZoXz69V36B+oiXBrMyU/npfBVa5NPGo= 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-349-gVWLNVltPZKBuDqcZfjoOQ-1; Thu, 09 Feb 2023 16:53:16 -0500 X-MC-Unique: gVWLNVltPZKBuDqcZfjoOQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A14E3806632; Thu, 9 Feb 2023 21:53:16 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.22.50.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ECB16140EBF6; Thu, 9 Feb 2023 21:53:14 +0000 (UTC) Date: Thu, 9 Feb 2023 16:53:12 -0500 From: Richard Guy Briggs To: Paul Moore Cc: Linux-Audit Mailing List , LKML , io-uring@vger.kernel.org, Eric Paris , Steve Grubb , Christian Brauner , Stefan Roesch Subject: Re: [PATCH v2] io_uring,audit: don't log IORING_OP_MADVISE Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-02-01 16:18, Paul Moore wrote: > On Wed, Feb 1, 2023 at 3:34 PM Richard Guy Briggs wrote: > > fadvise and madvise both provide hints for caching or access pattern for > > file and memory respectively. Skip them. > > You forgot to update the first sentence in the commit description :/ I didn't forget. I updated that sentence to reflect the fact that the two should be treated similarly rather than differently. > I'm still looking for some type of statement that you've done some > homework on the IORING_OP_MADVISE case to ensure that it doesn't end > up calling into the LSM, see my previous emails on this. I need more > than "Steve told me to do this". > > I basically just want to see that some care and thought has gone into > this patch to verify it is correct and good. Steve suggested I look into a number of iouring ops. I looked at the description code and agreed that it wasn't necessary to audit madvise. The rationale for fadvise was detemined to have been conflated with fallocate and subsequently dropped. Steve also suggested a number of others and after investigation I decided that their current state was correct. *getxattr you've advised against, so it was dropped. It appears fewer modifications were necessary than originally suspected. > > Fixes: 5bd2182d58e9 ("audit,io_uring,io-wq: add some basic audit support to io_uring") > > Signed-off-by: Richard Guy Briggs > > --- > > changelog > > v2: > > - drop *GETXATTR patch > > - drop FADVISE hunk > > > > io_uring/opdef.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/io_uring/opdef.c b/io_uring/opdef.c > > index 3aa0d65c50e3..d3f36c633ceb 100644 > > --- a/io_uring/opdef.c > > +++ b/io_uring/opdef.c > > @@ -312,6 +312,7 @@ const struct io_op_def io_op_defs[] = { > > .issue = io_fadvise, > > }, > > [IORING_OP_MADVISE] = { > > + .audit_skip = 1, > > .name = "MADVISE", > > .prep = io_madvise_prep, > > .issue = io_madvise, > > -- > > 2.27.0 > > -- > paul-moore.com > - 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