summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-08-27 09:12:33 +0300
committerWill Deacon <will.deacon@arm.com>2015-08-27 11:55:26 +0300
commit674c242c9323d3c293fc4f9a3a3a619fe3063290 (patch)
treed57a5528cbc4c6362ba74bec58ce7d7f88ffbb81 /drivers
parent5166c20ef95be89d10ffe0140e74df5cf26e9786 (diff)
downloadlinux-674c242c9323d3c293fc4f9a3a3a619fe3063290.tar.xz
arm64: flush FP/SIMD state correctly after execve()
When a task calls execve(), its FP/SIMD state is flushed so that none of the original program state is observeable by the incoming program. However, since this flushing consists of setting the in-memory copy of the FP/SIMD state to all zeroes, the CPU field is set to CPU 0 as well, which indicates to the lazy FP/SIMD preserve/restore code that the FP/SIMD state does not need to be reread from memory if the task is scheduled again on CPU 0 without any other tasks having entered userland (or used the FP/SIMD in kernel mode) on the same CPU in the mean time. If this happens, the FP/SIMD state of the old program will still be present in the registers when the new program starts. So set the CPU field to the invalid value of NR_CPUS when performing the flush, by calling fpsimd_flush_task_state(). Cc: <stable@vger.kernel.org> Reported-by: Chunyan Zhang <chunyan.zhang@spreadtrum.com> Reported-by: Janet Liu <janet.liu@spreadtrum.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions