diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c index e4a6fe8354f0..577fa8adb785 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -37,6 +37,7 @@ #include #include #include +#include #define CREATE_TRACE_POINTS #include "vsyscall_trace.h" @@ -351,15 +352,15 @@ void __init set_vsyscall_pgtable_user_bits(pgd_t *root) pmd_t *pmd; pgd = pgd_offset_pgd(root, VSYSCALL_ADDR); - pgd->pgd |= _PAGE_USER; + set_pgd(pgd, __pgd(pgd_val(*pgd) | _PAGE_USER)); p4d = p4d_offset(pgd, VSYSCALL_ADDR); #if CONFIG_PGTABLE_LEVELS >= 5 p4d->p4d |= _PAGE_USER; #endif pud = pud_offset(p4d, VSYSCALL_ADDR); - pud->pud |= _PAGE_USER; + set_pud(pud, __pud(pud_val(*pud) | _PAGE_USER)); pmd = pmd_offset(pud, VSYSCALL_ADDR); - pmd->pmd |= _PAGE_USER; + set_pmd(pmd, __pmd(pmd_val(*pmd) | _PAGE_USER)); } void __init map_vsyscall(void)