Skip to content

Commit 31ad7f8

Browse files
Boris OstrovskyIngo Molnar
authored andcommitted
x86/vsyscall/64: Use proper accessor to update P4D entry
Writing to it directly does not work for Xen PV guests. Fixes: 49275fe ("x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy") Signed-off-by: Boris Ostrovsky <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Acked-by: Andy Lutomirski <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 5927145 commit 31ad7f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/entry/vsyscall/vsyscall_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ void __init set_vsyscall_pgtable_user_bits(pgd_t *root)
347347
set_pgd(pgd, __pgd(pgd_val(*pgd) | _PAGE_USER));
348348
p4d = p4d_offset(pgd, VSYSCALL_ADDR);
349349
#if CONFIG_PGTABLE_LEVELS >= 5
350-
p4d->p4d |= _PAGE_USER;
350+
set_p4d(p4d, __p4d(p4d_val(*p4d) | _PAGE_USER));
351351
#endif
352352
pud = pud_offset(p4d, VSYSCALL_ADDR);
353353
set_pud(pud, __pud(pud_val(*pud) | _PAGE_USER));

0 commit comments

Comments
 (0)