From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2A6FD27E for ; Fri, 31 May 2024 10:30:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717151460; cv=none; b=Y4h1PAgLxU3unwlcb6RkcLNBPvykhiuVO817l2gZ6FS13vipCbGexqVQAQ5q4GE8RpD1wfw5LAtTue8DrUMvDJ7fam3JLFvKc7d5MBPByjjrGtmSsIvEvyfCeBB19kcs5DNE3mLrGe86aZR03f5qH7TWS+s/2JWaSFknfetO7yY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717151460; c=relaxed/simple; bh=tl5eBt4hxqNJQwu2XkYiH1S4HyMP4WJexLEXShn0et8=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=ByRzwmeLc6TijxSgp77AwIQUxD8nQOBUq0bxf/07NtOkv6IjAfzA+fPG08/uisx4YPPWLRYcC3EQG6y5thvCysf6pTVQJDIGoomxC9eAxc3tlkIfttD2KdsctmDiQ6E62OpV1kP3s87U9fmsCq6F6hO+UhHbYB1GougXRoLJCmk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DgtBv1xK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DgtBv1xK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 659FDC116B1; Fri, 31 May 2024 10:30:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717151459; bh=tl5eBt4hxqNJQwu2XkYiH1S4HyMP4WJexLEXShn0et8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DgtBv1xK+gFp8xmwkuDRyLp42olvbV/e7+u29Nwyd1WFj6wGceSyoRM53XgYqgT1a 6Zln/6cjEcFO5yMy1piVwxnG/gpYcW0smeO6husLQTFJqqMSl3KYmwoPV2An91oY2d CW7ZkSTTjAtB0Brji9tFlKNkWVFc8oBxMQz7duPzkU5poi1FZ52La352B3K42dnalL 8DHxafvCtcEGJwpp+XOyZZ7eZQxN/pL4/OT/0pbQyVVG9ADcp4eBNOjQfArMeWNLZ9 HwZV7RVlM4gxt5xMW8yGMJ+SttcTE9xGEB8s4f6htVxBZIyTC+FbF5rO0BjF7K/PyE RiJF+eePo6Taw== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.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 1sCzXF-00H93G-7E; Fri, 31 May 2024 11:30:57 +0100 Date: Fri, 31 May 2024 11:30:59 +0100 Message-ID: <87mso62rz0.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: <20240531095318.GA5556@amazon.com> References: <20240531074302.30563-1-hagarhem@amazon.com> <86ttiel4bb.wl-maz@kernel.org> <20240531095318.GA5556@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/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII 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 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. M. -- Without deviation from the norm, progress is not possible.