From: Walfred Tedeschi <walfred.tedeschi@intel.com>
To: qiyaoltc@gmail.com
Cc: palves@redhat.com, gdb-patches <gdb-patches@sourceware.org>,
brobecker@adacore.com
Subject: Fwd: FW: [PATCH V5 1/2] Initialize bnd register before performing inferior calls.
Date: Tue, 26 Apr 2016 14:36:00 -0000 [thread overview]
Message-ID: <571F7CC8.7070702@intel.com> (raw)
In-Reply-To: <AC542571535E904D8E8ADAE745D60B19445B77C8@IRSMSX104.ger.corp.intel.com>
Walfred Tedeschi <walfred.tedeschi@intel.com> writes:
> BND registers should be initialized before performing an inferior call
> to avoid undesired bound violations.
What are the undesired bound violations? Do have an example?
Resetting BND registers in the inferior call isn't right to me, the BND
setting isn't in effect in the inferior call. If the function can
trigger bound violations, it is expected that it still can trigger
violations in the inferior call.
--
yao (齐尧)
Yao,
Thanks a lot for your quick review! :)
That is true, but not unattended. In case BND registers are not set to
init state the current context value will be used for the inferior call.
Causing with a higher chance a BND violation.
The question is was that intended by the user? Likely not.
Also it will invalidate the inferior call usage. The inferior call will
finish before returning the result back to the user.
In any case the user can still set the values and examine a bound
violation and the its causes by setting the BND registers by stopping at
the prologue of the function being called.
Have i answered your question?
Best regards,
-Fred
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next parent reply other threads:[~2016-04-26 14:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AC542571535E904D8E8ADAE745D60B19445B77C8@IRSMSX104.ger.corp.intel.com>
2016-04-26 14:36 ` Walfred Tedeschi [this message]
2016-04-27 8:47 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=571F7CC8.7070702@intel.com \
--to=walfred.tedeschi@intel.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).