This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V2] ABI changes for MPX.
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: walfred dot tedeschi at intel dot com, gdb-patches at sourceware dot org
- Date: Sat, 19 Dec 2015 10:16:33 +0200
- Subject: Re: [PATCH V2] ABI changes for MPX.
- Authentication-results: sourceware.org; auth=none
- References: <1450358624-11596-1-git-send-email-walfred dot tedeschi at intel dot com> <83bn9pyqv8 dot fsf at gnu dot org> <AC542571535E904D8E8ADAE745D60B1944507386 at IRSMSX104 dot ger dot corp dot intel dot com> <83poy3x03a dot fsf at gnu dot org> <20151218172452 dot GB29928 at adacore dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Fri, 18 Dec 2015 21:24:52 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>,
> 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.