Thread (110 messages) 110 messages, 8 authors, 2023-02-17

Re: [PATCH v5 18/39] mm: Handle faultless write upgrades for shstk

From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Date: 2023-02-01 17:34:00
Also in: linux-arch, linux-doc, linux-mm, lkml

On Wed, 2023-02-01 at 10:03 +0100, David Hildenbrand wrote:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help