Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1999934ybi; Thu, 18 Jul 2019 01:47:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzM/TPN9JsLStrnIsacqjOpHgY/odkgEyFFdk6Iu9OB8wCqtH6xzSh+5FxINi1o9vxZ/F7v X-Received: by 2002:a17:902:27a8:: with SMTP id d37mr48777172plb.150.1563439656837; Thu, 18 Jul 2019 01:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563439656; cv=none; d=google.com; s=arc-20160816; b=PKWwmxc7wLOsyWP9QPBiehuyFOMZTOz10fmfRJiGxTm+U06JEl2wjvezZZvNTm7s1C bih7Q2j40Po03mVNQokbd+r3Ou/2LMpb1cYEG1MOD++5GHJ+iylYiawyap+qZnMO9kyq k4jY98zBkOgKd06sK9vxPDRGdPlZEGIwAa1X8smKW7nuKEpmx+Zhu5HbDWVR/+DAz+5w Y0ohNfI8JWDhUYOLuSX9LW0/ZmJB3HlK1xR6Ib1u1jMtQfKH7mhFotiO9rm2YlCr5dqv QQkYggrvj+a32+8Jja0YAHWjtdVW7qO+/brS9AGABIZmCzAOGLrGFVWJ5I+uhh/7RPPz rKGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=o0WVbsx8xs5m+g/6SZ3qMvPCcq061WLxlFZJyJ+V1Bc=; b=snBc656QQt/DPdHKa0zaPvdEAJmw1IGfztO+RE1rhho2LzI6wHtUGlS/Yp4zIfXaTG PSX7TxTFvl0rm8N0BWLwkoLY0XLGOk2AEH1wCLDQECHht3hQaoQPyzZ8H2GXzhvLd0to jZcG195PxPi6zeZYX+XsbfskJkBAs40MVX1iJfS6EWy1sYrK82N2ciuRietYviDRT2dK gUTaa399eKlpZYhlmeFsOesx8pIhPP00nm5jjhPptGmCydULrvxTCqjSZcPj/00jLEP0 Au0qvWOxPIeYvFhhltjnyDkcznVDK0JO84g17zkv4WTwh0i/DWEvLl+VYjTOVA0bAmkC wt+w== 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 n129si18809015pgn.254.2019.07.18.01.47.20; Thu, 18 Jul 2019 01:47:36 -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 S1727580AbfGRIq5 (ORCPT + 99 others); Thu, 18 Jul 2019 04:46:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:47620 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726000AbfGRIq5 (ORCPT ); Thu, 18 Jul 2019 04:46:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 87F6FAD7B; Thu, 18 Jul 2019 08:46:56 +0000 (UTC) Date: Thu, 18 Jul 2019 10:46:54 +0200 From: Joerg Roedel To: Thomas Gleixner 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() Message-ID: <20190718084654.GF13091@suse.de> References: <20190717071439.14261-1-joro@8bytes.org> <20190717071439.14261-3-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, 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. Thanks, Joerg