Re: [PATCH v9 01/26] 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, Feb 07, 2025 at 03:44:27PM -0800, Deepak Gupta wrote:
On Fri, Feb 07, 2025 at 10:27:10AM +0100, Vlastimil Babka wrote:
On 2/5/25 02:21, Deepak Gupta wrote:
VM_SHADOW_STACK (alias to VM_HIGH_ARCH_5) is used to encode shadow stack

I see that arm GCS uses VM_HIGH_ARCH_6.

VMA on three architectures (x86 shadow stack, arm GCS and RISC-V shadow

And RISC-V doesn't define it at all, not even in this patchset, or did I
miss it somewhere?


hmm...
Something wrong in my workflow and rebasing.
Thanks for catching this.

I think this is the miss on my part.

I had this patch in last series which introduces `ARCH_HAS_USER_SHADOW_STACK`
https://lore.kernel.org/all/20241111-v5_user_cfi_series-v8-1-dce14aa30207@xxxxxxxxxxxx/

As part of above patch, `CONFIG_X86_USER_SHADOW_STACK` was replaced with
`CONFIG_ARCH_HAS_USER_SHADOW_STACK` in `mm.h` to define VM_SHADOW_STACK
as VM_HIGH_ARCH_5. It was all fine because all 3 arches were using VM_HIGH_ARCH_5.
However as things progressed on, arm64 ended up using VM_HIGH_ARCH_6. But
arm64 gcs patches also landed the introduction of `ARCH_HAS_USER_SHADOW_STACK`.
So I dropped this patch from my v9 and didn't pay attention and actually missed
the definition.


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.




[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