* BUG: warning at kernel/lockdep.c:2427/check_flags()
@ 2006-06-08 19:38 Paolo Ornati
2006-06-08 19:59 ` Paolo Ornati
0 siblings, 1 reply; 5+ messages in thread
From: Paolo Ornati @ 2006-06-08 19:38 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Ingo Molnar
After some hours running 2.6.17-rc6-mm1 + combo-patch I've got this:
[12138.880686] BUG: warning at kernel/lockdep.c:2427/check_flags()
[12138.880692]
[12138.880693] Call Trace:
[12138.880702] [<ffffffff80240374>] check_flags+0x86/0x201
[12138.880707] [<ffffffff80240873>] lock_acquire+0x2f/0xa3
[12138.880713] [<ffffffff8025fcae>] sys_munmap+0x5e/0xa7
[12138.880719] [<ffffffff8020944e>] system_call+0x7e/0x83
[12138.880723]
[12138.880725] irq event stamp: 18146
[12138.880728] hardirqs last enabled at (18145): [<ffffffff8049dffc>] _spin_unlock_irq+0x28/0x50
[12138.880734] hardirqs last disabled at (18146): [<ffffffff8049d61e>] trace_hardirqs_off_thunk+0x35/0x67
[12138.880742] softirqs last enabled at (18112): [<ffffffff8022c1ae>] __do_softirq+0xb2/0xba
[12138.880748] softirqs last disabled at (18105): [<ffffffff8020a2c2>] call_softirq+0x1e/0x28
I don't know if/how it is reproducible.
--
Paolo Ornati
Linux 2.6.17-rc6-mm1-lockdep on x86_64
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: BUG: warning at kernel/lockdep.c:2427/check_flags()
2006-06-08 19:38 BUG: warning at kernel/lockdep.c:2427/check_flags() Paolo Ornati
@ 2006-06-08 19:59 ` Paolo Ornati
2006-06-08 20:02 ` Ingo Molnar
2006-06-09 8:59 ` [patch, -rc6-mm1] irqflags tracing: fix x86_64 entry/exit Ingo Molnar
0 siblings, 2 replies; 5+ messages in thread
From: Paolo Ornati @ 2006-06-08 19:59 UTC (permalink / raw)
To: Paolo Ornati; +Cc: Linux Kernel Mailing List, Ingo Molnar
On Thu, 8 Jun 2006 21:38:09 +0200
Paolo Ornati <ornati@fastwebnet.it> wrote:
> After some hours running 2.6.17-rc6-mm1 + combo-patch I've got this:
>
> [12138.880686] BUG: warning at kernel/lockdep.c:2427/check_flags()
> [12138.880692]
> [12138.880693] Call Trace:
> [12138.880702] [<ffffffff80240374>] check_flags+0x86/0x201
> [12138.880707] [<ffffffff80240873>] lock_acquire+0x2f/0xa3
> [12138.880713] [<ffffffff8025fcae>] sys_munmap+0x5e/0xa7
> [12138.880719] [<ffffffff8020944e>] system_call+0x7e/0x83
> [12138.880723]
> [12138.880725] irq event stamp: 18146
> [12138.880728] hardirqs last enabled at (18145): [<ffffffff8049dffc>] _spin_unlock_irq+0x28/0x50
> [12138.880734] hardirqs last disabled at (18146): [<ffffffff8049d61e>] trace_hardirqs_off_thunk+0x35/0x67
> [12138.880742] softirqs last enabled at (18112): [<ffffffff8022c1ae>] __do_softirq+0xb2/0xba
> [12138.880748] softirqs last disabled at (18105): [<ffffffff8020a2c2>] call_softirq+0x1e/0x28
>
>
> I don't know if/how it is reproducible.
Wow, now I can reproduce it easly :)
Just run under "gdb" a program that segfaults:
void main(void)
{
*(int*)(0) = 1;
}
and it will trigger.
--
Paolo Ornati
Linux 2.6.17-rc6-mm1-lockdep on x86_64
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: BUG: warning at kernel/lockdep.c:2427/check_flags()
2006-06-08 19:59 ` Paolo Ornati
@ 2006-06-08 20:02 ` Ingo Molnar
2006-06-09 8:59 ` [patch, -rc6-mm1] irqflags tracing: fix x86_64 entry/exit Ingo Molnar
1 sibling, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2006-06-08 20:02 UTC (permalink / raw)
To: Paolo Ornati; +Cc: Linux Kernel Mailing List
* Paolo Ornati <ornati@fastwebnet.it> wrote:
> > I don't know if/how it is reproducible.
>
> Wow, now I can reproduce it easly :)
>
> Just run under "gdb" a program that segfaults:
>
> void main(void)
> {
> *(int*)(0) = 1;
> }
>
> and it will trigger.
thanks alot, that's very helpful! I'll have a look.
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [patch, -rc6-mm1] irqflags tracing: fix x86_64 entry/exit
2006-06-08 19:59 ` Paolo Ornati
2006-06-08 20:02 ` Ingo Molnar
@ 2006-06-09 8:59 ` Ingo Molnar
2006-06-09 10:01 ` Paolo Ornati
1 sibling, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2006-06-09 8:59 UTC (permalink / raw)
To: Paolo Ornati; +Cc: Linux Kernel Mailing List, Andrew Morton
* Paolo Ornati <ornati@fastwebnet.it> wrote:
> Wow, now I can reproduce it easly :)
>
> Just run under "gdb" a program that segfaults:
>
> void main(void)
> {
> *(int*)(0) = 1;
> }
>
> and it will trigger.
thanks - please try the fix below - it has solved the problem on my
testbox.
Ingo
-------------
Subject: irqflags tracing: fix x86_64 entry/exit
From: Ingo Molnar <mingo@elte.hu>
the x86_64 portion of the irqflags code did not properly trace the
"paranoid userspace" type of syscall/ptrace exit variant.
A testcase Paolo Ornati has discovered triggers a lock validator
assert due to this bug.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86_64/kernel/entry.S | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Index: linux/arch/x86_64/kernel/entry.S
===================================================================
--- linux.orig/arch/x86_64/kernel/entry.S
+++ linux/arch/x86_64/kernel/entry.S
@@ -50,9 +50,10 @@
#define retint_kernel retint_restore_args
#endif
-.macro TRACE_IRQS_IRETQ
+
+.macro TRACE_IRQS_IRETQ offset=ARGOFFSET
#ifdef CONFIG_TRACE_IRQFLAGS
- bt $9,EFLAGS-ARGOFFSET(%rsp) /* interrupts off? */
+ bt $9,EFLAGS-\offset(%rsp) /* interrupts off? */
jnc 1f
TRACE_IRQS_ON
1:
@@ -809,9 +810,9 @@ error_exit:
andl %edi,%edx
jnz retint_careful
/*
- * The iret will restore flags:
+ * The iret might restore flags:
*/
- TRACE_IRQS_ON
+ TRACE_IRQS_IRETQ
swapgs
RESTORE_ARGS 0,8,0
jmp iret_label
@@ -999,6 +1000,7 @@ paranoid_exit:
testl $3,CS(%rsp)
jnz paranoid_userspace
paranoid_swapgs:
+ TRACE_IRQS_IRETQ 0
swapgs
paranoid_restore:
RESTORE_ALL 8
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch, -rc6-mm1] irqflags tracing: fix x86_64 entry/exit
2006-06-09 8:59 ` [patch, -rc6-mm1] irqflags tracing: fix x86_64 entry/exit Ingo Molnar
@ 2006-06-09 10:01 ` Paolo Ornati
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Ornati @ 2006-06-09 10:01 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Linux Kernel Mailing List, Andrew Morton
On Fri, 9 Jun 2006 10:59:20 +0200
Ingo Molnar <mingo@elte.hu> wrote:
> > void main(void)
> > {
> > *(int*)(0) = 1;
> > }
> >
> > and it will trigger.
>
> thanks - please try the fix below - it has solved the problem on my
> testbox.
Works here too.
:)
--
Paolo Ornati
Linux 2.6.17-rc6-mm1-lockdep on x86_64
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-09 10:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-08 19:38 BUG: warning at kernel/lockdep.c:2427/check_flags() Paolo Ornati
2006-06-08 19:59 ` Paolo Ornati
2006-06-08 20:02 ` Ingo Molnar
2006-06-09 8:59 ` [patch, -rc6-mm1] irqflags tracing: fix x86_64 entry/exit Ingo Molnar
2006-06-09 10:01 ` Paolo Ornati
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox