[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/41] linux-user/aarch64: Reset btype for signals
From: |
Peter Maydell |
Subject: |
[PULL 30/41] linux-user/aarch64: Reset btype for signals |
Date: |
Tue, 20 Oct 2020 16:56:45 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
The kernel sets btype for the signal handler as if for a call.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20201016184207.786698-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
linux-user/aarch64/signal.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/linux-user/aarch64/signal.c b/linux-user/aarch64/signal.c
index d50c1ae5838..b591790c22e 100644
--- a/linux-user/aarch64/signal.c
+++ b/linux-user/aarch64/signal.c
@@ -506,10 +506,16 @@ static void target_setup_frame(int usig, struct
target_sigaction *ka,
+ offsetof(struct target_rt_frame_record, tramp);
}
env->xregs[0] = usig;
- env->xregs[31] = frame_addr;
env->xregs[29] = frame_addr + fr_ofs;
- env->pc = ka->_sa_handler;
env->xregs[30] = return_addr;
+ env->xregs[31] = frame_addr;
+ env->pc = ka->_sa_handler;
+
+ /* Invoke the signal handler as if by indirect call. */
+ if (cpu_isar_feature(aa64_bti, env_archcpu(env))) {
+ env->btype = 2;
+ }
+
if (info) {
tswap_siginfo(&frame->info, info);
env->xregs[1] = frame_addr + offsetof(struct target_rt_sigframe, info);
--
2.20.1
- [PULL 21/41] target/arm: Implement v8.1M NOCP handling, (continued)
- [PULL 21/41] target/arm: Implement v8.1M NOCP handling, Peter Maydell, 2020/10/20
- [PULL 22/41] target/arm: Implement v8.1M conditional-select insns, Peter Maydell, 2020/10/20
- [PULL 23/41] target/arm: Make the t32 insn[25:23]=111 group non-overlapping, Peter Maydell, 2020/10/20
- [PULL 24/41] target/arm: Don't allow BLX imm for M-profile, Peter Maydell, 2020/10/20
- [PULL 25/41] target/arm: Implement v8.1M branch-future insns (as NOPs), Peter Maydell, 2020/10/20
- [PULL 26/41] target/arm: Implement v8.1M low-overhead-loop instructions, Peter Maydell, 2020/10/20
- [PULL 27/41] target/arm: Fix has_vfp/has_neon ID reg squashing for M-profile, Peter Maydell, 2020/10/20
- [PULL 28/41] target/arm: Allow M-profile CPUs with FP16 to set FPSCR.FP16, Peter Maydell, 2020/10/20
- [PULL 31/41] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI, Peter Maydell, 2020/10/20
- [PULL 29/41] target/arm: Implement FPSCR.LTPSIZE for M-profile LOB extension, Peter Maydell, 2020/10/20
- [PULL 30/41] linux-user/aarch64: Reset btype for signals,
Peter Maydell <=
- [PULL 32/41] include/elf: Add defines related to GNU property notes for AArch64, Peter Maydell, 2020/10/20
- [PULL 33/41] linux-user/elfload: Avoid leaking interp_name using GLib memory API, Peter Maydell, 2020/10/20
- [PULL 35/41] linux-user/elfload: Adjust iteration over phdr, Peter Maydell, 2020/10/20
- [PULL 36/41] linux-user/elfload: Move PT_INTERP detection to first loop, Peter Maydell, 2020/10/20
- [PULL 38/41] linux-user/elfload: Use Error for load_elf_interp, Peter Maydell, 2020/10/20
- [PULL 34/41] linux-user/elfload: Fix coding style in load_elf_image, Peter Maydell, 2020/10/20
- [PULL 37/41] linux-user/elfload: Use Error for load_elf_image, Peter Maydell, 2020/10/20
- [PULL 39/41] linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes, Peter Maydell, 2020/10/20
- [PULL 40/41] linux-user/elfload: Parse GNU_PROPERTY_AARCH64_FEATURE_1_AND, Peter Maydell, 2020/10/20
- [PULL 41/41] tests/tcg/aarch64: Add bti smoke tests, Peter Maydell, 2020/10/20