From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46741 invoked by alias); 19 Dec 2015 08:16:15 -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 46726 invoked by uid 89); 19 Dec 2015 08:16:14 -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=0400, advocate, canceling, cents 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; Sat, 19 Dec 2015 08:16:13 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aACgS-00052j-Em for gdb-patches@sourceware.org; Sat, 19 Dec 2015 03:16:11 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aACgS-00052f-B8; Sat, 19 Dec 2015 03:16:08 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2641 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aACgR-000718-Kt; Sat, 19 Dec 2015 03:16:08 -0500 Date: Sat, 19 Dec 2015 08:16:00 -0000 Message-Id: <83wpsavony.fsf@gnu.org> From: Eli Zaretskii To: Joel Brobecker CC: walfred.tedeschi@intel.com, gdb-patches@sourceware.org In-reply-to: <20151218172452.GB29928@adacore.com> (message from Joel Brobecker on Fri, 18 Dec 2015 21:24:52 +0400) 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> <83poy3x03a.fsf@gnu.org> <20151218172452.GB29928@adacore.com> 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/msg00396.txt.bz2 > Date: Fri, 18 Dec 2015 21:24:52 +0400 > From: Joel Brobecker > Cc: "Tedeschi, Walfred" , > gdb-patches@sourceware.org > > > 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. Thanks. Walfred, any additional comments? If not, I will suggest rewording of your additions to the manual, to the effect of what Joel wrote above. Thanks.