diff options
Diffstat (limited to 'arch/arm/kernel/signal.c')
-rw-r--r-- | arch/arm/kernel/signal.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 296786bdbb73..1c16c35c271a 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -392,14 +392,19 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, | |||
392 | if (ksig->ka.sa.sa_flags & SA_SIGINFO) | 392 | if (ksig->ka.sa.sa_flags & SA_SIGINFO) |
393 | idx += 3; | 393 | idx += 3; |
394 | 394 | ||
395 | /* | ||
396 | * Put the sigreturn code on the stack no matter which return | ||
397 | * mechanism we use in order to remain ABI compliant | ||
398 | */ | ||
395 | if (__put_user(sigreturn_codes[idx], rc) || | 399 | if (__put_user(sigreturn_codes[idx], rc) || |
396 | __put_user(sigreturn_codes[idx+1], rc+1)) | 400 | __put_user(sigreturn_codes[idx+1], rc+1)) |
397 | return 1; | 401 | return 1; |
398 | 402 | ||
399 | if (cpsr & MODE32_BIT) { | 403 | if ((cpsr & MODE32_BIT) && !IS_ENABLED(CONFIG_ARM_MPU)) { |
400 | /* | 404 | /* |
401 | * 32-bit code can use the new high-page | 405 | * 32-bit code can use the new high-page |
402 | * signal return code support. | 406 | * signal return code support except when the MPU has |
407 | * protected the vectors page from PL0 | ||
403 | */ | 408 | */ |
404 | retcode = KERN_SIGRETURN_CODE + (idx << 2) + thumb; | 409 | retcode = KERN_SIGRETURN_CODE + (idx << 2) + thumb; |
405 | } else { | 410 | } else { |