Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2018480ybi; Thu, 18 Jul 2019 02:06:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9TFrjb9astgQiULhWhpfLhUzEEMo8GR7JghskuRkLtnxtj+aianO1W5A262dNCEbsQmZN X-Received: by 2002:a17:90a:30aa:: with SMTP id h39mr50072838pjb.32.1563440764835; Thu, 18 Jul 2019 02:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563440764; cv=none; d=google.com; s=arc-20160816; b=RiwLAlU2WmmIJrYkeZGa610zp3CxLh15g3J0lxHUpO12FU+6cFQRBdufk5Xuj2NWMq FgchWtwxel2gZqYEXcGNwyyQBw8CZzkfTOzTDbVSrLE5JxRUcAPhqpOO9kBUGbCSsq6z JycQLXmh6DJvSTbD0NA0Vf+w+H65GelkyWjAUQhSx+FpC11rXwITCraUTEbHcMik8Ue1 G7/TkLpCANxzWTS7aDL7tbRPjQ61BvlqibYdITO0Wz4GJLYtgrWvp5MNevJPPiSLNc7w DwyfVIJdXClIdGz4MY84iH34+sTwXdvgechF+JpGQQUavCFhQxMftzxN8qWt6090Nh+0 v9yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=k+iuQXTM3Ms9dMehSKPgpVcBJ9cVSbI1kChrt30Wg10=; b=zFVefSh4oyOEgPSnMi7RdtYRj+WUuXtoIYhZeXPVOownNjyPW+JQmI+qRrIk+8bvGU nODGHypA6M0r/nQRTAxmIMsMx2Jr9TQbymLaTasg+X0B7kRWXIv4SV4nCCW4qyzFboOt l3ePHnpUQ11fcQkiw4jnbi6xvORUJUmokP7RJ84nu+tFBW3b0jrYDRDOz9j3DqblehpE GpBa5/WsSt+LbuJO85hhL4DgHkJ9hj88n7ZCZbPmQRtX04ScITQmkcWFwnybMv3wdF1Q YPrSSi6TBvjgvxRSlZVkg69gAuE+Q0pmVTp3qWxbVC7/R2nJ8KSFSGBKppkQlbjrrcM6 P9UQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si1803413pfn.170.2019.07.18.02.05.48; Thu, 18 Jul 2019 02:06:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389666AbfGRJFI (ORCPT + 99 others); Thu, 18 Jul 2019 05:05:08 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56628 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726488AbfGRJFI (ORCPT ); Thu, 18 Jul 2019 05:05:08 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ho2LR-00058c-Iy; Thu, 18 Jul 2019 11:04:57 +0200 Date: Thu, 18 Jul 2019 11:04:57 +0200 (CEST) From: Thomas Gleixner To: Joerg Roedel cc: Joerg Roedel , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Ingo Molnar , Borislav Petkov , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/3] x86/mm: Sync also unmappings in vmalloc_sync_one() In-Reply-To: <20190718084654.GF13091@suse.de> Message-ID: References: <20190717071439.14261-1-joro@8bytes.org> <20190717071439.14261-3-joro@8bytes.org> <20190718084654.GF13091@suse.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Joerg, On Thu, 18 Jul 2019, Joerg Roedel wrote: > On Wed, Jul 17, 2019 at 11:43:43PM +0200, Thomas Gleixner wrote: > > On Wed, 17 Jul 2019, Joerg Roedel wrote: > > > + > > > + if (!pmd_present(*pmd_k)) > > > + return NULL; > > > else > > > BUG_ON(pmd_pfn(*pmd) != pmd_pfn(*pmd_k)); > > > > So in case of unmap, this updates only the first entry in the pgd_list > > because vmalloc_sync_all() will break out of the iteration over pgd_list > > when NULL is returned from vmalloc_sync_one(). > > > > I'm surely missing something, but how is that supposed to sync _all_ page > > tables on unmap as the changelog claims? > > No, you are right, I missed that. It is a bug in this patch, the code > that breaks out of the loop in vmalloc_sync_all() needs to be removed as > well. Will do that in the next version. I assume that p4d/pud do not need the pmd treatment, but a comment explaining why would be appreciated. Thanks, tglx