Commit Message

[ Please retain sparclinux@vger.kernel.org on all of your replies. If
you don't I will totally ignore your email, as I've warned about it
and it's important for threads to stay on the list so everyone can
see all parts of the discussion. Thanks. ]
This is a draft patch that implements the fix for the problem
that we don't validate the physical address that a linear
mapping translates to.
This patch is good enough to bootup but when I log into X on
my ultra45 random apps start crashing and then the machine
basically wedges. So there are still some bugs to work out.
The nastiest problem is that we have to handle the case of
taking a TLB miss on the valid physical address bitmap itself.
So I just check if the fault is within the range of the table
and skip trying to load from the bitmap if so. Otherwise we
fault recursively forever and reset the machine.
I noticed that kern_valid_addr() was buggy in that it didn't
check against last_valid_pfn before trying to index into the
valid address bitmap. We only allocate the bitmap for that
much memory, so it's easy to feed kern_valid_addr() a bogus
address which will access past the bitmap memory.
Lastly, this sort of duplicates DEBUG_PAGEALLOC's functionality
so we can probably ifdef out these validation checks when
that debugging feature is enabled in the config.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html