lkml.org 
[lkml]   [2024]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 09/29] mm: abstract shadow stack vma behind `vma_is_shadow_stack`
On Thu, Apr 04, 2024 at 09:02:17PM +0200, David Hildenbrand wrote:
>On 04.04.24 01:34, Deepak Gupta wrote:
>> }
>>- } else if (!(vm_flags & VM_READ)) {
>>+ } else if (!(vm_flags & VM_READ) && !vma_is_shadow_stack(vm_flags)) {
>>+ /* reads allowed if its shadow stack vma */
>> if (!(gup_flags & FOLL_FORCE))
>> return -EFAULT;
>> /*
>
>Unless I am missing something, this is not a simple cleanup. It should
>go into a separate patch with a clearly documented reason for that
>change.

I tried that here
https://lore.kernel.org/linux-mm/CAKC1njTPBqtsAOn-CWhB+-8FaZ2KWkkz-vRZr7MZq=0yLUdjcQ@mail.gmail.com/T/
But at that time, VM_SHADOW_STACK for riscv meant only VM_WRITE. So I think
there was obvious uneasiness with that part.

Now we have VM_SHADOW_STACK pretty much same for all arches and only 64bit.
I'll try it again as a separate patch.

>
>--
>Cheers,
>
>David / dhildenb
>

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