mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Toptygin <alexeyt@freeshell.org>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org, tony.luck@intel.com
Subject: Re: [PATCH] sendfile compat functions on x86_64 and ia64
Date: Fri, 5 May 2006 20:44:10 +0000 (UTC)	[thread overview]
Message-ID: <Pine.NEB.4.62.0605052040250.27826@ukato.freeshell.org> (raw)
In-Reply-To: <200605052238.26834.ak@suse.de>

On Fri, 5 May 2006, Andi Kleen wrote:

> With your change there wouldn't be any sign extension and rw_verify_area
> couldn't reject negative values them anymore.
>
> I think it would be a wrong change because it would differ from a native
> 32bit kernel.

No...

On a 32 bit kernel (and on a 64 bit kernel using the native interface), 
count is passed to sendfile as unsigned. rw_verify_area explicitly casts 
to signed before checking for negativeness. The only place anywhere in the 
kernel that count is signed (other than where rw_verify area explicitly 
casts it for one test) is in the declaration of sys32_sendfile in the 
x86_64 compat code. I'm pretty sure it's supposed to be unsigned there 
too, and the current code is a typo.

 			Alexey

  reply	other threads:[~2006-05-05 20:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-05  0:45 Alexey Toptygin
2006-05-05 20:38 ` Andi Kleen
2006-05-05 20:44   ` Alexey Toptygin [this message]
2006-05-05 21:28     ` Andi Kleen
2006-05-05 22:19       ` Alexey Toptygin
2006-05-06  8:46         ` Andi Kleen
2006-05-06 22:43           ` Alexey Toptygin

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=Pine.NEB.4.62.0605052040250.27826@ukato.freeshell.org \
    --to=alexeyt@freeshell.org \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.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

all inboxes | Powered by JetHome®