Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261929AbTKQXSC (ORCPT ); Mon, 17 Nov 2003 18:18:02 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261947AbTKQXSC (ORCPT ); Mon, 17 Nov 2003 18:18:02 -0500 Received: from modemcable137.219-201-24.mc.videotron.ca ([24.201.219.137]:6784 "EHLO montezuma.fsmlabs.com") by vger.kernel.org with ESMTP id S261929AbTKQXR5 (ORCPT ); Mon, 17 Nov 2003 18:17:57 -0500 Date: Mon, 17 Nov 2003 18:14:59 -0500 (EST) From: Zwane Mwaikambo To: Linus Torvalds cc: Ingo Molnar , "Martin J. Bligh" , Andrew Morton , Linux Kernel , linux-mm@kvack.org, Hugh Dickins Subject: Re: [PATCH][2.6-mm] Fix 4G/4G X11/vm86 oops In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6928 Lines: 131 On Mon, 17 Nov 2003, Zwane Mwaikambo wrote: > On Mon, 17 Nov 2003, Linus Torvalds wrote: > > > What's the generated assembly language for this function with and without > > the "fix"? > > > > If adding that printk fixes a triple fault, the issue is not likely to be > > the printk itself as much as the difference in code that the compiler > > generates - stack frame, memory re-ordering etc... > > This would be my 'trusty' gcc 3.2.2 from RedHat 9 > (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) A little bird told me to send diffs... But there is a lot of noise due to offsets i'm afraid. --- buggy 2003-11-17 18:09:35.302964248 -0500 +++ works 2003-11-17 18:09:47.744072912 -0500 @@ -21,11 +21,11 @@ 0x0210e8aa : or $0x20000,%edx 0x0210e8b0 : cmp $0x3,%eax 0x0210e8b3 : mov %edx,0x30(%edi) -0x0210e8b6 : je 0x210e9e0 +0x0210e8b6 : je 0x210e9f0 0x0210e8bc : cmp $0x3,%eax -0x0210e8bf : ja 0x210e9c5 +0x0210e8bf : ja 0x210e9d5 0x0210e8c5 : cmp $0x2,%eax -0x0210e8c8 : je 0x210e9b6 +0x0210e8c8 : je 0x210e9c6 0x0210e8ce : movl $0x247000,0x5bc(%esi) 0x0210e8d8 : mov 0xbc(%edi),%eax 0x0210e8de : movl $0x0,0x18(%eax) @@ -57,47 +57,52 @@ 0x0210e94e : mov 0x10(%ecx),%ax 0x0210e952 : and $0xffff,%eax 0x0210e957 : cmp 0x24(%edx),%eax -0x0210e95a : jne 0x210e9a0 +0x0210e95a : jne 0x210e9b0 0x0210e95c : mov 0x14(%ebx),%eax 0x0210e95f : dec %eax 0x0210e960 : mov %eax,0x14(%ebx) 0x0210e963 : mov 0x8(%ebx),%eax 0x0210e966 : and $0x8,%eax -0x0210e969 : jne 0x210e999 -0x0210e96b : mov 0x50(%edi),%eax -0x0210e96e : mov %eax,0x5b4(%esi) -0x0210e974 : testb $0x1,0x4c(%edi) -0x0210e978 : jne 0x210e990 -0x0210e97a : mov 0x4(%esi),%edx -0x0210e97d : xor %eax,%eax -0x0210e97f : mov %eax,%fs -0x0210e981 : mov %eax,%gs -0x0210e983 : mov %edi,%esp -0x0210e985 : mov %edx,%ebp -0x0210e987 : jmp 0xfffeb100 -0x0210e98c : pop %ebx -0x0210e98d : pop %esi -0x0210e98e : pop %edi -0x0210e98f : ret -0x0210e990 : push %esi -0x0210e991 : call 0x210e5b0 -0x0210e996 : pop %eax -0x0210e997 : jmp 0x210e97a -0x0210e999 : call 0x21222c0 -0x0210e99e : jmp 0x210e96b -0x0210e9a0 : mov 0x24(%edx),%ax -0x0210e9a4 : mov %ax,0x10(%ecx) -0x0210e9a8 : mov $0x174,%ecx -0x0210e9ad : mov 0x24(%edx),%eax -0x0210e9b0 : xor %edx,%edx -0x0210e9b2 : wrmsr -0x0210e9b4 : jmp 0x210e95c -0x0210e9b6 : movl $0x0,0x5bc(%esi) -0x0210e9c0 : jmp 0x210e8d8 -0x0210e9c5 : cmp $0x4,%eax -0x0210e9c8 : jne 0x210e8ce -0x0210e9ce : movl $0x47000,0x5bc(%esi) -0x0210e9d8 : jmp 0x210e8d8 -0x0210e9dd : lea 0x0(%esi),%esi -0x0210e9e0 : movl $0x7000,0x5bc(%esi) -0x0210e9ea : jmp 0x210e8d8 +0x0210e969 : jne 0x210e9a9 +0x0210e96b : push $0x255f121 +0x0210e970 : call 0x21285a0 +0x0210e975 : mov 0x50(%edi),%eax +0x0210e978 : mov %eax,0x5b4(%esi) +0x0210e97e : pop %eax +0x0210e97f : testb $0x1,0x4c(%edi) +0x0210e983 : jne 0x210e9a0 +0x0210e985 : mov 0x4(%esi),%edx +0x0210e988 : xor %eax,%eax +0x0210e98a : mov %eax,%fs +0x0210e98c : mov %eax,%gs +0x0210e98e : mov %edi,%esp +0x0210e990 : mov %edx,%ebp +0x0210e992 : jmp 0xfffeb100 +0x0210e997 : pop %ebx +0x0210e998 : pop %esi +0x0210e999 : pop %edi +0x0210e99a : ret +0x0210e99b : nop +0x0210e99c : lea 0x0(%esi,1),%esi +0x0210e9a0 : push %esi +0x0210e9a1 : call 0x210e5b0 +0x0210e9a6 : pop %eax +0x0210e9a7 : jmp 0x210e985 +0x0210e9a9 : call 0x21222d0 +0x0210e9ae : jmp 0x210e96b +0x0210e9b0 : mov 0x24(%edx),%ax +0x0210e9b4 : mov %ax,0x10(%ecx) +0x0210e9b8 : mov $0x174,%ecx +0x0210e9bd : mov 0x24(%edx),%eax +0x0210e9c0 : xor %edx,%edx +0x0210e9c2 : wrmsr +0x0210e9c4 : jmp 0x210e95c +0x0210e9c6 : movl $0x0,0x5bc(%esi) +0x0210e9d0 : jmp 0x210e8d8 +0x0210e9d5 : cmp $0x4,%eax +0x0210e9d8 : jne 0x210e8ce +0x0210e9de : movl $0x47000,0x5bc(%esi) +0x0210e9e8 : jmp 0x210e8d8 +0x0210e9ed : lea 0x0(%esi),%esi +0x0210e9f0 : movl $0x7000,0x5bc(%esi) +0x0210e9fa : jmp 0x210e8d8 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/