From: Roland Dreier <roland@topspin.com>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix x86_64 put_user() sparse warnings
Date: Wed, 15 Dec 2004 17:34:35 -0800 [thread overview]
Message-ID: <52pt1bt49g.fsf@topspin.com> (raw)
This may not be 2.6.10 material -- if not please queue for 2.6.11.
Thanks,
Roland
Fix sparse warnings
warning: cast removes address space of expression
for uses of put_user() on x86_64 caused by doing __m(addr) in
__put_user_asm() with addr a __user pointer.
Signed-off-by: Roland Dreier <roland@topspin.com>
Index: linux-bk/include/asm-x86_64/uaccess.h
===================================================================
--- linux-bk.orig/include/asm-x86_64/uaccess.h 2004-12-11 15:16:44.000000000 -0800
+++ linux-bk/include/asm-x86_64/uaccess.h 2004-12-15 15:35:47.482091664 -0800
@@ -172,7 +172,7 @@
/* FIXME: this hack is definitely wrong -AK */
struct __large_struct { unsigned long buf[100]; };
-#define __m(x) (*(struct __large_struct *)(x))
+#define __m(x) (*(struct __large_struct __user *)(x))
/*
* Tell gcc we read from memory instead of writing: this is because
reply other threads:[~2004-12-16 1:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=52pt1bt49g.fsf@topspin.com \
--to=roland@topspin.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.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