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 F2A6C626CB for ; Fri, 31 May 2024 14:51:08 +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=1717167069; cv=none; b=go0TrF9KTJTgrr5WdRwUG+lwToMYSsRG3VFVkHhbuzYPNoixlYT5yrjqOth9Cnjxl10KHkAUv3QaIughU3fY7LkQHsRcO7fGWQQw2O+z/CL3PjEvhoN/oKGro0W/B7lEvxdPfNU/prhrQV2RLVhmT462Wj8XXxf/1arqFf0X3f0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717167069; c=relaxed/simple; bh=XC0q3HDRsTlNoIOVTsv7KQOjdOjpX3wJ1Wj3Dpm8C60=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=BlttSxenc4ThhMqXu960tLO3ixL1baVBEYrYgv5AXQJ62c04RvcAmF3N1rqVTIstCMZxV8df9fO/UJWWEPDjzCTAgfRo2hrCWMMWrzBxnMwy0SepxP7YkD3IB3F5FQidfxfyralmEnvrJ4JhQ1JwJwFJut7JHdRs76hgMZCJh0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u3snAWLM; 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="u3snAWLM" 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) 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 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.