Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4103904pxb; Tue, 17 Nov 2020 11:20:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwV8zYXhYw45//9XVEwwTv/mSmAdCm3a64vmsoyuHBo5G35LLhsEnxHQtjw627yBivpYbzz X-Received: by 2002:a05:6402:b45:: with SMTP id bx5mr21567555edb.193.1605640849343; Tue, 17 Nov 2020 11:20:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605640849; cv=none; d=google.com; s=arc-20160816; b=axEolWlWonNPFaDpyo9x0FsXvAvFItqxoh+dQXcOqoILdNN9+slYjPKCoU31zEN71S 0UvkVUtnWdp7+H5Fvq2UWRvSec5qhRxO0cLX1otgOl8aDNgFNYnhAafX2WWRsRpIeGt3 nsKAtQZ7Db9hQWjUwh5mDvfY9UUQgnrayyMDLDLy0tSeXzbiv+flxWkbA3q9rgC7jGXM GJvC0CWwX/uHjos5XFfYgb2WaSPUaOGDGQP9BKPCmPGAcEke2lWsplZ8VM0JLfHFAfSn NUwpH2Dqh+E4iOut/1JO861UoD/okIqfx07cB4K8W6e2E1mQmyZC5BoISZ+9ihWni0Kl sk8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:in-reply-to :references:date:mime-version; bh=sQ3E/EC9GUJd36Kr9JcumGrv8PxgJhVTx8nwb99AXJA=; b=x9E4j9D/FHgzX8G+HHuDke+Kmdj6fevJvHb/p/XS2liv5JuhWmeRuV9jeubSd/t4TG z9poKrVxH9DpEo9Rp4ZKba+Qn/FtwGnzfVvJUrBAVchCFWqCUeTvG2VF8yt+CNgdDdST MulqsLhQYE70UcsQzb69PQgHA7qxnvvzYDRPYAVjxDFSUIC/ptgm1YnGtB9JXgRxIAX9 h4i3PsH3AVTQ93vKGauZUwwqAbqIjhTBdHIM2+CnkB7KHmcVEIj495GHcmGdWri2BZk4 zi6h2HerVYC8MSF0TFtlpY2Z1g55nud/465p89kdCxbZsQ/0zcyDitSKsUsMFGKggfvQ JBiA== 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 ca2si14531912edb.502.2020.11.17.11.20.26; Tue, 17 Nov 2020 11:20:49 -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 S1727347AbgKQTRs (ORCPT + 99 others); Tue, 17 Nov 2020 14:17:48 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:60565 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbgKQTRs (ORCPT ); Tue, 17 Nov 2020 14:17:48 -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 1kf6U6-0001CR-Fg for linux-kernel@vger.kernel.org; Tue, 17 Nov 2020 19:17:46 +0000 Received: from kamal by ascalon with local (Exim 4.90_1) (envelope-from ) id 1kf6U3-0008JL-QY for linux-kernel@vger.kernel.org; Tue, 17 Nov 2020 11:17:43 -0800 MIME-Version: 1.0 Date: Tue, 17 Nov 2020 10:51:16 -0800 References: <20201103203232.656475008@linuxfoundation.org> <20201103203239.940977599@linuxfoundation.org> <87361qug5a.fsf@mpe.ellerman.id.au> In-Reply-To: <87361qug5a.fsf@mpe.ellerman.id.au> Message-ID: Subject: Same problem for 4.14.y and a concern: Re: [PATCH 4.19 056/191] powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM From: Kamal Mostafa To: Michael Ellerman , Greg Kroah-Hartman , Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Nicholas Piggin , "Peter Zijlstra (Intel)" Content-Type: multipart/alternative; boundary="000000000000ccf01a05b451fae9" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000ccf01a05b451fae9 Content-Type: text/plain; charset="UTF-8" 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. That said, I have a more general concern about the new config (in mainline and the stable backports): [mainline] d53c3dfb23c4 mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race 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? -Kamal --000000000000ccf01a05b451fae9 Content-Type: message/external-body; access-type=x-mutt-deleted; expiration="Tue, 17 Nov 2020 11:03:37 -0800"; length=86 Content-Type: message/external-body; access-type=x-mutt-deleted; expiration="Tue, 17 Nov 2020 11:03:06 -0800"; length=3672 --000000000000ccf01a05b451fae9--