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: <20090115133206.GA31416@elte.hu>
Date:	Thu, 15 Jan 2009 14:32:06 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Tejun Heo <tj@...nel.org>
Cc:	roel kluin <roel.kluin@...il.com>,
	"H. Peter Anvin" <hpa@...or.com>, Brian Gerst <brgerst@...il.com>,
	ebiederm@...ssion.com, cl@...ux-foundation.org,
	rusty@...tcorp.com.au, travis@....com,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	steiner@....com, hugh@...itas.com
Subject: Re: [patch] add optimized generic percpu accessors


FYI, -tip testing found the following bug with your percpu stuff:

There's an early exception during bootup, on 64-bit x86:

  PANIC: early exception 0e rip 10:ffffffff80276855: error ? cr2 6688

 - gcc version 4.3.2 20081007 (Red Hat 4.3.2-6) (GCC) 
 - binutils-2.18.50.0.6-2.x86_64

config attached. You can find the disassembly of lock_release_holdtime() 
below - that's where it crashed:

ffffffff80276851:	48 8d 04 06          	lea    (%rsi,%rax,1),%rax
ffffffff80276855:	4c 3b a0 a8 00 00 00 	cmp    0xa8(%rax),%r12
ffffffff8027685c:	7e 07                	jle    ffffffff80276865 <lock_release_holdtime+0x155>

it probably went wrong here (due to the PDA changes):

ffffffff80276784:	65 48 8b 15 f4 d9 d8 	mov    %gs:0x7fd8d9f4(%rip),%rdx        # 4180 <per_cpu__this_cpu_off>
ffffffff8027678b:	7f 

and we jumped to ffffffff80276840 after that and crashed.

Since the crash is so early, you can build the attached config on any 
64-bit test-system and try to boot into it - it should crash all the time. 
Let me know if you have trouble reproducing it.

	Ingo


ffffffff80276710 <lock_release_holdtime>:
ffffffff80276710:	55                   	push   %rbp
ffffffff80276711:	48 89 e5             	mov    %rsp,%rbp
ffffffff80276714:	48 83 ec 10          	sub    $0x10,%rsp
ffffffff80276718:	8b 05 42 6f a2 00    	mov    0xa26f42(%rip),%eax        # ffffffff80c9d660 <lock_stat>
ffffffff8027671e:	48 89 1c 24          	mov    %rbx,(%rsp)
ffffffff80276722:	4c 89 64 24 08       	mov    %r12,0x8(%rsp)
ffffffff80276727:	48 89 fb             	mov    %rdi,%rbx
ffffffff8027672a:	85 c0                	test   %eax,%eax
ffffffff8027672c:	75 12                	jne    ffffffff80276740 <lock_release_holdtime+0x30>
ffffffff8027672e:	48 8b 1c 24          	mov    (%rsp),%rbx
ffffffff80276732:	4c 8b 64 24 08       	mov    0x8(%rsp),%r12
ffffffff80276737:	c9                   	leaveq 
ffffffff80276738:	c3                   	retq   
ffffffff80276739:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff80276740:	e8 0b d7 f9 ff       	callq  ffffffff80213e50 <sched_clock>
ffffffff80276745:	49 89 c4             	mov    %rax,%r12
ffffffff80276748:	0f b7 43 30          	movzwl 0x30(%rbx),%eax
ffffffff8027674c:	4c 2b 63 28          	sub    0x28(%rbx),%r12
ffffffff80276750:	66 25 ff 1f          	and    $0x1fff,%ax
ffffffff80276754:	0f 84 76 01 00 00    	je     ffffffff802768d0 <lock_release_holdtime+0x1c0>
ffffffff8027675a:	0f b7 c0             	movzwl %ax,%eax
ffffffff8027675d:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff80276761:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff80276765:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80276769:	48 2d 90 01 00 00    	sub    $0x190,%rax
ffffffff8027676f:	48 8d 88 e0 b5 21 81 	lea    -0x7ede4a20(%rax),%rcx
ffffffff80276776:	48 81 e9 e0 b5 21 81 	sub    $0xffffffff8121b5e0,%rcx
ffffffff8027677d:	48 c7 c0 e0 65 00 00 	mov    $0x65e0,%rax
ffffffff80276784:	65 48 8b 15 f4 d9 d8 	mov    %gs:0x7fd8d9f4(%rip),%rdx        # 4180 <per_cpu__this_cpu_off>
ffffffff8027678b:	7f 
ffffffff8027678c:	48 c1 f9 04          	sar    $0x4,%rcx
ffffffff80276790:	48 8d 34 10          	lea    (%rax,%rdx,1),%rsi
ffffffff80276794:	48 b8 29 5c 8f c2 f5 	mov    $0x8f5c28f5c28f5c29,%rax
ffffffff8027679b:	28 5c 8f 
ffffffff8027679e:	48 0f af c8          	imul   %rax,%rcx
ffffffff802767a2:	f6 43 32 03          	testb  $0x3,0x32(%rbx)
ffffffff802767a6:	0f 84 94 00 00 00    	je     ffffffff80276840 <lock_release_holdtime+0x130>
ffffffff802767ac:	48 89 ca             	mov    %rcx,%rdx
ffffffff802767af:	48 89 c8             	mov    %rcx,%rax
ffffffff802767b2:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff802767b6:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff802767ba:	48 29 d0             	sub    %rdx,%rax
ffffffff802767bd:	48 8d 04 06          	lea    (%rsi,%rax,1),%rax
ffffffff802767c1:	4c 3b a0 88 00 00 00 	cmp    0x88(%rax),%r12
ffffffff802767c8:	7e 07                	jle    ffffffff802767d1 <lock_release_holdtime+0xc1>
ffffffff802767ca:	4c 89 a0 88 00 00 00 	mov    %r12,0x88(%rax)
ffffffff802767d1:	48 89 ca             	mov    %rcx,%rdx
ffffffff802767d4:	48 89 c8             	mov    %rcx,%rax
ffffffff802767d7:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff802767db:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff802767df:	48 29 d0             	sub    %rdx,%rax
ffffffff802767e2:	48 8b 84 06 80 00 00 	mov    0x80(%rsi,%rax,1),%rax
ffffffff802767e9:	00 
ffffffff802767ea:	49 39 c4             	cmp    %rax,%r12
ffffffff802767ed:	7c 05                	jl     ffffffff802767f4 <lock_release_holdtime+0xe4>
ffffffff802767ef:	48 85 c0             	test   %rax,%rax
ffffffff802767f2:	75 19                	jne    ffffffff8027680d <lock_release_holdtime+0xfd>
ffffffff802767f4:	48 89 ca             	mov    %rcx,%rdx
ffffffff802767f7:	48 89 c8             	mov    %rcx,%rax
ffffffff802767fa:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff802767fe:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff80276802:	48 29 d0             	sub    %rdx,%rax
ffffffff80276805:	4c 89 a4 06 80 00 00 	mov    %r12,0x80(%rsi,%rax,1)
ffffffff8027680c:	00 
ffffffff8027680d:	48 89 ca             	mov    %rcx,%rdx
ffffffff80276810:	48 89 c8             	mov    %rcx,%rax
ffffffff80276813:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff80276817:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff8027681b:	48 29 d0             	sub    %rdx,%rax
ffffffff8027681e:	48 8d 04 06          	lea    (%rsi,%rax,1),%rax
ffffffff80276822:	4c 01 a0 90 00 00 00 	add    %r12,0x90(%rax)
ffffffff80276829:	48 83 80 98 00 00 00 	addq   $0x1,0x98(%rax)
ffffffff80276830:	01 
ffffffff80276831:	e9 f8 fe ff ff       	jmpq   ffffffff8027672e <lock_release_holdtime+0x1e>
ffffffff80276836:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
ffffffff8027683d:	00 00 00 
ffffffff80276840:	48 89 ca             	mov    %rcx,%rdx
ffffffff80276843:	48 89 c8             	mov    %rcx,%rax
ffffffff80276846:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff8027684a:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff8027684e:	48 29 d0             	sub    %rdx,%rax
ffffffff80276851:	48 8d 04 06          	lea    (%rsi,%rax,1),%rax
ffffffff80276855:	4c 3b a0 a8 00 00 00 	cmp    0xa8(%rax),%r12
ffffffff8027685c:	7e 07                	jle    ffffffff80276865 <lock_release_holdtime+0x155>
ffffffff8027685e:	4c 89 a0 a8 00 00 00 	mov    %r12,0xa8(%rax)
ffffffff80276865:	48 89 ca             	mov    %rcx,%rdx
ffffffff80276868:	48 89 c8             	mov    %rcx,%rax
ffffffff8027686b:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff8027686f:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff80276873:	48 29 d0             	sub    %rdx,%rax
ffffffff80276876:	48 8b 84 06 a0 00 00 	mov    0xa0(%rsi,%rax,1),%rax
ffffffff8027687d:	00 
ffffffff8027687e:	49 39 c4             	cmp    %rax,%r12
ffffffff80276881:	7c 05                	jl     ffffffff80276888 <lock_release_holdtime+0x178>
ffffffff80276883:	48 85 c0             	test   %rax,%rax
ffffffff80276886:	75 19                	jne    ffffffff802768a1 <lock_release_holdtime+0x191>
ffffffff80276888:	48 89 ca             	mov    %rcx,%rdx
ffffffff8027688b:	48 89 c8             	mov    %rcx,%rax
ffffffff8027688e:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff80276892:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff80276896:	48 29 d0             	sub    %rdx,%rax
ffffffff80276899:	4c 89 a4 06 a0 00 00 	mov    %r12,0xa0(%rsi,%rax,1)
ffffffff802768a0:	00 
ffffffff802768a1:	48 89 ca             	mov    %rcx,%rdx
ffffffff802768a4:	48 89 c8             	mov    %rcx,%rax
ffffffff802768a7:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff802768ab:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff802768af:	48 29 d0             	sub    %rdx,%rax
ffffffff802768b2:	48 8d 04 06          	lea    (%rsi,%rax,1),%rax
ffffffff802768b6:	4c 01 a0 b0 00 00 00 	add    %r12,0xb0(%rax)
ffffffff802768bd:	48 83 80 b8 00 00 00 	addq   $0x1,0xb8(%rax)
ffffffff802768c4:	01 
ffffffff802768c5:	e9 64 fe ff ff       	jmpq   ffffffff8027672e <lock_release_holdtime+0x1e>
ffffffff802768ca:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff802768d0:	8b 05 6a 30 d3 00    	mov    0xd3306a(%rip),%eax        # ffffffff80fa9940 <oops_in_progress>
ffffffff802768d6:	85 c0                	test   %eax,%eax
ffffffff802768d8:	74 07                	je     ffffffff802768e1 <lock_release_holdtime+0x1d1>
ffffffff802768da:	31 c9                	xor    %ecx,%ecx
ffffffff802768dc:	e9 95 fe ff ff       	jmpq   ffffffff80276776 <lock_release_holdtime+0x66>
ffffffff802768e1:	e8 aa 2c 20 00       	callq  ffffffff80479590 <debug_locks_off>
ffffffff802768e6:	85 c0                	test   %eax,%eax
ffffffff802768e8:	74 f0                	je     ffffffff802768da <lock_release_holdtime+0x1ca>
ffffffff802768ea:	8b 05 d0 ed 51 01    	mov    0x151edd0(%rip),%eax        # ffffffff817956c0 <debug_locks_silent>
ffffffff802768f0:	85 c0                	test   %eax,%eax
ffffffff802768f2:	75 e6                	jne    ffffffff802768da <lock_release_holdtime+0x1ca>
ffffffff802768f4:	31 d2                	xor    %edx,%edx
ffffffff802768f6:	be 83 00 00 00       	mov    $0x83,%esi
ffffffff802768fb:	48 c7 c7 2c 73 b9 80 	mov    $0xffffffff80b9732c,%rdi
ffffffff80276902:	31 c0                	xor    %eax,%eax
ffffffff80276904:	e8 d7 5b fd ff       	callq  ffffffff8024c4e0 <warn_slowpath>
ffffffff80276909:	31 c9                	xor    %ecx,%ecx
ffffffff8027690b:	e9 66 fe ff ff       	jmpq   ffffffff80276776 <lock_release_holdtime+0x66>


View attachment "config" of type "text/plain" (60344 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ