From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122956 invoked by alias); 18 Dec 2015 15:11:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 122942 invoked by uid 89); 18 Dec 2015 15:11:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:918, HX-Received-From:4830, HX-Received-From:134, HX-Received-From:2001 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 18 Dec 2015 15:11:51 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9wh8-0005T0-FB for gdb-patches@sourceware.org; Fri, 18 Dec 2015 10:11:49 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9wh8-0005Sw-CK; Fri, 18 Dec 2015 10:11:46 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1890 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1a9wh7-0008L8-NX; Fri, 18 Dec 2015 10:11:46 -0500 Date: Fri, 18 Dec 2015 15:11:00 -0000 Message-Id: <83poy3x03a.fsf@gnu.org> From: Eli Zaretskii To: "Tedeschi\, Walfred" CC: brobecker@adacore.com, gdb-patches@sourceware.org In-reply-to: (walfred.tedeschi@intel.com) Subject: Re: [PATCH V2] ABI changes for MPX. Reply-to: Eli Zaretskii References: <1450358624-11596-1-git-send-email-walfred.tedeschi@intel.com> <83bn9pyqv8.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00367.txt.bz2 > From: "Tedeschi, Walfred" > CC: "brobecker@adacore.com" , "gdb-patches@sourceware.org" > Date: Thu, 17 Dec 2015 16:44:47 +0000 > > You issue the command "return a", where a is a pointer. > BND0 should contain that boundary of a, but it will in fact return any value presented in the register at that moment. > In this way application will be in a not good state. Continuing the execution the user might have a bound violation due to the return. > This behaviour is when the " mpx-bnd-init-on-return" is 0. > > In case the " mpx-bnd-init-on-return" is 1 the BND0 will be set to zero, INIT state, and the pointer a will be able to access the whole memory. Thanks, I understand now. So why would a GDB user want to set mpx-bnd-init-on-return to zero? The result will always be a bound violation, no?