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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 EE7CFC432C3 for ; Fri, 15 Nov 2019 00:01:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AE56E20725 for ; Fri, 15 Nov 2019 00:01:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="s4GHvuJr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE56E20725 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3E8E56B0005; Thu, 14 Nov 2019 19:01:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 399966B0006; Thu, 14 Nov 2019 19:01:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2AFAF6B0007; Thu, 14 Nov 2019 19:01:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id 14D9D6B0005 for ; Thu, 14 Nov 2019 19:01:14 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id D5EBA180AD82F for ; Fri, 15 Nov 2019 00:01:13 +0000 (UTC) X-FDA: 76156556826.29.rule74_ab070d257d40 X-HE-Tag: rule74_ab070d257d40 X-Filterd-Recvd-Size: 2913 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Nov 2019 00:01:13 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89828206F0; Fri, 15 Nov 2019 00:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573776072; bh=NCy9ePEVCAWBsM5t7nkwPu9lOlacnUTLg2udO+cgv88=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=s4GHvuJrZabyOvN5W0vGh26+UNh24W7hHAdgZDE63YhpEAK0t1KbIlt/QHr+rpMlT FVp9eVs1YzREbuFTtIP13Bp287k71E4IkQwy7bj6OKBYRlIdC/aXbzFW6kSLn+AuTo laSHSRl5g9cinBtNsaq9BoqTaUV6gE6W0GaWz6nM= Date: Thu, 14 Nov 2019 16:01:08 -0800 From: Andrew Morton To: Joerg Roedel Cc: Shile Zhang , linux-mm@kvack.org, linux-kbuild@vger.kernel.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , hpa@zytor.com Subject: Re: [PATCH] mm/vmalloc: Fix regression caused by needless vmalloc_sync_all() Message-Id: <20191114160108.57a72907f7b1aa9860471a06@linux-foundation.org> In-Reply-To: <20191114171231.GA21753@suse.de> References: <20191113095530.228959-1-shile.zhang@linux.alibaba.com> <20191114171231.GA21753@suse.de> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: On Thu, 14 Nov 2019 18:12:31 +0100 Joerg Roedel wrote: > On Wed, Nov 13, 2019 at 05:55:30PM +0800, Shile Zhang wrote: > > +#if defined(CONFIG_X86_32) && defined(CONFIG_X86_PAE) > > /* > > * First make sure the mappings are removed from all page-tables > > * before they are freed. > > + * > > + * This is only needed on x86-32 with !SHARED_KERNEL_PMD, which is > > + * the case on a PAE kernel with PTI enabled. > > */ > > - vmalloc_sync_all(); > > + if (!SHARED_KERNEL_PMD && boot_cpu_has(X86_FEATURE_PTI)) > > + vmalloc_sync_all(); > > +#endif > > I already submitted another fix for this quite some time ago: > > https://lore.kernel.org/lkml/20191009124418.8286-1-joro@8bytes.org/ > Your patch is more verbose but looks quite a bit nicer than this patch (Link: http://lkml.kernel.org/r/20191113095530.228959-1-shile.zhang@linux.alibaba.com). The separation of sync-for-a-mapping versus sync-for-an-unmapping adds clarity. It's fairly urgent - I consider this to be -stable material. Thomas & co, was that a deliberate skip?