lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yyi3b4h25jj.wl@toshiba.co.jp>
Date:	Wed, 07 Mar 2007 10:42:08 +0900
From:	Tsutomu OWA <tsutomu.owa@...hiba.co.jp>
To:	mingo@...e.hu
Cc:	linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org,
	tsutomu.owa@...hiba.co.jp
Subject: [RFC] [patch 4/6 -rt] powerpc 2.6.20-rt8: fix a runtime warnings for xmon


  To fix the following runtime warnings when entering xmon.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Entering xmon
BUG: using smp_processor_id() in preemptible [00000000] code: khvcd/280
caller is .xmon_core+0xb8/0x8ec
Call Trace:
[C00000000FD737C0] [C00000000000FAAC] .show_stack+0x68/0x1b0 (unreliable)
[C00000000FD73860] [C0000000001F71F0] .debug_smp_processor_id+0xc8/0xf8
[C00000000FD738F0] [C00000000004AF30] .xmon_core+0xb8/0x8ec
[C00000000FD73A80] [C00000000004B918] .xmon+0x38/0x4c
[C00000000FD73C60] [C00000000004BA8C] .sysrq_handle_xmon+0x48/0x5c
[C00000000FD73CD0] [C000000000243A68] .__handle_sysrq+0xe0/0x1b0
[C00000000FD73D70] [C000000000244974] .hvc_poll+0x18c/0x2b4
[C00000000FD73E50] [C000000000244E80] .khvcd+0x88/0x164
[C00000000FD73EE0] [C000000000075014] .kthread+0x124/0x174
[C00000000FD73F90] [C000000000023D48] .kernel_thread+0x4c/0x68
BUG: khvcd:280 task might have lost a preemption check!
Call Trace:
[C00000000FD73740] [C00000000000FAAC] .show_stack+0x68/0x1b0 (unreliable)
[C00000000FD737E0] [C000000000054920] .preempt_enable_no_resched+0x64/0x7c
[C00000000FD73860] [C0000000001F71F8] .debug_smp_processor_id+0xd0/0xf8
[C00000000FD738F0] [C00000000004AF30] .xmon_core+0xb8/0x8ec
[C00000000FD73A80] [C00000000004B918] .xmon+0x38/0x4c
[C00000000FD73C60] [C00000000004BA8C] .sysrq_handle_xmon+0x48/0x5c
[C00000000FD73CD0] [C000000000243A68] .__handle_sysrq+0xe0/0x1b0
[C00000000FD73D70] [C000000000244974] .hvc_poll+0x18c/0x2b4
[C00000000FD73E50] [C000000000244E80] .khvcd+0x88/0x164
[C00000000FD73EE0] [C000000000075014] .kthread+0x124/0x174
[C00000000FD73F90] [C000000000023D48] .kernel_thread+0x4c/0x68
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

  I'd appreciate if experts on xmon would give any comments/suggestions
on this.  These warnings was just found yesterday, this patch seems to
eliminate the warnings but I have not looked into it seriously.

Signed-off-by: Tsutomu Owa <tsutomu.owa@...hiba.co.jp>
-- owa

diff -rup linux-rt8/arch/powerpc/xmon/xmon.c rt/arch/powerpc/xmon/xmon.c
--- linux-rt8/arch/powerpc/xmon/xmon.c	2007-02-20 09:38:52.000000000 +0900
+++ rt/arch/powerpc/xmon/xmon.c	2007-03-05 15:29:46.000000000 +0900
@@ -342,6 +342,7 @@ static int xmon_core(struct pt_regs *reg
 
 	msr = mfmsr();
 	mtmsr(msr & ~MSR_EE);	/* disable interrupts */
+	preempt_disable();
 
 	bp = in_breakpoint_table(regs->nip, &offset);
 	if (bp != NULL) {
@@ -516,6 +517,7 @@ static int xmon_core(struct pt_regs *reg
 
 	insert_cpu_bpts();
 
+	preempt_enable();
 	mtmsr(msr);		/* restore interrupt enable */
 
 	return cmd != 'X' && cmd != EOF;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ