[Hardy-xen] SRU: Fix OMG how did this ever work (32bit)

Stefan Bader stefan.bader at canonical.com
Tue Jun 21 15:55:36 UTC 2011


SRU Justification:

Impact: For i386 PGDs are stored in a linked list. For this two elements of
struct page are (mis-)used. To have a backwards pointer, the private field is
assigned a pointer to the index field of the previous struct page. The main
problem there was that list_add and list_del operations accidentally were done
twice. Which leads to accesses to (after first list operation) innocent struct
pages.

Fix: This is a bit more than needed to fix the bug itself, but it will bring our
code more into a shape that resembles upstream (factually there is only a 2.6.18
upstream but that code did not do the double list access).

Testcase: Running a 32bit domU (64bit Hardy dom0, though that should not matter)
with the xen kernel and doing a lot of process starts (like the aslr qa
regression test does) would quite soon crash because the destructor of a PTE
(which incidentally is stored in index) was suddenly overwritten.

Patches are attached directly. Those would go into the patches directory.

Note, that I attributed it to fix bug 705562 which has not yet been verified.
But the way of failure was just exactly the same.

-Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-xen-Check-for-NULL-pointer-before-using-pgd.patch
Type: text/x-diff
Size: 1011 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20110621/00380b53/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-xen-Avoid-double-list-adds-frees-of-pgds.patch
Type: text/x-diff
Size: 7982 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20110621/00380b53/attachment-0001.patch>


More information about the kernel-team mailing list