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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Sep 2015 14:22:40 +0200
From:	Sedat Dilek <sedat.dilek@...il.com>
To:	Jiri Kosina <jikos@...nel.org>
Cc:	Tejun Heo <tj@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	Darren Hart <dvhart@...ux.intel.com>,
	Lai Jiangshan <jiangshanlai@...il.com>
Subject: Re: [Linux v4.2] workqueue: llvmlinux: acpid: BUG: sleeping function
 called from invalid context at kernel/workqueue.c:2680

On Fri, Sep 25, 2015 at 2:16 PM, Jiri Kosina <jikos@...nel.org> wrote:
> On Fri, 25 Sep 2015, Sedat Dilek wrote:
>
>> > This however:
>> >
>> > [   24.824639] hardirqs last  enabled at (7913): [<ffffffff8192a2b2>] _raw_spin_unlock_irq+0x32/0x60
>> > [   24.824646] hardirqs last disabled at (7914): [<ffffffff81120e37>] del_timer_sync+0x37/0x110
>> >
>> > combined with the stacktrace above, doesn't still make too much sense; IRQ
>> > disable/enable is properly paired in del_timer_sync() and timer base lock
>> > locking.
>> >
>> > Could you look into the generated assembly whether the sequence
>> >
>> >         local_irq_save(flags);
>> >         lock_map_acquire(&timer->lockdep_map);
>> >         lock_map_release(&timer->lockdep_map);
>> >         local_irq_restore(flags);
>> >
>> > in del_timer_sync() hasn't been optimized in some damaging way?
>> >
>>
>> I am looking into my CLANG objdump...
>>
>> $ egrep -nr 'save|restore|acquire|release'
>> objdump-Dr_kernel-workqueue_o_CLANG-3-7.txt | egrep 'irq|map'
>> 5718:                   4601: R_X86_64_PC32     _raw_spin_unlock_irqrestore-0x4
>> 5766:                   4699: R_X86_64_PC32     _raw_spin_lock_irqsave-0x4
>> 6173:                   4bd9: R_X86_64_PC32     _raw_spin_lock_irqsave-0x4
>> 6265:                   4d05: R_X86_64_PC32     _raw_spin_unlock_irqrestore-0x4
>>
>> ...this is what I have.
>>
>> Does that help?
>
> It doesn't. I am asking for disassembly of del_timer_sync() (that's in
> kernel/time/timer.o).
>

See attached file.

$ egrep -nr 'save|restore|acquire|release'
objdump-drw_kernel-time-timer_o_CLANG-3-7.txt | egrep 'irq|map|lock'
1811:    1974:  e8 00 00 00 00          callq  1979
<__mod_timer+0x179> 1975: R_X86_64_PC32
_raw_spin_unlock_irqrestore-0x4
1974:    1b98:  e8 00 00 00 00          callq  1b9d
<add_timer_on+0x5d> 1b99: R_X86_64_PC32     _raw_spin_lock_irqsave-0x4
1989:    1bd2:  e8 00 00 00 00          callq  1bd7
<add_timer_on+0x97> 1bd3: R_X86_64_PC32
_raw_spin_unlock_irqrestore-0x4
2188:    1eeb:  e8 00 00 00 00          callq  1ef0 <del_timer+0xb0>
 1eec: R_X86_64_PC32     _raw_spin_unlock_irqrestore-0x4
2225:    1f64:  e8 00 00 00 00          callq  1f69
<lock_timer_base+0x69>      1f65: R_X86_64_PC32
_raw_spin_lock_irqsave-0x4
2234:    1f84:  e8 00 00 00 00          callq  1f89
<lock_timer_base+0x89>      1f85: R_X86_64_PC32
_raw_spin_unlock_irqrestore-0x4
2292:    2048:  e8 00 00 00 00          callq  204d
<try_to_del_timer_sync+0xad>        2049: R_X86_64_PC32
_raw_spin_unlock_irqrestore-0x4
2326:    20b5:  e8 00 00 00 00          callq  20ba
<del_timer_sync+0x5a>       20b6: R_X86_64_PC32     lock_acquire-0x4
2330:    20c9:  e8 00 00 00 00          callq  20ce
<del_timer_sync+0x6e>       20ca: R_X86_64_PC32     lock_release-0x4
3691:    34e7:  e8 00 00 00 00          callq  34ec
<call_timer_fn+0x8c>        34e8: R_X86_64_PC32     lock_acquire-0x4
3814:    3747:  e8 00 00 00 00          callq  374c
<call_timer_fn+0x2ec>       3748: R_X86_64_PC32     lock_release-0x4

- Sedat -

View attachment "objdump-drw_kernel-time-timer_o_CLANG-3-7.txt" of type "text/plain" (271759 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ