Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1549094ybh; Mon, 20 Jul 2020 00:42:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVAL9j9kyPtFncwSfqLggl3oT3BrWkR8K8/VJUmIBCqVJRLU6mRqanQVoJ8AW6ydB71/99 X-Received: by 2002:a17:906:3850:: with SMTP id w16mr20713390ejc.205.1595230952192; Mon, 20 Jul 2020 00:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595230952; cv=none; d=google.com; s=arc-20160816; b=qSpdcsztwa+ppKea4M43EFzvnA7bZH9cYH+MgGGTX7xvJrboFDZ9xaVAN2kbuSGsBj Qar6p/V/Ma6AY25pGTpDENAVfPYootw4aKo/jdBcOt8sCNvWrWlcoBeDf4s6U5er0oJO ebGJ+ZHyM4K/MIymm3BjRNF8vrl0XD/c66l4hN2sToEewBeiXhhNKKRFyrkm5XZgweDb ucPJcEyV9noFZh+4Ys/gRTmzwBV6bnr3+kqHdZBU+Lh0zBxdqzI3fUZu/gs3TcqpT0QM WeqtdXt/eJv73+fUof/COhbeFwEwC04zUHygAnP+QYUIw2mjvIHuLblkRV/sEyCA9WaQ zp9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=iSuukeBwJ0hD7pkBhNbAZkoN+ZATK+JVvMZQ+AY/xtU=; b=I2z0F0lodgWH13VOudK5dJkCNNA4s+7H0DSXQ52v2u4pyohpLbJJZd/BNoraCEgyak k4S4b8ng9q8x2ctpK3Qw47R7tB0UUZxwFNHaxEzjKj86t7Xd3NIFX7KdA6aWg7ecMKx/ 5AJNclAwx+Y4YpGCOBhGzWkxQk7GcMHCiJpY+/8FtkyKmNzkoSoY1UENrugmlFkkHS6C aIkEnois8r+E9NDbR0ztopKNjZrWw0Wea+nNZJlQVi52SUXxVs96jFr+T9fXFj9JHShx uBHvPg0QKzK7R7T51Zdp5YqeDMaPoU1i2kBaNQaRsp+I2G53qHNE7amQ/+CUMSD1TM7d Ecgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1SGbqMfu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si11314560edt.466.2020.07.20.00.42.08; Mon, 20 Jul 2020 00:42:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1SGbqMfu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbgGTHle (ORCPT + 99 others); Mon, 20 Jul 2020 03:41:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:53114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726015AbgGTHld (ORCPT ); Mon, 20 Jul 2020 03:41:33 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 10B1420773; Mon, 20 Jul 2020 07:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595230893; bh=Hgih/CgCT3e24D4BXc0rTqOhOL/EL2WpV/Z7aQ7NpNo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=1SGbqMfuj4fGfXr9apHUlnb6KelALGVLfq+i0kNUCueubOnkAeh0WT1DPFKrXDflP Mopdfryi8t0PQtWKHqkeR/G2apyhM4CSsJVkWarlrgchv0ONjCKYXoYSPS2SLN1lfg uPT0DBQt3SQeaMestOwG2l/3cM+X+ZIhda3LwLT4= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jxQQV-00DEk7-3j; Mon, 20 Jul 2020 08:41:31 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 20 Jul 2020 08:41:30 +0100 From: Marc Zyngier To: Zenghui Yu Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, wanghaibin.wang@huawei.com Subject: Re: [PATCH] irqchip/gic-v4.1: Ensure accessing the correct RD when writing INVALLR In-Reply-To: <4d79c6f0-cb38-70fc-93e7-0172417ecbfd@huawei.com> References: <20200709134959.1039-1-yuzenghui@huawei.com> <87h7u6xuur.wl-maz@kernel.org> <4d79c6f0-cb38-70fc-93e7-0172417ecbfd@huawei.com> User-Agent: Roundcube Webmail/1.4.5 Message-ID: <18d2a3da66cd94d98dac178281f77e22@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, wanghaibin.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zenghui, On 2020-07-20 03:27, Zenghui Yu wrote: > Hi Marc, > > On 2020/7/17 19:07, Marc Zyngier wrote: >> On Thu, 09 Jul 2020 14:49:59 +0100, >> Zenghui Yu wrote: >>> >>> The GICv4.1 spec tells us that it's CONSTRAINED UNPREDICTABLE to >>> issue a >>> register-based invalidation operation for a vPEID not mapped to that >>> RD, >>> or another RD within the same CommonLPIAff group. >>> >>> To follow this rule, commit f3a059219bc7 ("irqchip/gic-v4.1: Ensure >>> mutual >>> exclusion between vPE affinity change and RD access") tried to >>> address the >>> race between the RD accesses and the vPE affinity change, but somehow >>> forgot to take GICR_INVALLR into account. Let's take the vpe_lock >>> before >>> evaluating vpe->col_idx to fix it. >>> >>> Signed-off-by: Zenghui Yu >> >> Shouldn't this deserve a Fixes: tag? > > Yes, I think a > > Fixes: f3a059219bc7 ("irqchip/gic-v4.1: Ensure mutual exclusion > between vPE affinity change and RD access") > > should be enough. Should I resend a version with the tag added? Yes, please, together with a Cc: stable@vger.kernel.org, as the original patch is in 5.7 and I intend to take it via the 5.9 branch. Thanks, M. -- Jazz is not dead. It just smells funny...