lkml.org 
[lkml]   [2024]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v1 11/28] riscv: Implementing "PROT_SHADOWSTACK" on riscv
On Fri, Feb 09, 2024 at 08:44:35PM +0000, Edgecombe, Rick P wrote:
>On Wed, 2024-01-24 at 22:21 -0800, debug@rivosinc.com wrote:
>> +       /*
>> +        * PROT_SHADOWSTACK is a kernel only protection flag on risc-
>> v.
>> +        * mmap doesn't expect PROT_SHADOWSTACK to be set by user
>> space.
>> +        * User space can rely on `map_shadow_stack` syscall to
>> create
>> +        * shadow stack pages.
>> +        */
>> +       if (unlikely(prot & PROT_SHADOWSTACK))
>> +               return -EINVAL;
>
>Are you sure you need PROT_SHADOWSTACK? Since you are passing
>VM_SHADOW_STACK into do_mmap() directly.

Sorry for (very) late response.
In this patch series since VM_SHADOW_STACK was an alias to VM_WRITE.
And that's why I needed PROT_SHADOWSTACK to disambiguate.

I am updating my patches and going with ARCH_5 bit (and thus only 64bit support).
So x86, aarch64 and risc-v will be using same bit position.


\
 
 \ /
  Last update: 2024-05-27 15:15    [W:0.060 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site