|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/PV: relax LDT address check
commit f289b9a4a7b2337288253671a12b9519fd275b8d
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jan 21 16:09:58 2016 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jan 21 16:09:58 2016 +0100
x86/PV: relax LDT address check
There's no point placing restrictions on its address when the LDT size
is zero.
Also convert a local variable to a slightly more efficient type.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/mm.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index b5d0ebc..f5b89de 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -3348,8 +3348,8 @@ long do_mmuext_op(
case MMUEXT_SET_LDT:
{
- unsigned long ptr = op.arg1.linear_addr;
- unsigned long ents = op.arg2.nr_ents;
+ unsigned int ents = op.arg2.nr_ents;
+ unsigned long ptr = ents ? op.arg1.linear_addr : 0;
if ( unlikely(d != pg_owner) )
rc = -EPERM;
@@ -3361,7 +3361,7 @@ long do_mmuext_op(
else if ( ((ptr & (PAGE_SIZE - 1)) != 0) || !__addr_ok(ptr) ||
(ents > 8192) )
{
- MEM_LOG("Bad args to SET_LDT: ptr=%lx, ents=%lx", ptr, ents);
+ MEM_LOG("Bad args to SET_LDT: ptr=%lx, ents=%x", ptr, ents);
rc = -EINVAL;
}
else if ( (curr->arch.pv_vcpu.ldt_ents != ents) ||
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |