]> git.baikalelectronics.ru Git - kernel.git/commit
lguest: Revert 31859cb106109f80eabe1937004d3d804e373e70, fix real problem.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 11 Mar 2008 14:35:57 +0000 (09:35 -0500)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 10 Mar 2008 22:35:58 +0000 (09:35 +1100)
commitf4a64288d313dda90ea5839acdff8da01f171a39
tree4b23d512d6cbe26ac2b4a0dfaff7e415bd1dab7c
parentac72fd69c995e65edf4e9a09236c93966d030a6c
lguest: Revert 31859cb106109f80eabe1937004d3d804e373e70, fix real problem.

Ahmed managed to crash the Host in release_pgd(), which cannot be a Guest
bug, and indeed it wasn't.

The bug was that handing a 0 as the address of the toplevel page table
being manipulated can cause the lookup code in find_pgdir() to return
an uninitialized cache entry (we shadow up to 4 top level page tables
for each Guest).

Commit 92d2679d388a5a00b884830bb7901ef6b7528d8e introduced this
behaviour in the Guest, uncovering the bug.

The patch which he submitted (which removed the /4 from the index
calculation) simply ensured that these high-indexed entries hit the
early exit path of guest_set_pmd().  But you get lots of segfaults in
guest userspace as the PMDs aren't being updated.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
arch/x86/lguest/boot.c
drivers/lguest/page_tables.c