]> git.baikalelectronics.ru Git - kernel.git/commit
sparc: Don't leak context bits into thread->fault_address
authorDavid S. Miller <davem@davemloft.net>
Thu, 28 Jul 2016 00:50:26 +0000 (17:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Jul 2016 00:50:26 +0000 (17:50 -0700)
commit8f14c99dca10e9d84fd24ff1e63bef2415c9a100
tree96a786e93f7da67cec53197cd148da61789b5ea4
parent4825794f2709ce8ae9a91f0f3e0687d6a5d81858
sparc: Don't leak context bits into thread->fault_address

On pre-Niagara systems, we fetch the fault address on data TLB
exceptions from the TLB_TAG_ACCESS register.  But this register also
contains the context ID assosciated with the fault in the low 13 bits
of the register value.

This propagates into current_thread_info()->fault_address and can
cause trouble later on.

So clear the low 13-bits out of the TLB_TAG_ACCESS value in the cases
where it matters.

Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/dtlb_prot.S
arch/sparc/kernel/ktlb.S
arch/sparc/kernel/tsb.S