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: <1FE6DD409037234FAB833C420AA843ECDDA39A@orsmsx424.amr.corp.intel.com>
Date:	Thu, 20 Mar 2008 10:23:10 -0700
From:	"Luck, Tony" <tony.luck@...el.com>
To:	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>
Cc:	"Yu, Fenghua" <fenghua.yu@...el.com>,
	"KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com>,
	"LKML" <linux-kernel@...r.kernel.org>,
	<linux-ia64@...r.kernel.org>,
	"Hidetoshi Seto" <seto.hidetoshi@...fujitsu.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>
Subject: RE: [2.6.25-rc5-mm1][regression] ia64: hackbench doesn't finish>12hour

> Yeah, semaphores can't be used from hardirq contexts for much the same
> reasons. But its all ia64 code, right? So I'm not directly seeing how
> other archs are affected here.

The root of the problem is a call chain like this:

 [<a00000010005c200>] ia64_global_tlb_purge+0x540/0xa40
                                sp=e0000001c28afca0 bsp=e0000001c28a0ea0
 [<a00000010005c8a0>] flush_tlb_range+0x1a0/0x240
                                sp=e0000001c28afca0 bsp=e0000001c28a0e70
 [<a000000100105a90>] page_referenced_one+0x170/0x260
                                sp=e0000001c28afca0 bsp=e0000001c28a0e20
 [<a000000100105f20>] page_referenced+0x180/0x320
                                sp=e0000001c28afcb0 bsp=e0000001c28a0dd0
 [<a0000001000ec640>] shrink_active_list+0x520/0xbc0
                                sp=e0000001c28afcc0 bsp=e0000001c28a0d48
 [<a0000001000ece30>] shrink_zone+0x150/0x200
                                sp=e0000001c28afd80 bsp=e0000001c28a0d00
 [<a0000001000edaf0>] kswapd+0x690/0x940
                                sp=e0000001c28afd80 bsp=e0000001c28a0c40
 [<a0000001000a6860>] kthread+0xa0/0x120
                                sp=e0000001c28afe30 bsp=e0000001c28a0c10
 [<a000000100013b70>] kernel_thread_helper+0x30/0x60
                                sp=e0000001c28afe30 bsp=e0000001c28a0be0
 [<a0000001000089c0>] start_kernel_thread+0x20/0x40
                                sp=e0000001c28afe30 bsp=e0000001c28a0be0

Some place in the upper (arch independent) parts of this trace the
code acquires an anon_vma_lock and holds it while calling into arch
specific code (there is presumably some inlining going on here because
the source doesn't have an obvious call from page_referenced_one() to
flush_tlb_range()).

My concern for other architectures (especially ones that require IPI to
complete the TLB shootdown) is that holding anon_vma_lock while doing
the shootdown leaves them open for some deadlock scenarios in this
code path.  But perhaps I completley misunderstand how IPI shootdown
happens (very possible).

-Tony

--
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