[CRIU] [PATCH 08/44] parasite-syscall.c: introduced the macro ARCH_SI_TRAP.
Alexander Kartashov
alekskartashov at parallels.com
Mon Jan 7 10:04:37 EST 2013
The macro is introduced to abstract from behavior of breakpoints:
they generate different values of the field siginfo.si_code on different architectures.
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
arch/x86/include/asm/parasite-syscall.h | 4 ++++
parasite-syscall.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/parasite-syscall.h b/arch/x86/include/asm/parasite-syscall.h
index d517a42..9eec2ee 100644
--- a/arch/x86/include/asm/parasite-syscall.h
+++ b/arch/x86/include/asm/parasite-syscall.h
@@ -1,6 +1,10 @@
#ifndef __CR_ASM_PARASITE_SYSCALL_H__
#define __CR_ASM_PARASITE_SYSCALL_H__
+
+#define ARCH_SI_TRAP SI_KERNEL
+
+
extern const char code_syscall[];
extern const int code_syscall_size;
diff --git a/parasite-syscall.c b/parasite-syscall.c
index cb8581d..d5e8c98 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -97,7 +97,7 @@ again:
goto err;
}
- if (WSTOPSIG(status) != SIGTRAP || siginfo.si_code != SI_KERNEL) {
+ if (WSTOPSIG(status) != SIGTRAP || siginfo.si_code != ARCH_SI_TRAP) {
retry_signal:
pr_debug("** delivering signal %d si_code=%d\n",
siginfo.si_signo, siginfo.si_code);
--
1.7.10.4
More information about the CRIU
mailing list