lkml.org 
[lkml]   [2021]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v21 08/26] x86/mm: Introduce _PAGE_COW
From
Date
On 3/1/2021 7:52 AM, Borislav Petkov wrote:
> On Wed, Feb 17, 2021 at 02:27:12PM -0800, Yu-cheng Yu wrote:

[...]

>> static inline pmd_t pmd_mkdirty(pmd_t pmd)
>> {
>> - return pmd_set_flags(pmd, _PAGE_DIRTY | _PAGE_SOFT_DIRTY);
>> + pmdval_t dirty = _PAGE_DIRTY;
>> +
>> + /* Avoid creating (HW)Dirty=1, Write=0 PMDs */
>> + if (cpu_feature_enabled(X86_FEATURE_SHSTK) && !(pmd_flags(pmd) & _PAGE_RW))
>
> !(pmd_write(pmd))
>

There is a problem of doing that: pmd_write() is defined after this
function. Maybe we can declare it first, or leave this as-is?

--
Yu-cheng

\
 
 \ /
  Last update: 2021-03-03 15:10    [W:0.125 / U:0.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site