Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1829554imm; Thu, 23 Aug 2018 09:24:43 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz1mQuRlZfNMkWynAdQ2bFpIL1kUuFU/W/3eic8T1ltzGXvk92MH4aJgxBqT1Zh0xjWnrmC X-Received: by 2002:a17:902:683:: with SMTP id 3-v6mr36894040plh.52.1535041483426; Thu, 23 Aug 2018 09:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535041483; cv=none; d=google.com; s=arc-20160816; b=F4tNHMdB+ivqfuV9rGe8w4UWOssa2/yVy8VEwZvcYaR78zGz/hYR04lNiQ6BJSCaUe Eq3U6xtbtcYFqx8JexkoHg19a6iLRwPyKz+1BpOQDlH9XCabolK0NdbkmX2LRlIMcQAX YoG4QRTQB39UOY0ajGye/u7hdQWhbstyXP2DONsQxuMJZK/Q7IK0IpGBmoks769+7T+y 5dHn+pRyL2uMyH7hGJOPZOMW+cRn5tUzEGO9m7i+3eh+AxIs++xPwJgLNqbr1ratI11A J2kSuNER1TUnDMokKY/nOuB1I6PWuN0xL2oW1JAi92nnoy5iLb71UTWQROId/Vf7AiVk QtFg== 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=WfeOgEZlzk4yH0nRE/9CBCYnloVudGthLnavsx810nc=; b=n4/UcsfDSwHTajL7LMBrsUJ2fcf4qns0lIqTPH1OQJ1vS7WbfCpsNJGBm3it5Vh0QG /JlvazmmUBzkylBsuMkSdHLUVX2oAeniJuXV3CSl3UtkoMybb2IdAbdGXKNoFpgIzOAl FtRsr9ICyogVkyJ0b301FFF52u1q9rfXSIMXjG7xpnGhaeJLS0ZsLxpKGzP7vEEZv0zF PZbNMVZCWTl0ZczwzI1qnS887K8v+8X7Kwne0GVrzxVpIRl5G7fl7m9Xj1194W6CfLGA 04D18Wlp32OvfVP8aqQbnv7XKhv44ndoLF1lSGsl6T/66stfr8g9SvuDWDHFW8mECu5Y TcqA== 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 v28-v6si5126966pfi.22.2018.08.23.09.24.28; Thu, 23 Aug 2018 09:24:43 -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 S1731514AbeHWRKz (ORCPT + 99 others); Thu, 23 Aug 2018 13:10:55 -0400 Received: from foss.arm.com ([217.140.101.70]:46652 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730895AbeHWRKy (ORCPT ); Thu, 23 Aug 2018 13:10:54 -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 64D74ED1; Thu, 23 Aug 2018 06:41:09 -0700 (PDT) Received: from brain-police (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E9CA63F675; Thu, 23 Aug 2018 06:41:07 -0700 (PDT) Date: Thu, 23 Aug 2018 14:41:05 +0100 From: Will Deacon To: Nicholas Piggin Cc: Peter Zijlstra , torvalds@linux-foundation.org, luto@kernel.org, x86@kernel.org, bp@alien8.de, riel@surriel.com, jannh@google.com, ascannell@google.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, David Miller , Martin Schwidefsky , Michael Ellerman , linux-arch@vger.kernel.org Subject: Re: [RFC PATCH 2/2] mm: mmu_notifier fix for tlb_end_vma Message-ID: <20180823134104.GD1496@brain-police> References: <20180823084709.19717-1-npiggin@gmail.com> <20180823084709.19717-3-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180823084709.19717-3-npiggin@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 23, 2018 at 06:47:09PM +1000, Nicholas Piggin wrote: > The generic tlb_end_vma does not call invalidate_range mmu notifier, > and it resets resets the mmu_gather range, which means the notifier > won't be called on part of the range in case of an unmap that spans > multiple vmas. > > ARM64 seems to be the only arch I could see that has notifiers and > uses the generic tlb_end_vma. I have not actually tested it. > > Signed-off-by: Nicholas Piggin > --- > include/asm-generic/tlb.h | 17 +++++++++++++---- > mm/memory.c | 10 ---------- > 2 files changed, 13 insertions(+), 14 deletions(-) I think we only use the notifiers in the KVM code, which appears to leave the ->invalidate_range() callback empty, so that at least explains why we haven't run into problems here. But the change looks correct to me, so: Acked-by: Will Deacon Thanks, Will