Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1773128imu; Thu, 10 Jan 2019 02:48:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN7O6CW7tiUUA2CDHEwJOAC8Ed2Wwb/MtfenQqs7uX8WPJDP2GTI1E91+i2HjzQL4bX1AF99 X-Received: by 2002:a62:9111:: with SMTP id l17mr9707116pfe.200.1547117324772; Thu, 10 Jan 2019 02:48:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547117324; cv=none; d=google.com; s=arc-20160816; b=m5cVxsW0/ahc9pw2wXUdkC7I5qgqypL47hZU6WMJ3HBRGvSjeYOwF72g3yPdGIYnOI LYIi+csigvn7ET2ILTNo5otMfasqaV1edgFddovK30Wur+eP3nvpgAY4NJfpu4VOB07Y PH4CI98EBob3ULgvglkOVUFyYicmruNKsh3gpp8kBkH/I8+yOuLxNzkluGFYzPiVVSep Nu7yCdpBS1QCKr5ipsunP7fQ9gtFl8Dy3oG1jKXjovsyr5u3LUtwJmSePz476MRwlCr/ iOTstdEviugUJlD5zD+SVOJ1KITlYglxEdfQAUFIN4INA5Jm77W2avpPx7BZU+YpdY4i JIjA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=wx7AFlpxsakb6yUiXn/L1ZO3my+q80nO9Q+417/i/yg=; b=e68WL7YPiPnM5/E/J2fsgLVmdy7MIx8dLEmG9kZHyTvosOuLbIGhH4BEefZkFzx+uU BlYRA3OjoSnb/plI6dIHRa+/Etahvb20C9QvHUK7OMTaHxKea4O0x3ObPD1NNNag2nsG a8EFQI/H9aw09eEq9Z0+5yalJNW1dpy/K8Gkkp9lnLkEBgKU18t821bwL1CBGmrQ8QSW 5Ub8/SNeZG7axbpdaVE9XAIHI2YgLpVk3z8AyLTXMDeDNAH4wt+JuhLvoYBk0XyM/9pg K9sefm6G1OioE3gRGZxAZRyb42AJnvnJ5rahc/Wp/Cv2QN5dhJykYOYEo8sWmbegHHLc 8uLA== 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 p5si72245181pfb.188.2019.01.10.02.48.29; Thu, 10 Jan 2019 02:48:44 -0800 (PST) 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 S1727720AbfAJJOf (ORCPT + 99 others); Thu, 10 Jan 2019 04:14:35 -0500 Received: from tartarus.angband.pl ([54.37.238.230]:49142 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726255AbfAJJOf (ORCPT ); Thu, 10 Jan 2019 04:14:35 -0500 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.89) (envelope-from ) id 1ghWPw-00041g-Kn; Thu, 10 Jan 2019 10:14:24 +0100 Date: Thu, 10 Jan 2019 10:14:24 +0100 From: Adam Borowski To: Sean Christopherson Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, leozinho29_eu@hotmail.com, Mike Galbraith , =?iso-8859-1?B?Suly9G1l?= Glisse , Christian =?iso-8859-1?Q?K=F6nig?= , Jan Kara , Matthew Wilcox , Ross Zwisler , Dan Williams , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Michal Hocko , Felix Kuehling , Ralph Campbell , John Hubbard , Andrew Morton , Linus Torvalds Subject: Re: [PATCH] mm/mmu_notifier: mm/rmap.c: Fix a mmu_notifier range bug in try_to_unmap_one Message-ID: <20190110091424.mzgpdaqq74ie6ro5@angband.pl> References: <20190110005117.18282-1-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190110005117.18282-1-sean.j.christopherson@intel.com> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 09, 2019 at 04:51:17PM -0800, Sean Christopherson wrote: > Manifests as KVM use-after-free WARNINGs and subsequent "BUG: Bad page > state in process X" errors when reclaiming from a KVM guest due to KVM > removing the wrong pages from its own mappings. With your patch, no badness happened so far. Thanks! > Reported-by: Adam Borowski > Fixes: ac46d4f3c432 ("mm/mmu_notifier: use structure for invalidate_range_start/end calls v2") > --- a/mm/rmap.c > +++ b/mm/rmap.c > - mmu_notifier_range_init(&range, vma->vm_mm, vma->vm_start, > - min(vma->vm_end, vma->vm_start + > + mmu_notifier_range_init(&range, vma->vm_mm, address, > + min(vma->vm_end, address + Meow. -- ⢀⣴⠾⠻⢶⣦⠀ Hans 1 was born and raised in Johannesburg, then moved to Boston, ⣾⠁⢠⠒⠀⣿⡁ and has just became a naturalized citizen. Hans 2's grandparents ⢿⡄⠘⠷⠚⠋⠀ came from Melanesia to Düsseldorf, and he hasn't ever been outside ⠈⠳⣄⠀⠀⠀⠀ Germany until yesterday. Which one is an African-American?