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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9018CC27C44 for ; Fri, 31 May 2024 17:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YfZXtdz03sCniv3XqH2H772vfpvaezrvYJuobSsk3pQ=; b=z1HkcBO+UqTtjc RDj9VDvTiW6ME8/USURffbFrYN8EcCrOaeKrBPq0Cw/iAvyVakKzPgRouOKc9F/D0ubOchDxVoJ6W WQ/7Jc1DvdsJ92wEx8dMX45Qj8VIyF/hzoa6AKc1WoHhQnwfDsvD6MFNxzVIo7zBfXRtWX6h9F9O4 XTxHCiHqW15oB8W5bDaH4cJ9hLteZ6BP2nbDHOdwJYJF1JcZk8boj+kM7rcyFzeI2O1mhQlHsU7Gi n2Qmw+fBjY21Ml4k6ruQdpdX+btpnp5CAiGtTrvqFHHaDV7i931UCaSVMcbCLKTz2C3zcCB7tqdwq dHmhwhye1jiNsRu7OFSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD6EO-0000000B1nh-3u62; Fri, 31 May 2024 17:39:56 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD6EM-0000000B1mo-28EG for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2024 17:39:55 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 84EF662A32; Fri, 31 May 2024 17:39:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37BE9C116B1; Fri, 31 May 2024 17:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717177193; bh=cZJF8ii52Njx7s3iD7VgOhl5swlGZNT+OtQREUqdecw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ns3nX2FheFu7lyt7/SCH6BKkxuyW2XfMZ/KsLHlg78phMLxnlJCQ+/1QsfYiLAHcu V8y6ZXLLF+8HfgzvusFjD8EAULW2jot+RNlCNNApj3yQvj8A0DGi6/Sm5E56RMj75e aXqYEKKg/cYx3oWBikfVDndHkbb2XbvjoEaiRaZCoXEDRKa/ZO3PvQsHrdouwIPJGG KU3WXNTcq1i/Kd+LxQcgHOqOUI2sN34okQRMIH093KLw+aGBLVsOIDxMncATJNGcVM FWQxFyGxYGq0OtipTvS8aHoWt1p0CJmjO8NC0FCyuNtwlxzYB1rJ9iTlOx6Er6+3x7 iLOd8Kbb8a+Hg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sD6EJ-00HFcY-1E; Fri, 31 May 2024 18:39:51 +0100 Date: Fri, 31 May 2024 18:39:50 +0100 Message-ID: <86plt1lw2h.wl-maz@kernel.org> From: Marc Zyngier To: Hagar Hemdan , Thomas Gleixner Cc: Maximilian Heyne , Norbert Manthey , Eric Auger , , Subject: Re: [PATCH v4] irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update() In-Reply-To: <20240531162144.28650-1-hagarhem@amazon.com> References: <20240531162144.28650-1-hagarhem@amazon.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: hagarhem@amazon.com, tglx@linutronix.de, mheyne@amazon.de, nmanthey@amazon.de, eric.auger@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240531_103954_624138_48483695 X-CRM114-Status: GOOD ( 16.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 31 May 2024 17:21:44 +0100, Hagar Hemdan wrote: > > its_vlpi_prop_update() calls lpi_write_config() which obtains the > mapping information for a VLPI without lock held. So it could race > with its_vlpi_unmap(). > Since all calls from its_irq_set_vcpu_affinity() require the same > lock to be held. So instead of peppering the locking all over the > place, we hoist the locking into its_irq_set_vcpu_affinity(). This looks odd. Maybe something along the lines of: "Since all calls from its_irq_set_vcpu_affinity() require the same lock to be held, hoist the locking there instead of peppering it over the place." > > This bug was discovered using Coverity Static Analysis > Security Testing (SAST) by Synopsys, Inc. > > Fixes: 015ec0386ab6 ("irqchip/gic-v3-its: Add VLPI configuration handling") > Suggested-by: Marc Zyngier > Signed-off-by: Hagar Hemdan With the above addressed, Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Thomas, can you please queue it at your earliest convenience? Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel