Re: [PATCH RFC/RFT v2 1/2] mm: helper `is_shadow_stack_vma` to check shadow stack vma

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 01, 2024 at 09:47:25PM +0000, Edgecombe, Rick P wrote:
On Wed, 2024-10-16 at 14:57 -0700, Deepak Gupta wrote:
VM_SHADOW_STACK (alias to VM_HIGH_ARCH_5) is used to encode shadow stack
VMA on three architectures (x86 shadow stack, arm GCS and RISC-V shadow
stack). In case architecture doesn't implement shadow stack, it's VM_NONE
Introducing a helper `is_shadow_stack_vma` to determine shadow stack vma
or not.

I don't understand why we need this. IIRC was some discussion about wanting to
abstract different ways of testing for shadow stack VMAs for different
architectures since risc-v was going to do it differently. But now this says
they are all the same, so what's wrong with the open coded check?


Yeah it was born out of the need due to risc-v overloading `VM_WRITE`. Given
that's out of the door, this helper is not useful for that need anymore.

However during rebasing I saw certain vma helpers were re-organized in a new
file `vma.h` and there was helper for stack as well. So I kept it.
I don't know if it's helpful or harmful. Let me know, I can let it go as well.





[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux