]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork
authorAndré Hentschel <nerv@dawncrow.de>
Tue, 18 Jun 2013 22:23:26 +0000 (23:23 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 24 Jun 2013 14:21:59 +0000 (15:21 +0100)
commit91eb8c03fcad9f2d9b2c764c7d2dd2500ad897c9
treeead0e79b4f797a26cc30fc1596ada6fd6da5daf6
parent8010f633a05b6d2131fb9c7dca6e2a7f6ab43e69
ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork

Since commit 1cbada5f41fc the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.

There are more and more applications coming to Windows RT,
Wine could support them, but mostly they expect to have
the thread environment block (TEB) in TPIDRURW.

This patch preserves that register per thread instead of clearing it.
Unlike the TPIDRURO, which is already switched, the TPIDRURW
can be updated from userspace so needs careful treatment in the case that we
modify TPIDRURW and call fork(). To avoid this we must always read
TPIDRURW in copy_thread.

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/thread_info.h
arch/arm/include/asm/tls.h
arch/arm/kernel/entry-armv.S
arch/arm/kernel/process.c
arch/arm/kernel/ptrace.c
arch/arm/kernel/traps.c