From: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>
To: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>,
Yao Qi <qiyaoltc@gmail.com>
Cc: Pedro Alves <palves@redhat.com>,
gdb-patches <gdb-patches@sourceware.org>,
Joel Brobecker <brobecker@adacore.com>
Subject: RE: [PATCH V5 2/2] Add mpx-bnd-init-on-return set/show command for inferior calls.
Date: Mon, 13 Jun 2016 15:18:00 -0000 [thread overview]
Message-ID: <AC542571535E904D8E8ADAE745D60B194460D0BE@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <572749D2.5040106@intel.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2934 bytes --]
Yao and All,
Not sure if I have answered Yao questions. Could not find any additional review about this patch.
Is it ok to push the patch?
Without that the usage of the command "return" in the MPX context will cause boundary violations in the inferior.
Thanks and regards,
-Fred
-----Original Message-----
From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Walfred Tedeschi
Sent: Monday, May 2, 2016 1:37 PM
To: Yao Qi <qiyaoltc@gmail.com>
Cc: Pedro Alves <palves@redhat.com>; gdb-patches <gdb-patches@sourceware.org>; Joel Brobecker <brobecker@adacore.com>
Subject: Re: [PATCH V5 2/2] Add mpx-bnd-init-on-return set/show command for inferior calls.
Am 4/26/2016 um 5:38 PM schrieb Walfred Tedeschi:
> Am 4/26/2016 um 5:19 PM schrieb Yao Qi:
>> Walfred Tedeschi <walfred.tedeschi@intel.com> writes:
>>
>>> When using the return command, execution of a function is aborted
>>> and present values are returned from that point. That can cause
>>> bound violations in the MPX context. To avoid such side-effects, a
>>> new setting ("mpx-bnd-init-on-return") was added to control the
>>> initialization of bound register when using the return command.
>>>
>>
>> We need to investigate why does "return" cause bound violations. If
>> the violations are caused by the invalid or garbage return value,
>> that is expected, and it is a correct behavior to me. If the return
>> value is out of the bounds of registers settings, the violation is
>> caused. Can we tweak GDB to adjust the register settings to allow
>> these memory accesses in the "return"?
>>
>
> Yao,
>
> Thanks again for the prompt review! :)
>
>
> The "return" causes a premature exit from the function. BND is only
> returning the bounds of the pointer which is returned in the usual way.
> The novelty here is the BND registers. In case we are returning a
> pointer or address BND0 will carry the bounds of the pointer being
> returned. Once it is not set yet than garbage will be returned instead.
>
> In this way the value is wrong and a bound violations is likely to happen.
>
> Regards,
> -Fred
>
Yao,
Any comment on those observations?
Thanks and 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
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
\x16º&Öéj×!zÊÞ¶êç×}´÷©b²Ö«r\x18\x1dnr\x17¬
prev parent reply other threads:[~2016-06-13 15:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 14:21 Walfred Tedeschi
2016-03-18 15:12 ` Eli Zaretskii
2016-04-26 15:20 ` Yao Qi
2016-04-26 15:38 ` Walfred Tedeschi
[not found] ` <572749D2.5040106@intel.com>
2016-06-13 15:18 ` Tedeschi, Walfred [this message]
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=AC542571535E904D8E8ADAE745D60B194460D0BE@IRSMSX104.ger.corp.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