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: <20071003160743.GA22782@elte.hu>
Date:	Wed, 3 Oct 2007 18:07:43 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Greg KH <gregkh@...e.de>,
	Alexander Viro <viro@....linux.org.uk>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [bug] crash when reading /proc/mounts (was: Re: Linux
	2.6.23-rc9 and a heads-up for the 2.6.24 series..)


* Ingo Molnar <mingo@...e.hu> wrote:

> 
> * Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> 
> > Your compiler generates
> > 
> > 	movl    -16(%ebp),%edx
> > 	movl    (%edx),%edi		/* this is _totally_ bogus! */
> > 	incl    %edx
> > 	movl    %edx,-16(%ebp)
> > 	movl    %edi,%ecx
> > 	testb   %cl,%cl
> > 	je      ...
> 
> ah, ok.
> 
> > while I get (gcc version 4.1.2 20070925 (Red Hat 4.1.2-28)):
> > 
> >         movl    -16(%ebp), %eax # p,
> >         movzbl  (%eax), %edi    #, c	/* not bogus! */
> >         movl    %edi, %edx      # c,
> >         testb   %dl, %dl        #
> >         je      .L64    #,
> >         incl    %eax    #
> >         movsbl  %dl,%ebx        #, D.12414
> >         movl    %eax, -16(%ebp) #, p
> > 
> > where the difference (apart from doing the increment differently and 
> > different register allocation) is that I have a "movzbl" (correct), 
> > while you have a "movl" (pure and utter crap).
> 
> i'll try with another compiler in a minute.

i just tried:

  gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)

and indeed the crash is gone. So you are completely right, it's a 
compiler bug in 4.0.2 (it's vanilla gcc 4.0.2 built by me, not a distro 
compiler). It should not affect normal kernels too much this bug needs 
CONFIG_DEBUG_PAGEALLOC. (or it needs a _really_ unlucky allocation being 
at the far upper end of RAM - but those are usually taken up by 
boot-time allocations anyway).

i also just re-tried the other config as well - and crash is gone there 
too. (not surprisingly)

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