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

Luis Machado
2025-07-14T07:14:26Z

On 7/13/25 20:05, Luis Machado wrote:
> Hi,
>
> On 7/13/25 15:01, Schimpe, Christina wrote:
>> Hi Luis,
>>
>> Thanks for sharing that info.
>> I tried to reproduces with the same ubuntu & kernel versions and a very similar system but am not successful so far...
>> Just to be sure, I assume you test with gcc compiler (which version?) and compiled GDB with latest upstream master + my cet shadow stack patches?
>
> Interesting. GCC says: gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
>
> I applied the CET shadow stack patches from v5. And yes, gdb is the latest tip-of-tree.
>>
>> Do you see this for target_board=native-gdbserver and target_board=unix?
>
> No. native-gdbserver, native-extended-gdbserver and unix work just fine.
>
> Let me have another look to see what might be going on.

Heh, found it. I had a freshly-installed system and was missing libexpat-dev, so no XML was being generated.

With libexpat-dev installed, everything looks fine. So this is good. Sorry for the noise.

I spotted two things while building gdb with the patch series applied

There is a uninitialized usage warning

gdb/nat/x86-linux.c:151:12: warning: ‘ecx’ may be used uninitialized [-Wmaybe-uninitialized]
151 | if ((ecx & bit_SHSTK) == 0)
| ~~~~~^~~~~~~~~~~~
../../../repos/binutils-gdb/gdb/nat/x86-linux.c:147:26: note: ‘ecx’ was declared here
147 | unsigned int eax, ebx, ecx, edx;

Also, git am seems to complain about some whitespace issues:

Applying: gdb, gdbserver: Add support of Intel shadow stack pointer register.
.git/rebase-apply/patch:596: indent with spaces.
# Having unavailable registers leads to a fall back to the standard
.git/rebase-apply/patch:597: indent with spaces.
# unwinders. Don't add unavailable registers to avoid this.
.git/rebase-apply/patch:598: indent with spaces.
if (str (val) == "<unavailable>"):
.git/rebase-apply/patch:599: indent with spaces.
continue
.git/rebase-apply/patch:587: new blank line at EOF.
+
warning: 5 lines add whitespace errors.

Could you please address those locally?

Otherwise...

Approved-By: Luis Machado <luis.machado@arm.com>

I'd give this another week in case someone has any more comments, and then push it.

Thanks for the series.