Inter-revision diff: patch 6

Comparing v5 (message) to v4 (message)

--- v5
+++ v4
@@ -9,13 +9,11 @@
 
 Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
 ---
- arch/x86/entry/entry_64.S          |  2 +-
- arch/x86/include/asm/traps.h       |  3 ++
- arch/x86/kernel/idt.c              |  4 ++
- arch/x86/kernel/signal_compat.c    |  2 +-
- arch/x86/kernel/traps.c            | 64 ++++++++++++++++++++++++++++++
- include/uapi/asm-generic/siginfo.h |  3 +-
- 6 files changed, 75 insertions(+), 3 deletions(-)
+ arch/x86/entry/entry_64.S    |  2 +-
+ arch/x86/include/asm/traps.h |  3 ++
+ arch/x86/kernel/idt.c        |  4 +++
+ arch/x86/kernel/traps.c      | 58 ++++++++++++++++++++++++++++++++++++
+ 4 files changed, 66 insertions(+), 1 deletion(-)
 
 diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
 index 957dfb693ecc..5f4914e988df 100644
@@ -73,24 +71,11 @@
  };
  
  /*
-diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c
-index 9ccbf0576cd0..c572a3de1037 100644
---- a/arch/x86/kernel/signal_compat.c
-+++ b/arch/x86/kernel/signal_compat.c
-@@ -27,7 +27,7 @@ static inline void signal_compat_build_tests(void)
- 	 */
- 	BUILD_BUG_ON(NSIGILL  != 11);
- 	BUILD_BUG_ON(NSIGFPE  != 15);
--	BUILD_BUG_ON(NSIGSEGV != 7);
-+	BUILD_BUG_ON(NSIGSEGV != 8);
- 	BUILD_BUG_ON(NSIGBUS  != 5);
- 	BUILD_BUG_ON(NSIGTRAP != 5);
- 	BUILD_BUG_ON(NSIGCHLD != 6);
 diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
-index e6db475164ed..4188775681cf 100644
+index e6db475164ed..873765adc244 100644
 --- a/arch/x86/kernel/traps.c
 +++ b/arch/x86/kernel/traps.c
-@@ -578,6 +578,70 @@ do_general_protection(struct pt_regs *regs, long error_code)
+@@ -578,6 +578,64 @@ do_general_protection(struct pt_regs *regs, long error_code)
  }
  NOKPROBE_SYMBOL(do_general_protection);
  
@@ -114,7 +99,6 @@
 +do_control_protection(struct pt_regs *regs, long error_code)
 +{
 +	struct task_struct *tsk;
-+	siginfo_t info;
 +
 +	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 +	if (notify_die(DIE_TRAP, "control protection fault", regs,
@@ -149,31 +133,12 @@
 +		pr_cont("\n");
 +	}
 +
-+	clear_siginfo(&info);
-+	info.si_signo	= SIGSEGV;
-+	info.si_errno	= error_code;
-+	info.si_code	= SEGV_CPERR;
-+	info.si_addr	= (void __user*)uprobe_get_trap_addr(regs);
-+	force_sig_info(SIGSEGV, &info, tsk);
++	force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk);
 +}
 +NOKPROBE_SYMBOL(do_control_protection);
 +
  dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
  {
  #ifdef CONFIG_DYNAMIC_FTRACE
-diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h
-index 80e2a7227205..264d8e03270f 100644
---- a/include/uapi/asm-generic/siginfo.h
-+++ b/include/uapi/asm-generic/siginfo.h
-@@ -228,7 +228,8 @@ typedef struct siginfo {
- #define SEGV_ACCADI	5	/* ADI not enabled for mapped object */
- #define SEGV_ADIDERR	6	/* Disrupting MCD error */
- #define SEGV_ADIPERR	7	/* Precise MCD exception */
--#define NSIGSEGV	7
-+#define SEGV_CPERR	8
-+#define NSIGSEGV	8
- 
- /*
-  * SIGBUS si_codes
 -- 
 2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help