public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: WANG Cong <xiyou.wangcong@gmail.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [PATCH 2/19] UML - Tidy stub management code
Date: Mon, 28 Apr 2008 11:45:24 -0400	[thread overview]
Message-ID: <20080428154524.GE7334@c2.user-mode-linux.org> (raw)
In-Reply-To: <20080426.180112.184545994.xiyou.wangcong@gmail.com>

On Sat, Apr 26, 2008 at 06:01:12PM +0800, WANG Cong wrote:
> > +	/*
> > +	 * When the stub stops, we find the following values on the
> > +	 * beginning of the stack:
> > +	 * (long) return_value
> > +	 * (long) offset to failed sycall data (0 if no error)
> > +	 */
> > +	ret = *((unsigned long *) stack);
> 
> 
> I am afraid the value will be truncated on 64bit machine, since
> 'ret' is 'int' while 'stack' points to an 'unsigned long'.
> 
> Is this expected?

That's dubious, but I don't think it breaks anything.  On LE, *(int *)
and *(long *) will give you the same answer, and the value here is an
error code, which fits into 32 bits.

      	    	       Jeff

-- 
Work email - jdike at linux dot intel dot com

  reply	other threads:[~2008-04-28 15:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-25 17:56 [PATCH 2/19] UML - Tidy stub management code Jeff Dike
2008-04-26 10:01 ` WANG Cong
2008-04-28 15:45   ` Jeff Dike [this message]
2008-04-29  7:57     ` WANG Cong

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=20080428154524.GE7334@c2.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=xiyou.wangcong@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox