summaryrefslogtreecommitdiffstats
path: root/linux-user/include
diff options
context:
space:
mode:
authorRichard Henderson2022-02-08 07:30:42 +0100
committerRichard Henderson2022-02-08 22:47:09 +0100
commitc8c89a6a30be0e6f24e6a56d4ef181ec0e4dd064 (patch)
treef559909b73cce14db0b36621883ab482c1f8a04f /linux-user/include
parentcommon-user/host/sparc64: Fix safe_syscall_base (diff)
downloadqemu-c8c89a6a30be0e6f24e6a56d4ef181ec0e4dd064.tar.gz
qemu-c8c89a6a30be0e6f24e6a56d4ef181ec0e4dd064.tar.xz
qemu-c8c89a6a30be0e6f24e6a56d4ef181ec0e4dd064.zip
linux-user: Introduce host_signal_mask
Do not directly access the uc_sigmask member. This is preparation for a sparc64 fix. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/include')
-rw-r--r--linux-user/include/host/aarch64/host-signal.h5
-rw-r--r--linux-user/include/host/alpha/host-signal.h5
-rw-r--r--linux-user/include/host/arm/host-signal.h5
-rw-r--r--linux-user/include/host/i386/host-signal.h5
-rw-r--r--linux-user/include/host/loongarch64/host-signal.h5
-rw-r--r--linux-user/include/host/mips/host-signal.h5
-rw-r--r--linux-user/include/host/ppc/host-signal.h5
-rw-r--r--linux-user/include/host/riscv/host-signal.h5
-rw-r--r--linux-user/include/host/s390/host-signal.h5
-rw-r--r--linux-user/include/host/sparc/host-signal.h5
-rw-r--r--linux-user/include/host/x86_64/host-signal.h5
11 files changed, 55 insertions, 0 deletions
diff --git a/linux-user/include/host/aarch64/host-signal.h b/linux-user/include/host/aarch64/host-signal.h
index 9770b36dc1..76ab078069 100644
--- a/linux-user/include/host/aarch64/host-signal.h
+++ b/linux-user/include/host/aarch64/host-signal.h
@@ -40,6 +40,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.pc = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
struct _aarch64_ctx *hdr;
diff --git a/linux-user/include/host/alpha/host-signal.h b/linux-user/include/host/alpha/host-signal.h
index f4c942948a..a44d670f2b 100644
--- a/linux-user/include/host/alpha/host-signal.h
+++ b/linux-user/include/host/alpha/host-signal.h
@@ -21,6 +21,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.sc_pc = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
uint32_t *pc = (uint32_t *)host_signal_pc(uc);
diff --git a/linux-user/include/host/arm/host-signal.h b/linux-user/include/host/arm/host-signal.h
index 6c095773c0..bbeb4ffefb 100644
--- a/linux-user/include/host/arm/host-signal.h
+++ b/linux-user/include/host/arm/host-signal.h
@@ -21,6 +21,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.arm_pc = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
/*
diff --git a/linux-user/include/host/i386/host-signal.h b/linux-user/include/host/i386/host-signal.h
index abe1ece5c9..fd36f06bda 100644
--- a/linux-user/include/host/i386/host-signal.h
+++ b/linux-user/include/host/i386/host-signal.h
@@ -21,6 +21,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.gregs[REG_EIP] = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
return uc->uc_mcontext.gregs[REG_TRAPNO] == 0xe
diff --git a/linux-user/include/host/loongarch64/host-signal.h b/linux-user/include/host/loongarch64/host-signal.h
index 7effa24251..a9dfe0c688 100644
--- a/linux-user/include/host/loongarch64/host-signal.h
+++ b/linux-user/include/host/loongarch64/host-signal.h
@@ -21,6 +21,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.__pc = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
const uint32_t *pinsn = (const uint32_t *)host_signal_pc(uc);
diff --git a/linux-user/include/host/mips/host-signal.h b/linux-user/include/host/mips/host-signal.h
index c666ed8c3f..ff840dd491 100644
--- a/linux-user/include/host/mips/host-signal.h
+++ b/linux-user/include/host/mips/host-signal.h
@@ -21,6 +21,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.pc = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
#if defined(__misp16) || defined(__mips_micromips)
#error "Unsupported encoding"
#endif
diff --git a/linux-user/include/host/ppc/host-signal.h b/linux-user/include/host/ppc/host-signal.h
index 1d8e658ff7..730a321d98 100644
--- a/linux-user/include/host/ppc/host-signal.h
+++ b/linux-user/include/host/ppc/host-signal.h
@@ -21,6 +21,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.regs->nip = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
return uc->uc_mcontext.regs->trap != 0x400
diff --git a/linux-user/include/host/riscv/host-signal.h b/linux-user/include/host/riscv/host-signal.h
index a4f170efb0..aceae544f2 100644
--- a/linux-user/include/host/riscv/host-signal.h
+++ b/linux-user/include/host/riscv/host-signal.h
@@ -21,6 +21,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.__gregs[REG_PC] = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
/*
diff --git a/linux-user/include/host/s390/host-signal.h b/linux-user/include/host/s390/host-signal.h
index a524f2ab00..e454cea54a 100644
--- a/linux-user/include/host/s390/host-signal.h
+++ b/linux-user/include/host/s390/host-signal.h
@@ -21,6 +21,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.psw.addr = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
uint16_t *pinsn = (uint16_t *)host_signal_pc(uc);
diff --git a/linux-user/include/host/sparc/host-signal.h b/linux-user/include/host/sparc/host-signal.h
index 7342936071..158918f2ec 100644
--- a/linux-user/include/host/sparc/host-signal.h
+++ b/linux-user/include/host/sparc/host-signal.h
@@ -29,6 +29,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
#endif
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
uint32_t insn = *(uint32_t *)host_signal_pc(uc);
diff --git a/linux-user/include/host/x86_64/host-signal.h b/linux-user/include/host/x86_64/host-signal.h
index c71d597eb2..d64d076625 100644
--- a/linux-user/include/host/x86_64/host-signal.h
+++ b/linux-user/include/host/x86_64/host-signal.h
@@ -20,6 +20,11 @@ static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
uc->uc_mcontext.gregs[REG_RIP] = pc;
}
+static inline void *host_signal_mask(ucontext_t *uc)
+{
+ return &uc->uc_sigmask;
+}
+
static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
{
return uc->uc_mcontext.gregs[REG_TRAPNO] == 0xe