Skip to contentSkip to conversation

arm64: debug: remove noisy, pointless warning

PATCH New Will Deacon 2 participants 2 messages Apr 17, 2014 – Apr 21, 2014 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: debug: remove noisy, pointless warning

Sending a SIGTRAP to a user task after execution of a BRK instruction at EL0 is fundamental to the way in which software breakpoints work and doesn't deserve a warning to be logged in dmesg. Whilst the warning can be justified from EL1, do_debug_exception will already do the right thing, so simply remove the code altogether.

---
 arch/arm64/kernel/debug-monitors.c | 3 ---
 1 file changed, 3 deletions(-)
arch/arm64/kernel/debug-monitors.c +0 -3
index ed3955a95747..a7fb874b595e 100644
@@ -318,9 +318,6 @@ static int brk_handler(unsigned long addr, unsigned int esr,
 	if (call_break_hook(regs, esr) == DBG_HOOK_HANDLED)
 		return 0;
 
-	pr_warn("unexpected brk exception at %lx, esr=0x%x\n",
-			(long)instruction_pointer(regs), esr);
-
 	if (!user_mode(regs))
 		return -EFAULT;
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 arm64: debug: remove noisy, pointless warning

I am okay with this change, ACK.

Thanks,
~Sandeepa

Quoted 30 lines · Will Deacon

Sending a SIGTRAP to a user task after execution of a BRK instruction at EL0 is fundamental to the way in which software breakpoints work and doesn't deserve a warning to be logged in dmesg. Whilst the warning can be justified from EL1, do_debug_exception will already do the right thing, so simply remove the code altogether.

---
 arch/arm64/kernel/debug-monitors.c | 3 ---
 1 file changed, 3 deletions(-)
arch/arm64/kernel/debug-monitors.c +0 -4
index ed3955a95747..a7fb874b595e 100644
@@ -318,9 +318,6 @@ static int brk_handler(unsigned long addr, unsigned int esr,
        if (call_break_hook(regs, esr) == DBG_HOOK_HANDLED)
                return 0;
 
-       pr_warn("unexpected brk exception at %lx, esr=0x%x\n",
-                       (long)instruction_pointer(regs), esr);
-
        if (!user_mode(regs))
                return -EFAULT;
 
--

1.9.1