From: tip-bot for Andy Lutomirski <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, keescook@chromium.org, peterz@infradead.org,
brgerst@gmail.com, linux-kernel@vger.kernel.org,
xen-devel@lists.xen.org, dvrabel@cantab.net, jbeulich@suse.com,
andrew.cooper3@citrix.com, bp@alien8.de, david.vrabel@citrix.com,
luto@kernel.org, hpa@zytor.com, dvlasenk@redhat.com,
boris.ostrovsky@oracle.com, luto@amacapital.net,
torvalds@linux-foundation.org, mingo@kernel.org
Subject: [tip:x86/asm] x86/xen: Simplify set_aliased_prot()
Date: Sat, 11 Jun 2016 02:34:10 -0700 [thread overview]
Message-ID: <tip-99158f10e91768d34c5004c40c42f802b719bcae__46686.7268937223$1465641161$gmane$org@git.kernel.org> (raw)
In-Reply-To: <0706f1a2538e481194514197298cca6b5e3f2638.1464129798.git.luto@kernel.org>
Commit-ID: 99158f10e91768d34c5004c40c42f802b719bcae
Gitweb: http://git.kernel.org/tip/99158f10e91768d34c5004c40c42f802b719bcae
Author: Andy Lutomirski <luto@kernel.org>
AuthorDate: Tue, 24 May 2016 15:48:38 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 11 Jun 2016 11:28:11 +0200
x86/xen: Simplify set_aliased_prot()
A year ago, via the following commit:
aa1acff356bb ("x86/xen: Probe target addresses in set_aliased_prot() before the hypercall")
I added an explicit probe to work around a hypercall issue. The code can
be simplified by using probe_kernel_read().
No change in functionality.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: David Vrabel <david.vrabel@citrix.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: David Vrabel <dvrabel@cantab.net>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: xen-devel <xen-devel@lists.xen.org>
Link: http://lkml.kernel.org/r/0706f1a2538e481194514197298cca6b5e3f2638.1464129798.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/xen/enlighten.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 760789a..0f87db2 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -521,9 +521,7 @@ static void set_aliased_prot(void *v, pgprot_t prot)
preempt_disable();
- pagefault_disable(); /* Avoid warnings due to being atomic. */
- __get_user(dummy, (unsigned char __user __force *)v);
- pagefault_enable();
+ probe_kernel_read(&dummy, v, 1);
if (HYPERVISOR_update_va_mapping((unsigned long)v, pte, 0))
BUG();
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-06-11 9:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1464129798.git.luto@kernel.org>
2016-05-24 22:48 ` [PATCH 1/7] x86/xen: Simplify set_aliased_prot Andy Lutomirski
[not found] ` <0706f1a2538e481194514197298cca6b5e3f2638.1464129798.git.luto@kernel.org>
2016-05-25 9:38 ` Andrew Cooper
2016-05-25 9:50 ` David Vrabel
[not found] ` <57457582.9070608@citrix.com>
2016-06-10 22:12 ` Andy Lutomirski
[not found] ` <CALCETrWpo+QmdQ2n-QMojb954-oGgfHP0FBVbn6n6iR-+y6cNQ@mail.gmail.com>
2016-06-11 9:29 ` Ingo Molnar
2016-06-11 9:34 ` tip-bot for Andy Lutomirski [this message]
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-99158f10e91768d34c5004c40c42f802b719bcae__46686.7268937223$1465641161$gmane$org@git.kernel.org' \
--to=tipbot@zytor.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=david.vrabel@citrix.com \
--cc=dvlasenk@redhat.com \
--cc=dvrabel@cantab.net \
--cc=hpa@zytor.com \
--cc=jbeulich@suse.com \
--cc=keescook@chromium.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=xen-devel@lists.xen.org \
/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;
as well as URLs for NNTP newsgroup(s).