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 A8882C25B75 for ; Fri, 31 May 2024 14:03:59 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UpTmZZaEoWZpMCEJ/Ig+lh/sKO+gJJ0UOIaVkneCKis=; b=Lp1Pdwqk1pewCN x5/W89zNwY129vuzwtTeBGJldoPKnWnc5nVblg/p4Ehr/019XZbHz+dAm5UJhiRrC4TbwMwdZVcV7 W8ptjTzWzGhYD5uKRzgL87+hjMjTSph1hu5AfGwFj0/xj9fS8B+oc0LVtBMNIJ3DAsDC1veLx/xOy ubHkNbBCdW1dCHBXRO2FSQ0znFO/YX8pDmRTbX2k1EipVZj1NLBXm7rY8C8EbifqkrCKoxHs5FQqx U+lCK5sUwbTqn/40C2Oww/jUFYZF1QMyzOXAChn3SUDpeQtAYwMZMoJNh+W8hLchZK/lAiLz+0oui zt5qrRGgweKgqGFgy+PQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD2rD-0000000ARJB-0hRD; Fri, 31 May 2024 14:03:47 +0000 Received: from smtp-fw-80007.amazon.com ([99.78.197.218]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD2rA-0000000ARIc-0sfb for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2024 14:03:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1717164224; x=1748700224; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=FHDVmJVmJipFUzztrcQUetQex5rFg7uI0/X/xngjWQQ=; b=IAZaVLP0VY57k36iT6MV6STVdd/QJJe9gZTdJw/WDdu9Q7IvDLOq6mdr r/6l/4J2ecx2LHEBDSmbGdJ67f9KPqmV2Ds6++tsvl8Yw4wh2tFTyMpPN r4JpCFGXK98eVcFiLSwc7y99bcElQay/I+xnHlD92q6VWz9eM+/V+lRTg g=; X-IronPort-AV: E=Sophos;i="6.08,204,1712620800"; d="scan'208";a="300045662" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO smtpout.prod.us-east-1.prod.farcaster.email.amazon.dev) ([10.25.36.210]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 14:03:39 +0000 Received: from EX19MTAEUB002.ant.amazon.com [10.0.10.100:63734] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.41.97:2525] with esmtp (Farcaster) id fe2e9d2c-9cd6-4ea6-9f94-22312cbd41d6; Fri, 31 May 2024 14:03:37 +0000 (UTC) X-Farcaster-Flow-ID: fe2e9d2c-9cd6-4ea6-9f94-22312cbd41d6 Received: from EX19D008EUA004.ant.amazon.com (10.252.50.158) by EX19MTAEUB002.ant.amazon.com (10.252.51.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Fri, 31 May 2024 14:03:37 +0000 Received: from EX19MTAUWA001.ant.amazon.com (10.250.64.204) by EX19D008EUA004.ant.amazon.com (10.252.50.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Fri, 31 May 2024 14:03:37 +0000 Received: from dev-dsk-hagarhem-1b-b868d8d5.eu-west-1.amazon.com (10.253.65.58) by mail-relay.amazon.com (10.250.64.204) with Microsoft SMTP Server id 15.2.1258.28 via Frontend Transport; Fri, 31 May 2024 14:03:36 +0000 Received: by dev-dsk-hagarhem-1b-b868d8d5.eu-west-1.amazon.com (Postfix, from userid 23002382) id 3002320BED; Fri, 31 May 2024 14:03:36 +0000 (UTC) Date: Fri, 31 May 2024 14:03:36 +0000 From: Hagar Hemdan To: Marc Zyngier 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() Message-ID: <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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87mso62rz0.wl-maz@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240531_070344_411050_2E075B57 X-CRM114-Status: GOOD ( 25.64 ) 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, 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? > > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel