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=unavailable 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 6672CC43465 for ; Fri, 18 Sep 2020 12:18:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C7CC02311A for ; Fri, 18 Sep 2020 12:18:53 +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" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C7CC02311A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1E4F26B0003; Fri, 18 Sep 2020 08:18:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B9EF6B0055; Fri, 18 Sep 2020 08:18:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A8A46B005A; Fri, 18 Sep 2020 08:18:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id E959F6B0003 for ; Fri, 18 Sep 2020 08:18:52 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B309A8249980 for ; Fri, 18 Sep 2020 12:18:52 +0000 (UTC) X-FDA: 77276086104.25.form19_0614d4a2712b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 69F9D1804E3AF for ; Fri, 18 Sep 2020 12:18:52 +0000 (UTC) X-HE-Tag: form19_0614d4a2712b X-Filterd-Recvd-Size: 3255 Received: from ozlabs.org (ozlabs.org [203.11.71.1]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Sep 2020 12:18:51 +0000 (UTC) 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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