Re: [PATCH 2/2] selftest/x86: test ARCH_SHSTK_UNLOCK
From: Bill Roberts
Date: Tue Jun 30 2026 - 11:15:14 EST
On 6/29/26 4:57 PM, Edgecombe, Rick P wrote:
On Mon, 2026-06-15 at 14:51 -0500, Bill Roberts wrote:
+ /* test that we can't use unlock to set shadow stack */Should it be a FAIL? And if this path is taken the test will crash because
+ if (!ARCH_PRCTL(ARCH_SHSTK_UNLOCK, ARCH_SHSTK_SHSTK)) {
+ printf("[SKIP]\tCould enable Shadow stack via UNLOCK\n");
shadow stack got accidentally enabled and we can't return from this function. It
can "goto out" and disable shadow stack before returning.
Yeah Rick, we can do that, not sure why I didn't do that in V1 :-p
+ return 1;
+ }
+
+ printf("[OK]\tCouldn't enable Shadow stack via UNLOCK\n");
+