All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Zachary Amsden <zach@vmware.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Virtualization Mailing List <virtualization@lists.osdl.org>,
	Iouri Kharon <bc-info@styx.cabel.net>,
	syslinux@zytor.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Sahil Rihan <srihan@vmware.com>
Subject: Re: Vmware crashes if compress/misc.c scrolls?
Date: Sat, 4 Aug 2007 11:24:34 +0200	[thread overview]
Message-ID: <200708041124.35526.ak@suse.de> (raw)
In-Reply-To: <46B40504.70208@vmware.com>


> In the boot decompressor for the kernel in the image Iouri provided, I

32bit or 64bit image?

> As you can plainly see, the call to memcpy (which is redefined in
> boot/compressed/misc.c) is made using stack calling convention.
> Unfortunately, the compiler generated the memcpy function itself using
> regparm(3) convention.  I am guessing this happened because a leftover

I can't find any here grepping .i files and includes. None of the memcpy
prototypes in include have a __fastcall

Are you sure this still happens in mainline?

When I look at my scroll it also looks correct:

      c0:       0f af f8                imul   %eax,%edi
      c3:       01 c0                   add    %eax,%eax
      c5:       89 c2                   mov    %eax,%edx
      c7:       01 f2                   add    %esi,%edx
      c9:       89 45 f0                mov    %eax,0xfffffff0(%ebp)
      cc:       89 f0                   mov    %esi,%eax
      ce:       89 f9                   mov    %edi,%ecx
      d0:       e8 7b ff ff ff          call   50 <memcpy>


> Does anyone recall compiler problems (I noticed this VM was booting a
> 64-bit kernel, 

Ok 64bit, that was 32bit above. 

Since some time the decompressor is 64bit and 64bit always uses 
regparms. 64bit Scroll is ok too:

     92:       0f af eb                imul   %ebx,%ebp
      95:       01 db                   add    %ebx,%ebx
      97:       48 63 f3                movslq %ebx,%rsi
      9a:       4c 01 ee                add    %r13,%rsi
      9d:       89 ea                   mov    %ebp,%edx
      9f:       e8 9c ff ff ff          callq  40 <memcpy>


> but the decompressor was 32-bit code, 

That must be a old kernel.

Can you people please verify this all still happens with a mainline or
2.6.22 kernel? 

> so perhaps at some  
> time the 64-bit makefile or toolchain for Linux had some kind of
> compiler bug).

I'm not aware of any such bugs.

-Andi

  reply	other threads:[~2007-08-04  9:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20 23:44 Vmware crashes if compress/misc.c scrolls? H. Peter Anvin
2007-06-21  0:07 ` Jeremy Fitzhardinge
2007-06-21  0:17   ` H. Peter Anvin
2007-06-21  0:21     ` Jeremy Fitzhardinge
2007-06-21  0:25       ` H. Peter Anvin
2007-06-21  0:27         ` Jeremy Fitzhardinge
2007-06-21  0:46           ` H. Peter Anvin
2007-06-21 21:54             ` Zachary Amsden
2007-06-22  2:22               ` H. Peter Anvin
2007-06-22  2:34                 ` Zachary Amsden
2007-06-22  3:09                   ` Jeremy Fitzhardinge
2007-08-04  4:48 ` Zachary Amsden
2007-08-04  9:24   ` Andi Kleen [this message]
2007-08-04 12:08     ` Zachary Amsden
2007-08-04 14:19     ` Zachary Amsden
2007-08-04 20:14       ` [syslinux] " H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200708041124.35526.ak@suse.de \
    --to=ak@suse.de \
    --cc=bc-info@styx.cabel.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srihan@vmware.com \
    --cc=syslinux@zytor.com \
    --cc=virtualization@lists.osdl.org \
    --cc=zach@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.