diff options
author | Will Deacon <will.deacon@arm.com> | 2018-02-20 14:16:29 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-03-06 18:52:22 +0000 |
commit | 2c9120f3a86a809518ece1787d76ae07dd01e01b (patch) | |
tree | 3d4a4cd0c4454122dc14d5f1a2feb1fd66619074 /arch/arm64/kernel/fpsimd.c | |
parent | e0f6429dc1c0aeac8439e16a0c8e2539f401190f (diff) | |
download | op-kernel-dev-2c9120f3a86a809518ece1787d76ae07dd01e01b.zip op-kernel-dev-2c9120f3a86a809518ece1787d76ae07dd01e01b.tar.gz |
arm64: signal: Make force_signal_inject more robust
force_signal_inject is a little flakey:
* It only knows about SIGILL and SIGSEGV, so can potentially deliver
other signals based on a partially initialised siginfo_t
* It sets si_addr to point at the PC for SIGSEGV
* It always operates on current, so doesn't need the regs argument
This patch fixes these issues by always assigning the si_addr field to
the address parameter of the function and updates the callers (including
those that indirectly call via arm64_notify_segfault) accordingly.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/fpsimd.c')
-rw-r--r-- | arch/arm64/kernel/fpsimd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index e7226c4..6964ff8 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -285,8 +285,7 @@ static void task_fpsimd_save(void) * re-enter user with corrupt state. * There's no way to recover, so kill it: */ - force_signal_inject( - SIGKILL, 0, current_pt_regs(), 0); + force_signal_inject(SIGKILL, 0, 0); return; } @@ -831,7 +830,7 @@ asmlinkage void do_sve_acc(unsigned int esr, struct pt_regs *regs) { /* Even if we chose not to use SVE, the hardware could still trap: */ if (unlikely(!system_supports_sve()) || WARN_ON(is_compat_task())) { - force_signal_inject(SIGILL, ILL_ILLOPC, regs, 0); + force_signal_inject(SIGILL, ILL_ILLOPC, regs->pc); return; } |