Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6522982imm; Wed, 27 Jun 2018 08:57:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJMeYsuJRMF9rdy9VspvAO3v/BcYsWTxqHnOiIvXRhaJcUvw9qj0YTV+EDlAK+ISkmBH9fp X-Received: by 2002:a17:902:5942:: with SMTP id e2-v6mr6831459plj.64.1530115050371; Wed, 27 Jun 2018 08:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530115050; cv=none; d=google.com; s=arc-20160816; b=cLAGcH9X/6TCKHm+a161SfMAKyatZkw7wVK8x539wpQjrb3lyWtguHGZzRp5zhZYuQ Te33AvQXc6JreRBIraPKV7Te3Inlk/brxwmj/KeM3VmeQgyadQ3vhO5HDmY4dA5jT39P ZbeyANFIN/6l9fepxXfGmvtCck9F4mO8fj1ha8MBF0bdbw8Ns1dSS0mEVtpi1iDsAKRG 8NFk9vHacxWJazW53s2lYuVJ4RF7A6Nhm9EBlDFdO6Wtq0G8S9H3cagOZigWvn3bnF3g 6IfplcMSp3ZtWuC2mZlo+KXAkOF/ejHWw4q5nvWEUa7IUlsOlHSw7YntmkwmeXaTdI1a GkhQ== 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:arc-authentication-results; bh=2nFSBjFZof3BoyW/nX/jrySXJckt0vm+fzTMLwjmf/k=; b=xO8Yybd7wjUn51fnahfLKHDfHryriJNa1ISCVr50UhxiEOR+0AvvtP4prRl8A0fKpz aXuga14T6zUMhzSGNt7+eFnlwiXPpoCX7cqHMDxW7Dp4u6zVvAzX1TNEYrn7s6CQTjda Jzo3oFgh2wnIE0XU0L2NNAKmkU26ThNMM6Ra17eb5Os5AAGsfyG+gfBx3eIG+WcXAO/5 VGEFffSVwH4RFH/FGutwq/2JWKCMDbaDPrCm791Z54j8FzkC+ym3SqiNZHhylGy+Y1nQ FjaG3G46qZIVgjkP+1L45muUhURJS7FBaU632hVaEnv4kUe+CdaOPtKGByUPLBlMwDXh 5wTw== 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 t186-v6si3899491pgd.3.2018.06.27.08.57.16; Wed, 27 Jun 2018 08:57:30 -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 S934938AbeF0Pz6 (ORCPT + 99 others); Wed, 27 Jun 2018 11:55:58 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33660 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934746AbeF0Pz4 (ORCPT ); Wed, 27 Jun 2018 11:55:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8F60018A; Wed, 27 Jun 2018 08:55:55 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 603133F318; Wed, 27 Jun 2018 08:55:55 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 45FC71AE3692; Wed, 27 Jun 2018 16:56:33 +0100 (BST) Date: Wed, 27 Jun 2018 16:56:33 +0100 From: Will Deacon To: Toshi Kani Cc: mhocko@suse.com, akpm@linux-foundation.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, cpandya@codeaurora.org, linux-mm@kvack.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joerg Roedel , stable@vger.kernel.org Subject: Re: [PATCH v4 2/3] ioremap: Update pgtable free interfaces with addr Message-ID: <20180627155632.GH30631@arm.com> References: <20180627141348.21777-1-toshi.kani@hpe.com> <20180627141348.21777-3-toshi.kani@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180627141348.21777-3-toshi.kani@hpe.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Toshi, On Wed, Jun 27, 2018 at 08:13:47AM -0600, Toshi Kani wrote: > From: Chintan Pandya > > The following kernel panic was observed on ARM64 platform due to a stale > TLB entry. > > 1. ioremap with 4K size, a valid pte page table is set. > 2. iounmap it, its pte entry is set to 0. > 3. ioremap the same address with 2M size, update its pmd entry with > a new value. > 4. CPU may hit an exception because the old pmd entry is still in TLB, > which leads to a kernel panic. > > Commit b6bdb7517c3d ("mm/vmalloc: add interfaces to free unmapped page > table") has addressed this panic by falling to pte mappings in the above > case on ARM64. > > To support pmd mappings in all cases, TLB purge needs to be performed > in this case on ARM64. > > Add a new arg, 'addr', to pud_free_pmd_page() and pmd_free_pte_page() > so that TLB purge can be added later in seprate patches. So I acked v13 of Chintan's series posted here: http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/582953.html any chance this lot could all be merged together, please? Will