public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: change sys_truncate/sys_ftruncate length parameter type
Date: Wed, 23 Sep 2009 08:13:47 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0909230808130.4950@localhost.localdomain> (raw)
In-Reply-To: <20090923150326.GB23595@osiris.boeblingen.de.ibm.com>



On Wed, 23 Sep 2009, Heiko Carstens wrote:
> 
> For both system calls user space passes a signed long length parameter,
> while the kernel side takes an unsigned long parameter and converts it
> later to signed long again.

No it doesn't.

Look at sys_ftruncate() again. It doesn't convert it to signed long at 
all. It converts it to 'loff_t' which is something different entirely.

Now, it may be that we _should_ convert it to 'long' like your patch does, 
but this is definitely not a "no changes" patch as far as I can tell. It 
limits ftruncate to 31 bits on 32-bit architectures, in ways it didn't use 
to be limited.

[ Note the "small" logic and the interaction with O_LARGEFILE. On a 32-bit 
  architecture, if you open with O_LARGEFILE, ftruncate() gets the full 
  32-bit range, and that's the part your patch broke. ]

So NAK. Not without some serious explanations on why I'm wrong and am just 
being unnecessarily difficult and a pinhead.

			Linus

  reply	other threads:[~2009-09-23 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23 15:03 [PATCH] fs: change sys_truncate/sys_ftruncate length parameter type Heiko Carstens
2009-09-23 15:13 ` Linus Torvalds [this message]
2009-09-23 15:49   ` Heiko Carstens
2009-09-23 15:49     ` Heiko Carstens
2009-09-23 16:31   ` H. Peter Anvin
2009-09-23 17:18     ` Linus Torvalds

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=alpine.LFD.2.01.0909230808130.4950@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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