From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88906 invoked by alias); 18 Dec 2015 17:24:59 -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 88896 invoked by uid 89); 18 Dec 2015 17:24:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=advocate, canceling, Hx-languages-length:1235 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 18 Dec 2015 17:24:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7CADE116791; Fri, 18 Dec 2015 12:24:56 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id H2N7nliisf9t; Fri, 18 Dec 2015 12:24:56 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 12ED2116772; Fri, 18 Dec 2015 12:24:56 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 34638406CD; Fri, 18 Dec 2015 21:24:52 +0400 (RET) Date: Fri, 18 Dec 2015 17:24:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: "Tedeschi, Walfred" , gdb-patches@sourceware.org Subject: Re: [PATCH V2] ABI changes for MPX. Message-ID: <20151218172452.GB29928@adacore.com> References: <1450358624-11596-1-git-send-email-walfred.tedeschi@intel.com> <83bn9pyqv8.fsf@gnu.org> <83poy3x03a.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83poy3x03a.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-12/txt/msg00370.txt.bz2 > 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? If I understand correctly, which is a fairly big if, it will depend on how far in the function's execution you've gone through. If you return early enough that the bound registers are still uninitialized, then you want to initialize them to make sure that there will be no bound violation due to the premature return. On the other hand, there might be some situations where you know the bound registers have been set, and you want to preserve their value, rather than blindly setting it to zero. For instance, what if there was, in fact, a bound violation. Setting it to zero would change the program's behavior by canceling the reporting of that violation. PS: FWIW, I dislike the term "initialize", here, because it always begs the question: "initialize to what?". If this is the terminology used in the reference documentation and is known to the community working on those chips, then I guess we have to go with the flow. But otherwise, I personally would advocate for another term, such as "reset" or "set to zero". Just my 2 cents. -- Joel