[PATCH v3 3/9] x86/cet: Sync with Linux kernel 6.6 shadow stack interface
H.J. Lu
hjl.tools@gmail.com
Sat Dec 23 13:30:30 GMT 2023
On Fri, Dec 22, 2023 at 4:26 AM Adhemerval Zanella Netto
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 19/12/23 13:07, H.J. Lu wrote:
> > +
> > +#include <sysdep.h>
> > +#include <stdint.h>
> > +#include <errno.h>
> > +#include <sys/mman.h>
> > +#include <libc-pointer-arith.h>
> > +#include <allocate-shadow-stack.h>
> > +
> > +/* NB: This can be treated as a syscall by caller. */
> > +
> > +#ifndef __x86_64__
> > +__attribute__ ((regparm (2)))
> > +#endif
> > +long int
> > +__allocate_shadow_stack (size_t stack_size,
> > + shadow_stack_size_t *child_stack)
> > +{
>
> It is not clear t me why you need to support it for both i386 and x86_64,
> since it is used solely on x86_64 makecontext implementation. Also,
> __NR_map_shadow_stack is only defined for x86_64.
Fixed in the V5 patch.
Thanks.
--
H.J.
More information about the Libc-alpha
mailing list