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 4D539C25B7E for ; Fri, 31 May 2024 14:51:26 +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=oRJw2P4CeUdXU7NZFhkbSU7NcTq4XvokYsFG9w6+W1A=; b=HCca+xgbl8iVqY V1OpmRjiO3KvtBv+X8gw6nel4sGyEkzA3lKyk/JoJ+KkLCS77/D6fP2NlzUM72Q9422McF8G4QRX1 PgA4G/2bASDOB+1WWMyz1a9/0TLZCV/4iOsBPC9YMgkxcptkpRSz3QESNXEkJXB3xqxtCgigDoLkk xAjZJZ6RNNKilbB2XFOJCZ39UEf5+5+sQmwI08oj+fHO3u6Fh7/bp+uGqHD18ie4FdR9NZcZenpSc 10rsnairL6uPx5ZP9pLvIswQeSNZhRifxwaIKPyVpRls56Mw/4I4mZ3W7gPn8dY8K8+BoLz7XYisy ObXeLlTQpU+QYoVcPq+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD3b8-0000000AZJt-0idb; Fri, 31 May 2024 14:51:14 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD3b5-0000000AZJF-28Gv for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2024 14:51:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id A7326CE1CBC; Fri, 31 May 2024 14:51:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CACBC116B1; Fri, 31 May 2024 14:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717167068; bh=XC0q3HDRsTlNoIOVTsv7KQOjdOjpX3wJ1Wj3Dpm8C60=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=u3snAWLM/K3i6FMWIBGOa9/Za2TrX+LSkngvaqPXauIn0evKkD1t2DpMzdUT0Qotg GScW1yX0WVF9TYEsfdCprDaakPkxjCzvIO6Lw0gNqZwzdzXAs/jWa8RgjgVcN+SjOC 2VHlHsW/2sC3jRMsAY6BT/wPb/dheXJ2dtsGadnrvojwv6RqG0SMyr+LSTjs5rM8RJ C5plfF25M2SkBs2rZGT1SQ22WB7JsH/W/f8VOGlIXltNa/cwWG4ynpjVCp2fCLmLgB Psw654qOjPMPQmckO595qQczm+ib1He80q02gJcNSnYok70tsGyhmPCpNkY0dQEf01 Pb8KImAeKD+Tw== 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 1sD3b0-00HCvH-Ft; Fri, 31 May 2024 15:51:06 +0100 Date: Fri, 31 May 2024 15:51:06 +0100 Message-ID: <86r0dikpb9.wl-maz@kernel.org> From: Marc Zyngier To: Hagar Hemdan Cc: Maximilian Heyne , Norbert Manthey , Thomas Gleixner , Eric Auger , , , Subject: Re: [PATCH v2] irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update() In-Reply-To: <20240531140336.GA4911@amazon.com> References: <20240531074302.30563-1-hagarhem@amazon.com> <86ttiel4bb.wl-maz@kernel.org> <20240531095318.GA5556@amazon.com> <87mso62rz0.wl-maz@kernel.org> <20240531140336.GA4911@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, mheyne@amazon.de, nmanthey@amazon.de, tglx@linutronix.de, eric.auger@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, hagarhem@amazon.de 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_075111_932175_E1307A36 X-CRM114-Status: GOOD ( 26.85 ) 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 15:03:36 +0100, Hagar Hemdan wrote: > > On Fri, May 31, 2024 at 11:30:59AM +0100, Marc Zyngier wrote: > > On Fri, 31 May 2024 10:53:18 +0100, > > Hagar Hemdan wrote: > > > > > > On Fri, May 31, 2024 at 10:27:04AM +0100, Marc Zyngier wrote: > > > > On Fri, 31 May 2024 08:43:02 +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 bug was discovered and resolved using Coverity Static Analysis > > > > > Security Testing (SAST) by Synopsys, Inc. > > > > > > > > > > Fixes: 015ec0386ab6 ("irqchip/gic-v3-its: Add VLPI configuration handling") > > > > > Signed-off-by: Hagar Hemdan > > > > > > > > Given that you have lifted both my proposed patch and part of my > > > > reply as a commit message, you may at least credit me with a > > > > Suggested-by: tag. Not to mention that the blatant advertising doesn't > > > > really apply in this case. > > > > > > ok, I will add this tag in rev3 and we need to add that disclaimer > > > as it is a commercial tool. thanks! > > > > Sorry, but I'm not bound by this requirement. I'm happy to credit > > *you* for reporting a defect, but certainly not a tool that hasn't > > "resolved" anything, despite what the message says. > > Ok, I will drop the resolved part as the modified fix is suggested by > you. Is it ok? Yes, this seems fair to me. Thanks again, 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