Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182406
b: refs/heads/master
c: 40f9249
h: refs/heads/master
v: v3
  • Loading branch information
K.Prasad authored and Frederic Weisbecker committed Jan 29, 2010
1 parent 2212433 commit 731add8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e12a4a7a3a78bc9c3aaf3486dde3b8ab1cdf465
refs/heads/master: 40f9249a73f6c251adea492b1c3d19d39e2a9bda
3 changes: 3 additions & 0 deletions trunk/arch/x86/include/asm/debugreg.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
which debugging register was responsible for the trap. The other bits
are either reserved or not of interest to us. */

/* Define reserved bits in DR6 which are always set to 1 */
#define DR6_RESERVED (0xFFFF0FF0)

#define DR_TRAP0 (0x1) /* db0 */
#define DR_TRAP1 (0x2) /* db1 */
#define DR_TRAP2 (0x4) /* db2 */
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,9 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)

get_debugreg(dr6, 6);

/* Filter out all the reserved bits which are preset to 1 */
dr6 &= ~DR6_RESERVED;

/* Catch kmemcheck conditions first of all! */
if ((dr6 & DR_STEP) && kmemcheck_trap(regs))
return;
Expand Down

0 comments on commit 731add8

Please sign in to comment.