Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp630248ybl; Sun, 1 Dec 2019 09:12:06 -0800 (PST) X-Google-Smtp-Source: APXvYqw7YHElHXQKwmf1dDToNBqPvY+5X3/M0TH2Ln2o1aEB5uSXU6xpCnybdHE8Zw4c6S1of0cM X-Received: by 2002:a05:6402:c93:: with SMTP id cm19mr15885257edb.257.1575220326612; Sun, 01 Dec 2019 09:12:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575220326; cv=none; d=google.com; s=arc-20160816; b=1KE1MMYpTfqVXhn+G+wrWBJWwSmQpSJ4j6pO4ccniuQP741az/2Of2DKEYc6leXNW2 WYAwMehbgXeIlBvGdz+Jr1gFH9WksYx4g+nFWZFrhGEPjN2OJcWsJFyc4DP7d4WggQYm 8J7neOzUKNYUUAz32Vbi7rQgKTAM+nDGjm+r9gpBh04wAf0vskN9eH4n/yWx/oLUE79z D1Nh1ze3x0ns2iqJzz6ERwzxr7S/KfAPrwmzdWXS9bYVB+CJ1IAkQ7hbBqsk6fEUDeBo eOZ2vT8HaYCQBZfAZg6yk9kWEXiSU+kuT6o3oDZw22qCY0tYuw3JQAw6J3tvEkxmCUxg 4Z+w== 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=crM6IHFr6b0J1kVbksFdWekYJmFLgRz8HYkp3FsQpPc=; b=1EQrc2MAQKY2PfvA8e/QFMQrYevTQoNCLy7jISaJk6O9lxtnVdjdCOcqo0W2Kmij35 L2ymhZTJBfqdAaGh+NWcdpY8KvlVrKJHoAAu50jmteJ4naSes3Rx9yRyuaIhVtQvMNh+ vIBL1zMFPXM2ZAcneUBoCh+Gn9/Bi9ypEL4HHQd7Ma1VsXtFCA4jptjRtfhVLOeM4KLH Asdq0Gr7wT4K5+Uyb/FoBo+e8tekfS/pLJ8/IWWpe5+ltFUxijwAjAt7cXcFVMNThfBE pfzFuIBOBntR9QXcGMUYYyDk5U3EC7TSuvjpUNHN0r3a4H6AfdCAnTXokN1lZ7REOkMI zkXw== 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 q2si7119589eds.173.2019.12.01.09.11.41; Sun, 01 Dec 2019 09:12:06 -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 S1727231AbfLARFp (ORCPT + 99 others); Sun, 1 Dec 2019 12:05:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:37346 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726393AbfLARFp (ORCPT ); Sun, 1 Dec 2019 12:05:45 -0500 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 383F7ACB1; Sun, 1 Dec 2019 17:05:43 +0000 (UTC) Date: Sun, 1 Dec 2019 09:01:15 -0800 From: Davidlohr Bueso To: Ingo Molnar Cc: Linus Torvalds , mceier@gmail.com, kernel test robot , Davidlohr Bueso , Thomas Gleixner , Peter Zijlstra , Borislav Petkov , LKML , lkp@lists.01.org, "Kenneth R. Crudup" Subject: Re: [PATCH] x86/pat: Fix off-by-one bugs in interval tree search Message-ID: <20191201170115.molqadzebqo2sldu@linux-p48b> References: <20191127005312.GD20422@shao2-debian> <20191130212729.ykxstm5kj2p5ir6q@linux-p48b> <20191201104624.GA51279@gmail.com> <20191201144947.GA4167@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191201144947.GA4167@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 01 Dec 2019, Ingo Molnar wrote: >So the correct parameter to use in the interval tree searches is not >'end' but 'end-1'. Yes absolutely, I overlooked this in the final conversion. Going through some older conversions, I had this end-1 at one point. Lookups need half-open intervals, consistent with what memtype_interval_end() does. [...] >Patch is only lightly tested, so take care. (Patch is emphatically not >signed off yet, because I spent most of the day on this and I don't yet >trust my fix - all of the affected sites need to be reviewed more >carefully.) As a general note, this is rather consistent with how all interval-tree users that need [a,b) nodes use the api. Thanks, Davidlohr