mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/vsyscall/64: Use proper accessor to update p4d entry
@ 2018-03-19 14:31 Boris Ostrovsky
  2018-03-19 15:09 ` Juergen Gross
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Boris Ostrovsky @ 2018-03-19 14:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, mingo, hpa, luto, x86, jgross, Boris Ostrovsky

Writing to it directly does not work for Xen PV guests.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 arch/x86/entry/vsyscall/vsyscall_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c
index 8560ef68a9d6..317be365bce3 100644
--- a/arch/x86/entry/vsyscall/vsyscall_64.c
+++ b/arch/x86/entry/vsyscall/vsyscall_64.c
@@ -347,7 +347,7 @@ void __init set_vsyscall_pgtable_user_bits(pgd_t *root)
 	set_pgd(pgd, __pgd(pgd_val(*pgd) | _PAGE_USER));
 	p4d = p4d_offset(pgd, VSYSCALL_ADDR);
 #if CONFIG_PGTABLE_LEVELS >= 5
-	p4d->p4d |= _PAGE_USER;
+	set_p4d(p4d, __p4d(p4d_val(*p4d) | _PAGE_USER));
 #endif
 	pud = pud_offset(p4d, VSYSCALL_ADDR);
 	set_pud(pud, __pud(pud_val(*pud) | _PAGE_USER));
-- 
2.14.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-20 11:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 14:31 [PATCH] x86/vsyscall/64: Use proper accessor to update p4d entry Boris Ostrovsky
2018-03-19 15:09 ` Juergen Gross
2018-03-20  3:42 ` Andy Lutomirski
2018-03-20  8:09 ` [tip:x86/pti] " tip-bot for Boris Ostrovsky
2018-03-20 11:05 ` [tip:x86/pti] x86/vsyscall/64: Use proper accessor to update P4D entry tip-bot for Boris Ostrovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome