diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-12 09:53:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-12 09:53:47 -0700 |
| commit | 9925cc1396339da25d5ef477be1f8c41b2391918 (patch) | |
| tree | 0644d6a190aacaadae559d38520cb9d49a3348c7 /arch/arm64/kernel/sys_compat.c | |
| parent | 753a6cb7e4fc112e2f120ca02d167535382e9cec (diff) | |
| parent | eb35bdd7bca29a13c8ecd44e6fd747a84ce675db (diff) | |
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon:
"Just a couple of stragglers here:
- fix an issue migrating interrupts on CPU hotplug
- fix a potential information leak of TLS registers across an exec
(Nathan has sent a corresponding patch for arch/arm/ to rmk)"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: flush TLS registers during exec
arm64: use irq_set_affinity with force=false when migrating irqs
Diffstat (limited to 'arch/arm64/kernel/sys_compat.c')
| -rw-r--r-- | arch/arm64/kernel/sys_compat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/kernel/sys_compat.c b/arch/arm64/kernel/sys_compat.c index de2b0226e06d..dc47e53e9e28 100644 --- a/arch/arm64/kernel/sys_compat.c +++ b/arch/arm64/kernel/sys_compat.c @@ -79,6 +79,12 @@ long compat_arm_syscall(struct pt_regs *regs) case __ARM_NR_compat_set_tls: current->thread.tp_value = regs->regs[0]; + + /* + * Protect against register corruption from context switch. + * See comment in tls_thread_flush. + */ + barrier(); asm ("msr tpidrro_el0, %0" : : "r" (regs->regs[0])); return 0; |
