On Mon, 2026-06-29 at 12:09 -0500, Bill Roberts wrote:
> > > + /* test that we can't use unlock to set shadow stack */
> > > + if (!ARCH_PRCTL(ARCH_SHSTK_UNLOCK, ARCH_SHSTK_SHSTK)) {
> > > + printf("[SKIP]\tCould enable Shadow stack via UNLOCK\n");
> > > + return 1;
> > > + }
> > More generally, we should not be able to use ARCH_SHSTK_UNLOCK here. Can we
> > make
> > the comment generic and not checking for a specific bug? Because it does
> > more
> > than that.
>
> Hey Rick, not really sure how I could make the git commit message and
> the comment
> more generic, as they seem really generic, can you please be more
> specific or give me
> a blurb you're looking for here?
I was thinking that the comment was specifically about ARCH_SHSTK_UNLOCK being
able to set shadow stack. But it is really testing whether ARCH_SHSTK_UNLOCK can
be called at all. So maybe:
/*
* Test that ARCH_SHSTK_UNLOCK can't be called
* from normal (non-ptrace) context.
*/