On Fri, Nov 17, 2023 at 01:12:46PM -0800, Deepak Gupta wrote:
> On Tue, Nov 14, 2023 at 11:11:58PM +, Edgecombe, Rick P wrote:
> > It seems like there will be a need for some generic method of checking
> > if shadow stack is enabled. Maybe a more generic compiler
> > intrinsic/builtin or glibc
On Tue, Nov 14, 2023 at 11:11:58PM +, Edgecombe, Rick P wrote:
On Tue, 2023-11-14 at 20:05 +, Mark Brown wrote:
+static void test_shadow_stack_supported(void)
+{
+ long shadow_stack;
+
+ shadow_stack = syscall(__NR_map_shadow_stack, 0,
getpagesize(), 0);
Hmm, x86 fails thi
On Tue, 2023-11-14 at 15:11 -0800, Rick Edgecombe wrote:
> The other tests passed in both cases. I'm going to dig into the other
> parts now but can circle back if it's not obvious what's going on
> there.
Finally got back to this. I think it's just a problem with the shadow
stack detection logic
On Tue, Nov 14, 2023 at 11:11:58PM +, Edgecombe, Rick P wrote:
> On Tue, 2023-11-14 at 20:05 +, Mark Brown wrote:
> > + shadow_stack = syscall(__NR_map_shadow_stack, 0,
> > getpagesize(), 0);
> Hmm, x86 fails this call if user shadow stack is not supported in the
> HW or the kernel,
On Tue, 2023-11-14 at 20:05 +, Mark Brown wrote:
> +static void test_shadow_stack_supported(void)
> +{
> + long shadow_stack;
> +
> + shadow_stack = syscall(__NR_map_shadow_stack, 0,
> getpagesize(), 0);
Hmm, x86 fails this call if user shadow stack is not supported in the
HW or t
Add basic test coverage for specifying the shadow stack for a newly
created thread via clone3(), including coverage of the newly extended
argument structure. We detect support for shadow stacks on the running
system by attempting to allocate a shadow stack page during initialisation
using map_shado