Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1073080rdg; Fri, 13 Oct 2023 09:23:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGI0bvTmDdi/S7cT18I2cj5NV5vpj/nyV2g07RZEIUJpkek5anPDWsWoSKcaJOt98KU/6s8 X-Received: by 2002:a17:902:988d:b0:1c9:b207:d412 with SMTP id s13-20020a170902988d00b001c9b207d412mr10555283plp.37.1697214202014; Fri, 13 Oct 2023 09:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697214201; cv=none; d=google.com; s=arc-20160816; b=PF4UCGbmBCfvs1WGCBwc7pcvrcjHPTEt8ukEjO3TbuXCg4jaMzWDgSkAYgQpMqmLcE d6clNWajhibiBRDM3eDh1/HrXRmaZmyhT4jSKs4Yx3KzSi3Zg8WyPfivEdbxYO2M1N6Y 0YSnW7c8FkFAg6ilcQTqo6MroDaaib9PUtKDYniOLmucs7yk8mqmVejtK6QedQiCLHW/ xF8RBD9+saF4W4H70iQP9/ece8K6M50RmnFYN2K9PbQgKtzogY13uk3eCYpOjdt3NAQC 1t5S9KbOniHwAXZM2csJoWjXIB5swtyttp9S8eYL5RE43RxGWYgCckjh7n7WQHNFwLiV dMmQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jzNot1J20BbieX7sGLMkSadqBIYzFLKPtBf9GaJWTf0=; fh=HXk0JAS/F4GCRbpzqPQrXxQvWbDz2j8vD37kT15znn0=; b=QdQaJxw86AUr83Ri8Jmnh//TGOGySgC1zrWw+Ip/FgBnImQa/GRQQAPKEnZv7GL3RS queIxRcopStjq+n4+HOUEGgKeQvWI7eCRE/8A7ds1a5f6F6AEQNrZsiH7HudReF1mY3K QuK8PxzC+oSiRX+xBhDVz9VyY928gzxGeYFnbXYYsqw3IIzxFp8HM6VMGTYheoYYDlOn zrbYLc/NhJN+L3T2JYxxAnH5BzqM4DLLyFdJeT6PeARwHjiF/txvl/aq8gSKitYJbUN2 N3ozb/MF9htw2pVBeBeuCF2bkn8L0pLkW6Ocf6zyTnls8zo/5oXjFdl7Xm9gBbNQO85l N3aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R14unBPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id j3-20020a170902758300b001c9ed124cd7si2206489pll.650.2023.10.13.09.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 09:23:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R14unBPR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6259C808FBC5; Fri, 13 Oct 2023 09:23:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229891AbjJMQXD (ORCPT + 99 others); Fri, 13 Oct 2023 12:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231934AbjJMQWl (ORCPT ); Fri, 13 Oct 2023 12:22:41 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CAE41984; Fri, 13 Oct 2023 09:22:33 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D077C433C8; Fri, 13 Oct 2023 16:22:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697214153; bh=77wzV9MEoTXLXfQTuKRRmBfTs1SSurFIFiGTL+MyTDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R14unBPRHsceasa7071+fmC82i7CgNT4e9sYuWd7ckZA9bsebHSt6D3G4DtzXH11T jYQtoXu9YqxIme3RHsPYrLzzNLoXtALd88VDpD6kRtX+XHt5pQUCk5pEIPcctqxmVX GSLvysb1y10jRfhW9CrsGjnIhmVK6CeUSXlpP8MZZDW1SanPraU7pO9CoGbAdaLUQP W41kE0Q/WQ66m2HnuVgIEvnx8QkmPmf2UJvusIbTUfTkZI47ZDVGZqqXYlNtzE0Wwm SaPgTW40CJf9lH5D0+xmyf7uMuWnLTlqHt0mC4Pw9NldSOg8t5VpVrBC2YrGtrwLMV AJ3t8KOb6vyuQ== Date: Fri, 13 Oct 2023 18:22:28 +0200 From: Christian Brauner To: Paul Moore Cc: Dan Clash , linux-kernel@vger.kernel.org, axboe@kernel.dk, linux-fsdevel@vger.kernel.org, dan.clash@microsoft.com, audit@vger.kernel.org, io-uring@vger.kernel.org Subject: Re: [PATCH] audit,io_uring: io_uring openat triggers audit reference count underflow Message-ID: <20231013-hakte-sitzt-853957a5d8da@brauner> References: <20231012215518.GA4048@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20231013-karierte-mehrzahl-6a938035609e@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 13 Oct 2023 09:23:18 -0700 (PDT) On Fri, Oct 13, 2023 at 11:56:08AM -0400, Paul Moore wrote: > On Fri, Oct 13, 2023 at 11:44 AM Christian Brauner wrote: > > > > On Thu, 12 Oct 2023 14:55:18 -0700, Dan Clash wrote: > > > An io_uring openat operation can update an audit reference count > > > from multiple threads resulting in the call trace below. > > > > > > A call to io_uring_submit() with a single openat op with a flag of > > > IOSQE_ASYNC results in the following reference count updates. > > > > > > These first part of the system call performs two increments that do not race. > > > > > > [...] > > > > Picking this up as is. Let me know if this needs another tree. > > Whoa. A couple of things: > > * Please don't merge patches into an upstream tree if all of the > affected subsystems haven't ACK'd the patch. I know you've got your > boilerplate below about ACKs *after* the merge, which is fine, but I > find it breaks decorum a bit to merge patches without an explicit ACK > or even just a "looks good to me" from all of the relevant subsystems. I simply read your mail: X-Date: Fri, 13 Oct 2023 17:43:54 +0200 X-URI: https://lore.kernel.org/lkml/CAHC9VhQcSY9q=wVT7hOz9y=o3a67BVUnVGNotgAvE6vK7WAkBw@mail.gmail.com "I'm not too concerned, either approach works for me, the important bit is moving to an atomic_t/refcount_t so we can protect ourselves against the race. The patch looks good to me and I'd like to get this fix merged." including that "The patch looks good to me [...]" part before I sent out the application message: X-Date: Fri, 13 Oct 2023 17:44:36 +0200 X-URI: https://lore.kernel.org/lkml/20231013-karierte-mehrzahl-6a938035609e@brauner > Regardless, as I mentioned in my last email (I think our last emails > raced a bit), I'm okay with this change, please add my ACK. It's before the weekend and we're about to release -rc6. This thing needs to be in -next, you said it looks good to you in a prior mail. I'm not sure why I'm receiving this mail apart from the justified clarification about -stable although that was made explicit in your prior mail as well. > > Acked-by: Paul Moore Thanks for providing an explicit ACK.