Re: [PATCH] x86/shstk: Enable shadow stack for x32

From: H.J. Lu
Date: Fri Mar 15 2024 - 10:35:11 EST


On Fri, Mar 15, 2024 at 7:20 AM Edgecombe, Rick P
<rick.p.edgecombe@xxxxxxxxx> wrote:
>
> On Fri, 2024-03-15 at 07:04 -0700, H.J. Lu wrote:
> > 1. Add shadow stack support to x32 signal.
> > 2. Use the 64-bit map_shadow_stack syscall for x32.
> > 3. Set up shadow stack for x32.
> >
> > Tested with shadow stack enabled x32 glibc on Intel Tiger Lake.
> >
> > Cc: Rick P Edgecombe <rick.p.edgecombe@xxxxxxxxx>
> > Tested-by: H.J. Lu <hjl.tools@xxxxxxxxx>
> > Signed-off-by: H.J. Lu <hjl.tools@xxxxxxxxx>
>
> How many people do you think will use this?
>
> I would have thought it would require more changes for basic x32

This is all needed.

> operation. What was the testing exactly?

I configured x32 glibc with --enable-cet, build glibc and
run all glibc tests with shadow stack enabled. There are
no regressions. I verified that shadow stack is enabled
via /proc/pid/status.

--
H.J.