From: "H.J. Lu" <hjl.tools@gmail.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org, felix.willgerodt@intel.com, jhb@freebsd.org
Subject: Re: [PATCH v2] gdbserver: Clear X86_XSTATE_MPX bits in xcr0 on x32
Date: Sat, 23 Mar 2024 10:08:48 -0700 [thread overview]
Message-ID: <CAMe9rOrk3rO+uv2p=QqO=XnA3915=FUkv2L_sS_9jdr4ot7Ayw@mail.gmail.com> (raw)
In-Reply-To: <87bk74uckv.fsf@redhat.com>
On Sat, Mar 23, 2024 at 9:39 AM Andrew Burgess <aburgess@redhat.com> wrote:
>
> Andrew Burgess <aburgess@redhat.com> writes:
>
> > "H.J. Lu" <hjl.tools@gmail.com> writes:
> >
> >> Since MPX isn't available for x32, we should clear X86_XSTATE_MPX bits
> >> on x32.
> >>
> >> PR server/31511
> >> * linux-x86-low.cc (x86_linux_read_description): Clear
> >> X86_XSTATE_MPX bits in xcr0 on x32.
> >> ---
> >> gdbserver/linux-x86-low.cc | 4 ++++
> >> 1 file changed, 4 insertions(+)
> >>
> >> diff --git a/gdbserver/linux-x86-low.cc b/gdbserver/linux-x86-low.cc
> >> index 3af0a009052..933d1fb012a 100644
> >> --- a/gdbserver/linux-x86-low.cc
> >> +++ b/gdbserver/linux-x86-low.cc
> >> @@ -938,6 +938,10 @@ x86_linux_read_description (void)
> >> xcr0 = xstateregs[(I386_LINUX_XSAVE_XCR0_OFFSET
> >> / sizeof (uint64_t))];
> >>
> >> + /* No MPX on x32. */
> >> + if (machine == EM_X86_64 && !is_elf64)
> >> + xcr0 &= ~X86_XSTATE_MPX;
> >
> > Hi,
> >
> > I have a series in flight that conflicts with this change:
> >
> > https://inbox.sourceware.org/gdb-patches/cover.1706801009.git.aburgess@redhat.com
> >
> > And so I'm trying to resolve the conflicts.
>
> OK, I think I may have resolved the conflict. I'm still unable to test
> x32 ABI, would you mind applying this series:
>
> https://inbox.sourceware.org/gdb-patches/cover.1711211528.git.aburgess@redhat.com
>
> and checking that your x32 use case still behaves as you expect. The
> merge of our work occurs in this patch:
>
> https://inbox.sourceware.org/gdb-patches/a76168beacd9bb79b72ca1a0d26995abd770104c.1711211528.git.aburgess@redhat.com
>
> Also, I invite you to take a look at this additional patch which adds an
> extra assert that relates to your work:
>
> https://inbox.sourceware.org/gdb-patches/159cadba5ba824579cbc6426cb26f45228eda0a7.1711211528.git.aburgess@redhat.com
>
> Any feedback would be great.
>
I applied the whole patch series from
https://patchwork.sourceware.org/project/gdb/list/?series=32189
Both gdb and gdbserver work on x32.
Thanks.
--
H.J.
prev parent reply other threads:[~2024-03-23 17:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 11:13 H.J. Lu
2024-03-20 14:45 ` Willgerodt, Felix
2024-03-21 17:29 ` John Baldwin
2024-03-23 11:29 ` Andrew Burgess
2024-03-23 16:39 ` Andrew Burgess
2024-03-23 17:08 ` H.J. Lu [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='CAMe9rOrk3rO+uv2p=QqO=XnA3915=FUkv2L_sS_9jdr4ot7Ayw@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=aburgess@redhat.com \
--cc=felix.willgerodt@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
/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