]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Mon, 28 Nov 2016 21:22:41 +0000 (22:22 +0100)
commit2d5cba50a5b9ad14eda19ae0719d557437882178
treeaf97f4a6e3df4f51f9348cd4f38e0e234034a14a
parent9edbcfdced9628dfdc6dc54d625e571aef81a8a5
sparc: Don't leak context bits into thread->fault_address

[ Upstream commit 4f6deb8cbab532a8d7250bc09234c1795ecb5e2c ]

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/sparc/kernel/dtlb_prot.S
arch/sparc/kernel/ktlb.S
arch/sparc/kernel/tsb.S