RE: [PATCH v5 00/12] Add CET shadow stack support

Schimpe, Christina
2025-07-28T17:20:59Z

Hi Luis,

> -----Original Message-----
> From: Luis Machado <luis.machado@arm.com>
> Sent: Monday, July 28, 2025 7:06 PM
> To: Schimpe, Christina <christina.schimpe@intel.com>; gdb-
> patches@sourceware.org
> Cc: thiago.bauermann@linaro.org; Andrew Burgess <aburgess@redhat.com>
> Subject: Re: [PATCH v5 00/12] Add CET shadow stack support
>
> Hi Christina,
>
> Sorry, only spotted this now.
>
> On 7/23/25 13:45, Schimpe, Christina wrote:
> > Hi Luis,
> >
> > I finally also tested x32 and it looks good, there was only one issue
> > with the new coredump test due to RDSSPD/RDSSPQ instructions for
> > reading the shadow stack pointer:
> > amd64-shadow-stack-corefile.c:26: Error: operand size mismatch for
> `rdsspq'
> >
> > So I have to adapt the instruction for x32 to "rdsspd " to copy low 32 bits
> only.
> >
> > I suggest to fix the testfile as follows:
> > ~~~
> > diff --git a/gdb/testsuite/gdb.arch/amd64-shadow-stack-corefile.c
> > b/gdb/testsuite/gdb.arch/amd64-shadow-stack-corefile.c
> > index f078e33810d..5e84793ccb1 100644
> > --- a/gdb/testsuite/gdb.arch/amd64-shadow-stack-corefile.c
> > +++ b/gdb/testsuite/gdb.arch/amd64-shadow-stack-corefile.c
> > @@ -23,7 +23,11 @@ void
> > function ()
> > {
> > unsigned long ssp;
> > - asm volatile("xor %0, %0; rdsspq %0" : "=r" (ssp));
> > + #ifndef __ILP32__
> > + asm volatile ("xor %0, %0; rdsspq %0" : "=r" (ssp)); #else
> > + asm volatile ("xor %0, %0; rdsspd %0" : "=r" (ssp)); #endif
> > ~~~
> >
> > Would that be fine ore should I repost the patch?
> >
> > Other than that I'll retest again with latest upstream master and push this
> tomorrow.
> >
>
> That's fine by me. I see Andrew had some comments on your series. Are
> those addressed locally now or are you still working on them?

Thank you for the feedback.

I replied and had some questions, so I am waiting for Andrew's feedback.
Now I think it would make sense to post a new version actually,
as Andrew's feedback addresses not only testcode or comments.
But I thought I'd wait a bit until everything is clear before doing that.

Just FYI, I also had a short discussion with Thiago regarding GDB 17 release:
https://sourceware.org/pipermail/gdb-patches/2025-July/219463.html

Regards,
Christina
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928