From: Al Viro <viro@ftp.linux.org.uk>
To: David Brownell <david-b@pacbell.net>
Cc: Satyam Sharma <satyam@infradead.org>,
Anton Altaparmakov <aia21@cam.ac.uk>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ptrdiff_t is not uintptr_t, damnit
Date: Mon, 20 Aug 2007 04:40:43 +0100 [thread overview]
Message-ID: <20070820034043.GZ21089@ftp.linux.org.uk> (raw)
In-Reply-To: <200708192026.24596.david-b@pacbell.net>
On Sun, Aug 19, 2007 at 08:26:24PM -0700, David Brownell wrote:
> ISTR the warning was the other way around: about "cast from integer
> to pointer of a different size". The __u64 came from userspace and
> the kernel pointer was only 32 bits. Not really truncation, but GCC
> could not know that directly ... ergo the extra non-pointer cast.
And? Cast to integer type with the size equal to that of pointer.
unsigned long is just that on all supported targets.
More interesting question is whether you want an error returned when
pointers are 32bit and value doesn't fit into that...
next prev parent reply other threads:[~2007-08-20 3:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-19 22:55 [PATCH] ptrdiff_t is not uintptr_t, damnit Al Viro
2007-08-20 0:19 ` David Brownell
2007-08-20 0:29 ` Anton Altaparmakov
2007-08-20 0:57 ` Al Viro
2007-08-20 0:57 ` David Brownell
2007-08-20 3:01 ` Satyam Sharma
2007-08-20 3:26 ` David Brownell
2007-08-20 3:40 ` Al Viro [this message]
2007-08-20 4:17 ` David Brownell
2007-08-20 0:27 ` Anton Altaparmakov
2007-08-20 0:52 ` Al Viro
2007-08-20 1:12 ` David Brownell
2007-08-21 18:53 ` David Brownell
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=20070820034043.GZ21089@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=aia21@cam.ac.uk \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=satyam@infradead.org \
--cc=torvalds@linux-foundation.org \
/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