Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp357304lqh; Fri, 31 May 2024 03:38:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUSjGIKC7KxLaEziYU+PX984cuGorVzbOPfhi1O1I9CTNyC1nORQiYsUDvBGCTeRiYMU9kC7dn5zP/nBzP8r0R9tCYP4YwRa2yKyzEZ6g== X-Google-Smtp-Source: AGHT+IErXopiJWxrsVz0QYRFrevmLDlm580DtuAguqvPNusNFRA3KnPoRaLinB0uavhGMW85Ppjl X-Received: by 2002:a05:6a00:3d06:b0:6ed:21c0:986c with SMTP id d2e1a72fcca58-7024789dc5fmr1801166b3a.24.1717151926345; Fri, 31 May 2024 03:38:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717151926; cv=pass; d=google.com; s=arc-20160816; b=w8N5TRhdfPqEs5L0ZUpgAZgDuGTZIyb333TETHG7/moIwhyusQCAHYUsBAZugPwiL3 0f2m7t2yGnzsO20gjdGOGTveK0WhxGD0qleiHmuEDiFCfXI2ALKPbaduzIng9KY3JOVq 30Ro7ICOicdNDyRKJj3YG7AIST/RZYOwSY2ZonS7MZ967cqkGeevhZrhBCS5ogWZ0F0Z A5H7kk7GgG91T+w77AbhuhomLy3FVBIo0qvNHNX1tYaODidp1gaWKtuIvVHUmjSSYZPu VTjO13M9QdzH467ARJekg032uqXOpULybbuGPnRQb16/cbi3+1WTBExiz17gwZ2pQIeC mYNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=3Z2jxXx7bGCgWjVrafKWv+ry7hNJzI8Aav+Bk0x8+N0=; fh=FvhpCs/nHCB0otwJzO9l5cg9boflTeXFrwMtnj4L3Ds=; b=bZ78Z70LukUxFd9xvG1mEYEFYuNM5F0QlFUM1dCGaLvytkPtbhzEcjc7xXmlavbU7B uifDKARNmI+V8oRkEMBxnDHd6rlZPD8HOQby4tTwgv0hNkmJMp/Hl0zAo+y9eM1F+bG2 y/SoYIBokstwFSckpLlhjszcAb4JF2b+uYSsFfoie4kwbArALSVd/lpQeNgITRMBjZ+c erbgMuiv3JKYJ3MChOLI577qo3+mIDoFZYJ7h31lQO1/HEuWldfMBXgj5hYVTusdJ6is Qgb8Z/gdpQuwomhU4YnrfaL7qAMe78XN0dUZgrkOnzrqpOMYLMwpTDqxOHAz7V1rGBcy 0M3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DgtBv1xK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196675-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196675-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35515340dsi1334123a12.184.2024.05.31.03.38.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 03:38:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196675-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DgtBv1xK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196675-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196675-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 592F6B2496D for ; Fri, 31 May 2024 10:31:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C76DB155CA8; Fri, 31 May 2024 10:31:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DgtBv1xK" 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 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.