lkml.org 
[lkml]   [2023]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v5 18/39] mm: Handle faultless write upgrades for shstk
    Date
    On Wed, 2023-02-01 at 10:03 +0100, David Hildenbrand wrote:
    > >
    > > 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.
    \
     
     \ /
      Last update: 2023-03-27 00:06    [W:4.166 / U:0.548 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site