Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp516771pxb; Wed, 18 Nov 2020 10:06:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrFAq6p73/qNtWWVH9rIgf8wFC4aNWh7mlYcQjLA1aA5Ldhqnzo30X4fT7ilRKpNtmwq4t X-Received: by 2002:aa7:d2d9:: with SMTP id k25mr26145049edr.310.1605722817386; Wed, 18 Nov 2020 10:06:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605722817; cv=none; d=google.com; s=arc-20160816; b=NDzG6P9mJaopL93wwsB6xtrek1KkJ+2PEEtFWmckvLqGtTm7eWlWzN5ZDPPpt+mfnI T8lrItSjfstskuGg7wjTtijiGc0q2mYyKT4CxDdMtREJUAntp83fKezQvuvqb4bG7JQi VD9Lk4GbbHivrITnZY1bzFo9y5feuRvX9/bs0O8eNBL9X7Wbj81CfPubTRGHhNAGytXr pWww9A4tTz9UB+Qoo1pSfyyHx94UPafUOawBduBAbSnflbpGOOF2HvUxNpXTzjDzo4ZV iOmLtnhJGrKc4jRUGYlgQuceahpPxGBHvLKVf+qsjYEz0DknYL8C2HVCgA9oXWh8dqZP dNDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=yGjdyOZwlTAQzTGLj+m6TqHztBQsESA6cLbsPRXpC34=; b=TCoxhjTF4OeSr3cwMfs37Qv3DGyKnVSdSJc5tVtSLx3jNxUEOPIoHskfn7N2sbPJVI Yci9j0I6P+KuNb06YkSJTTcZcJcQiOWWHQq0xbjiDcNqcbovl/ahPq2mcy1lnJIHjYBo ZYXDwCVyeeGeTJ4/1kbvi3klhH7qSKIz/zjQk6qrZs21CQZ64yTgCvlIOU3KvryHUG/V TUwTf6va3Kd1QHfPxaND9+6X3dgCrCan615FfUdk7BbFd3sbeqcB/MVIaGYijtTZaERT gGboshOJk3GmhdfSpRwrZJHJfo8Tz3oSuehTxK+rbSOK7QQ1RvqGxSUiBZ++Qh6ylVJ4 BWzQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si17367157edh.141.2020.11.18.10.06.34; Wed, 18 Nov 2020 10:06:57 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726618AbgKRSC3 (ORCPT + 99 others); Wed, 18 Nov 2020 13:02:29 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:39430 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726304AbgKRSC3 (ORCPT ); Wed, 18 Nov 2020 13:02:29 -0500 Received: from 3.general.kamal.us.vpn ([10.172.68.53] helo=ascalon) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kfRmi-0007Yv-6o; Wed, 18 Nov 2020 18:02:24 +0000 Received: from kamal by ascalon with local (Exim 4.90_1) (envelope-from ) id 1kfRmd-00038H-Er; Wed, 18 Nov 2020 10:02:19 -0800 Date: Wed, 18 Nov 2020 10:02:17 -0800 From: Kamal Mostafa To: Sasha Levin Cc: Michael Ellerman , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Nicholas Piggin , "Peter Zijlstra (Intel)" Subject: Re: Same problem for 4.14.y and a concern: Re: [PATCH 4.19 056/191] powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM Message-ID: <20201118180216.GA31560@ascalon> References: <20201103203232.656475008@linuxfoundation.org> <20201103203239.940977599@linuxfoundation.org> <87361qug5a.fsf@mpe.ellerman.id.au> <20201118004528.GA629656@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201118004528.GA629656@sasha-vm> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 17, 2020 at 07:45:28PM -0500, Sasha Levin wrote: > On Tue, Nov 17, 2020 at 10:51:16AM -0800, Kamal Mostafa wrote: > > On Tue, Nov 3, 2020 at 4:22 PM Michael Ellerman wrote: > > > > > Greg Kroah-Hartman writes: > > > > From: Nicholas Piggin > > > > > > > > [ Upstream commit 66acd46080bd9e5ad2be4b0eb1d498d5145d058e ] > > > > > > > > powerpc uses IPIs in some situations to switch a kernel thread away > > > > from a lazy tlb mm, which is subject to the TLB flushing race > > > > described in the changelog introducing ARCH_WANT_IRQS_OFF_ACTIVATE_MM. > > > > > > > > Signed-off-by: Nicholas Piggin > > > > Signed-off-by: Michael Ellerman > > > > Link: > > > https://lore.kernel.org/r/20200914045219.3736466-3-npiggin@gmail.com > > > > Signed-off-by: Sasha Levin > > > > --- > > > > arch/powerpc/Kconfig | 1 + > > > > arch/powerpc/include/asm/mmu_context.h | 2 +- > > > > 2 files changed, 2 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > > > index f38d153d25861..0bc53f0e37c0f 100644 > > > > --- a/arch/powerpc/Kconfig > > > > +++ b/arch/powerpc/Kconfig > > > > @@ -152,6 +152,7 @@ config PPC > > > > select ARCH_USE_BUILTIN_BSWAP > > > > select ARCH_USE_CMPXCHG_LOCKREF if PPC64 > > > > select ARCH_WANT_IPC_PARSE_VERSION > > > > + select ARCH_WANT_IRQS_OFF_ACTIVATE_MM > > > > > > This depends on upstream commit: > > > > > > d53c3dfb23c4 ("mm: fix exec activate_mm vs TLB shootdown and lazy tlb > > > switching race") > > > > > > > > > Which I don't see in 4.19 stable, or in the email thread here. > > > > > > So this shouldn't be backported to 4.19 unless that commit is also > > > backported. > > > > > > cheers > > > > > > > Hi- > > > > This glitch has made its way into 4.14.y ... > > [4.14.y] c2bca8712a19 powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM > > But 4.14.y does not carry the prereq that introduces that config. > > I'll queue up the 4.19 backport for 4.14 too, thanks! > Thanks Sasha. And nevermind my other concern ... > > It would seem that the intent is that it should be *only* enabled > > (currently at least) for arches that will explicitly select it, but the > > config advice does not make that very clear. Could that new config get > > an explicit "default n" line? ... I see now that a 'default' isn't necessary; the config only appears for arches which explicitly select it, as intended. -Kamal