]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: Kill bogus TPC/address truncation during 32-bit faults.
authorDavid S. Miller <davem@davemloft.net>
Wed, 4 Feb 2009 00:28:23 +0000 (16:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Feb 2009 00:28:23 +0000 (16:28 -0800)
commit5bd4c17c380cb34f6175f84302f4b60f7528c19d
tree9f4c04e822ab9fff151d9d7aeb907915d8c79b20
parent0338b804f5edfac25a2055eeb1fa45d36ec232ad
sparc64: Kill bogus TPC/address truncation during 32-bit faults.

This builds upon ff753ca1d921283ef342c3eea81d5577b0c24b36
("sparc64: Validate kernel generated fault addresses on sparc64.")

Upon further consideration, we actually should never see any
fault addresses for 32-bit tasks with the upper 32-bits set.

If it does every happen, by definition it's a bug.  Whatever
context created that fault would only have that fault satisfied
if we used the full 64-bit address.  If we truncate it, we'll
always fault the wrong address and we'll always loop faulting
forever.

So catch such conditions and mark them as errors always.  Log
the error and fail the fault.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/mm/fault_64.c