From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D8DEC432C0 for ; Sun, 1 Dec 2019 17:05:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75D1120716 for ; Sun, 1 Dec 2019 17:05:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727258AbfLARFp (ORCPT ); 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