Re: [PATCH v5 18/39] mm: Handle faultless write upgrades for shstk
From: David Hildenbrand <hidden>
Date: 2023-02-01 18:04:56
Also in:
linux-api, linux-doc, linux-mm, lkml
From: David Hildenbrand <hidden>
Date: 2023-02-01 18:04:56
Also in:
linux-api, linux-doc, linux-mm, lkml
On 01.02.23 18:32, Edgecombe, Rick P wrote:
On Wed, 2023-02-01 at 10:03 +0100, David Hildenbrand wrote:quoted
quoted
The other problem is that one of NULL passers is not for kernel memory. huge_pte_mkwrite() calls pte_mkwrite(). Shadow stack memory can't be created with MAP_HUGETLB, so it is not needed. Using pte_mkwrite_kernel() would look weird in this case, but making huge_pte_mkwrite() take a VMA would be for no reason. Maybe making huge_pte_mkwrite() take a VMA is the better of those two options. Or keep the NULL semantics... Any thoughts?Well, the reason would be consistency. From a core-mm point of view it makes sense to handle this all consistency, even if the single user (x86) wouldn't strictly require it right now. I'd just pass in the VMA and call it a day :)Ok, I'll give it a spin.
It would be good to get more opinions on that, but I'm afraid we won't get more deep down in this thread :) -- Thanks, David / dhildenb