From: viro@parcelfarce.linux.theplanet.co.uk
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sparse: __user annotations for ipc compat code
Date: Fri, 11 Jun 2004 19:31:20 +0100 [thread overview]
Message-ID: <20040611183120.GP12308@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <200406111727.31160.arnd@arndb.de>
On Fri, Jun 11, 2004 at 05:27:30PM +0200, Arnd Bergmann wrote:
> - fourth.__pad = &s64;
> + fourth.__pad = (void __user *)&s64;
That makes absolutely no sense (and should generate a warning anyway).
This is _NOT_ a userland pointer. Obviously so - we are talking about
on-stack address, for crying out loud!
> old_fs = get_fs();
> set_fs(KERNEL_DS);
> - err = sys_msgsnd(first, p, second, third);
> + err = sys_msgsnd(first, (struct msgbuf __user *)p, second, third);
> set_fs(old_fs);
Again, makes no sense whatsoever (we _still_ get a warning and clear fix
would be to get rid of set_fs() here and switch to compat_alloc_user_space()).
Same goes for the rest of patch.
Folks, warnings are not personal performance metrics, they are tools for
finding bogus code. Sigh...
prev parent reply other threads:[~2004-06-11 18:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-11 15:27 [PATCH] sparse: __user annotations for ipc compat code Arnd Bergmann
2004-06-11 18:31 ` viro [this message]
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=20040611183120.GP12308@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=akpm@osdl.org \
--cc=arnd@arndb.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