Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1415354ybh; Sun, 19 Jul 2020 19:32:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZh0opjuIe/hO2Fop3VlFhJDnw1EztNN4WqaqZg3AlCRZoP9htsDLiNp0YIbo9qrjskt7o X-Received: by 2002:a17:906:7c07:: with SMTP id t7mr19690977ejo.487.1595212354223; Sun, 19 Jul 2020 19:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595212354; cv=none; d=google.com; s=arc-20160816; b=HYnlbp3GXFzn3aHstTJ2NJ5OvFYWS8/YeDEv6JUGpG4fbqcczPFzlN1QTBb9/n5tII fL923G9eJKvJb6K61K7eIdahAqIYFdC08+3rcl3umg6v05CfxBQ/q3x5Npj9xWSk/lPi cocK7RJ/KlIkm0VOuSlqqChKjNiV48ARlF15zUrWBI6j1KVw6dKHfDhk3LPnTQUKBCLb 9viDghRRMqLWiw4ALxCC2HGleX3lH4UYtGr3dHPrD0a/hoeur+cjtKod+OYm5ooq0Yba 7NZHjS3j12mJNrNYpskAb6SCDnYESbDhU4MI79vVOdszZvs2fpRz9W9dlv4eKCOGB/vO KTLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ZtMjFvOWH4AYkSbG0unnRTwoRXUQ88AxseXG2YirGEA=; b=tz/nB/GkKsnrlWY9LYlVZDF3A+Xn1GlUtpdE5wR/IRLptXXxrziuGv8tBSxBG/Vd17 MRG+cWPaSHULGFIZyuqZU9oMRzZLrEsOEzA76ya4TOqV8RjYSAI4vET6gEzKuaxz7N4y G2mZVJ1yGcLQxrwTLRCtJGQvTdRZ5TpQ420vrApFwM5DfqwjSwTaTyhvz/+bAwnRKpmM VUGqrQBxc9efQ88nuB8ktXuAGOpdZPAe2UQGpsu/COTSJHmtc7TQQJQ5pS8Cx4Uhppra GbFkXG1k2qAihnjysldXL67Tp9XGIUlnKkVxtECnFxHKeKvpOm7AfA3B+9veo38MYLTl pm7w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t27si6917484eji.205.2020.07.19.19.32.10; Sun, 19 Jul 2020 19:32:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726612AbgGTC1X (ORCPT + 99 others); Sun, 19 Jul 2020 22:27:23 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8329 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726312AbgGTC1W (ORCPT ); Sun, 19 Jul 2020 22:27:22 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 0AC2B61B87CB122F880B; Mon, 20 Jul 2020 10:27:20 +0800 (CST) Received: from [10.174.185.226] (10.174.185.226) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Jul 2020 10:27:10 +0800 Subject: Re: [PATCH] irqchip/gic-v4.1: Ensure accessing the correct RD when writing INVALLR To: Marc Zyngier CC: , , , References: <20200709134959.1039-1-yuzenghui@huawei.com> <87h7u6xuur.wl-maz@kernel.org> From: Zenghui Yu Message-ID: <4d79c6f0-cb38-70fc-93e7-0172417ecbfd@huawei.com> Date: Mon, 20 Jul 2020 10:27:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <87h7u6xuur.wl-maz@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.185.226] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, Zenghui