From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754978AbbERXGv (ORCPT ); Mon, 18 May 2015 19:06:51 -0400 Received: from www.sr71.net ([198.145.64.142]:45780 "EHLO blackbird.sr71.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753164AbbERXGu (ORCPT ); Mon, 18 May 2015 19:06:50 -0400 Message-ID: <555A7087.5080409@sr71.net> Date: Mon, 18 May 2015 16:06:47 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Thomas Gleixner CC: linux-kernel@vger.kernel.org, x86@kernel.org, dave.hansen@linux.intel.com Subject: Re: [PATCH 09/19] x86, mpx: trace entry to bounds exception paths References: <20150508185948.4C19F4B0@viggo.jf.intel.com> <20150508185952.3D3B9085@viggo.jf.intel.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/18/2015 01:58 PM, Thomas Gleixner wrote: > On Fri, 8 May 2015, Dave Hansen wrote: >> > This patch adds a trace point for the case where we are >> > passing the exception up to userspace with a signal. >> > >> > We are also explicit that we're printing out the inverse of >> > the 'upper' that we encounter. If you want to filter, for >> > instance, you need to ~ the value first. > Confused. What is the point of printing the complement of upper? If a pointer's range is 0x1000 -> 0x2000 it is stored in the bounds table as (32-bits here for brevity): lower: 0x00001000 upper: 0xffffdfff That is so that an all 0's entry: lower: 0x00000000 upper: 0x00000000 corresponds to the "init" bounds which store a *range* of: 0x00000000 -> 0xffffffff The 'upper' stored in the table is gibberish to print by itself, so we print ~upper to get the *actual*, logical value.