From: tip-bot for Boris Ostrovsky <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, jgross@suse.com, mingo@kernel.org,
tglx@linutronix.de, boris.ostrovsky@oracle.com, luto@kernel.org,
hpa@zytor.com
Subject: [tip:x86/pti] x86/vsyscall/64: Use proper accessor to update p4d entry
Date: Tue, 20 Mar 2018 01:09:51 -0700 [thread overview]
Message-ID: <tip-f9ee6990bd505ecefa014f5e699b3c4d25860d80@git.kernel.org> (raw)
In-Reply-To: <20180319143154.3742-1-boris.ostrovsky@oracle.com>
Commit-ID: f9ee6990bd505ecefa014f5e699b3c4d25860d80
Gitweb: https://git.kernel.org/tip/f9ee6990bd505ecefa014f5e699b3c4d25860d80
Author: Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Mon, 19 Mar 2018 10:31:54 -0400
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 20 Mar 2018 09:04:51 +0100
x86/vsyscall/64: Use proper accessor to update p4d entry
Writing to it directly does not work for Xen PV guests.
Fixes: 49275fef986a ("x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy")
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Andy Lutomirski <luto@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180319143154.3742-1-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));
next prev parent reply other threads:[~2018-03-20 8:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-19 14:31 [PATCH] " Boris Ostrovsky
2018-03-19 15:09 ` Juergen Gross
2018-03-20 3:42 ` Andy Lutomirski
2018-03-20 8:09 ` tip-bot for Boris Ostrovsky [this message]
2018-03-20 11:05 ` [tip:x86/pti] x86/vsyscall/64: Use proper accessor to update P4D entry tip-bot for Boris Ostrovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-f9ee6990bd505ecefa014f5e699b3c4d25860d80@git.kernel.org \
--to=tipbot@zytor.com \
--cc=boris.ostrovsky@oracle.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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