lguest: fix out-by-one error in address checking.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 27 May 2015 01:29:26 +0000 (10:59 +0930)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 9 Jun 2015 17:43:52 +0000 (13:43 -0400)
commit4941509f057cc50ba8420ac5f5e6ffdf8715c02a
tree06060d69995a8546ecdc41ae6b83e7c747ce18d5
parent45948a314fb5d29f92b8537dcf54888ed78bcecc
lguest: fix out-by-one error in address checking.

[ Upstream commit 83a35114d0e4583e6b0ca39502e68b6a92e2910c ]

This bug has been there since day 1; addresses in the top guest physical
page weren't considered valid.  You could map that page (the check in
check_gpte() is correct), but if a guest tried to put a pagetable there
we'd check that address manually when walking it, and kill the guest.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/lguest/core.c