From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA5B7C43464 for ; Fri, 18 Sep 2020 12:18:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B8F622208 for ; Fri, 18 Sep 2020 12:18:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="mDA5YloO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726260AbgIRMSu (ORCPT ); Fri, 18 Sep 2020 08:18:50 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:57113 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726064AbgIRMSu (ORCPT ); Fri, 18 Sep 2020 08:18:50 -0400 X-Greylist: delayed 87808 seconds by postgrey-1.27 at vger.kernel.org; Fri, 18 Sep 2020 08:18:48 EDT Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4BtCYK40Jjz9sT5; Fri, 18 Sep 2020 22:18:45 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1600431526; bh=eZsLlZGMKeQkS+03FKo604w9V86XaFWLGzm8pTD5+uI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mDA5YloOUUj1YlrkqhB+NWmP7C+oK2/lEb51pnY0pmK1q+xi+YZdJF9hhzLw5ssGQ 5vsW8B/AbgZLkyYtLDnDusK8tTY7tnBUCe4RArSx6pTDEhm9wVpRd05HuuBAxdlGzv q3xStD52WpU801nnx+2eiKW4wL9M2IuTDP8yKJJiHVgJnP29Wlvxjc2hG4FL9b8n+V EQCPIKrQRI/VIOiFlLt9gv3zsRcuTbu8sqKgEppJ2TKcEsreQ6q172d2ktOnyrkxW7 JeHMrR3RHMLBvdj9QS6Ee3N4/3EwF9bulqzLN+rYEgbu8Mga9FBrr/HEdUT7ehUqmg U/rIeVSqeMwbQ== From: Michael Ellerman To: Nicholas Piggin , peterz@infradead.org Cc: Jens Axboe , linux-arch@vger.kernel.org, "linux-mm \@ kvack . org" , "Aneesh Kumar K . V" , linux-kernel@vger.kernel.org, Andy Lutomirski , Dave Hansen , sparclinux@vger.kernel.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S . Miller" Subject: Re: [PATCH v2 1/4] mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race In-Reply-To: <1600137586.nypnz3sbcl.astroid@bobo.none> References: <20200914045219.3736466-1-npiggin@gmail.com> <20200914045219.3736466-2-npiggin@gmail.com> <20200914105617.GP1362448@hirez.programming.kicks-ass.net> <1600137586.nypnz3sbcl.astroid@bobo.none> Date: Fri, 18 Sep 2020 22:18:44 +1000 Message-ID: <87a6xn6zx7.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org Nicholas Piggin writes: > Excerpts from peterz@infradead.org's message of September 14, 2020 8:56 pm: >> On Mon, Sep 14, 2020 at 02:52:16PM +1000, Nicholas Piggin wrote: >>> Reading and modifying current->mm and current->active_mm and switching >>> mm should be done with irqs off, to prevent races seeing an intermediate >>> state. ... >>> >>> This is a bit ugly, but in the interest of fixing the bug and backporting >>> before all architectures are converted this is a compromise. >>> >>> Signed-off-by: Nicholas Piggin >> >> Acked-by: Peter Zijlstra (Intel) >> >> I'm thinking we want this selected on x86 as well. Andy? > > Thanks for the ack. The plan was to take it through the powerpc tree, > but if you'd want x86 to select it, maybe a topic branch? I've put this series in a topic branch based on v5.9-rc2: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/log/?h=topic/irqs-off-activate-mm I plan to merge it into the powerpc/next tree for v5.10, but if anyone else wants to merge it that's fine too. cheers