From: Arnd Bergmann <arnd@arndb.de>
To: David Miller <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
mokuno@sm.sony.co.jp, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 9/12]: wext: Dispatch and handle compat ioctls entirely in net/wireless/wext.c
Date: Wed, 4 Jun 2008 14:20:48 +0200 [thread overview]
Message-ID: <200806041420.49316.arnd@arndb.de> (raw)
In-Reply-To: <20080603.132842.123235332.davem@davemloft.net>
On Tuesday 03 June 2008, David Miller wrote:
> Next we can kill the hacks in fs/compat_ioctl.c and also
> dispatch compat ioctls down into the driver and 80211 protocol
> helper layers in order to handle iw_point objects embedded in
> stream replies which need to be translated.
Great work! Thanks for getting one large chunk of fs/compat_ioctl.c
removed on the way.
> diff --git a/include/net/wext.h b/include/net/wext.h
> index 80b31d8..6d76a39 100644
> --- a/include/net/wext.h
> +++ b/include/net/wext.h
> @@ -12,6 +12,8 @@ extern int wext_proc_init(struct net *net);
> extern void wext_proc_exit(struct net *net);
> extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
> void __user *arg);
> +extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
> + unsigned long arg);
Is it intentional that the prototypes are so different? Why not
pass a void __user *arg instead of unsigned long arg?
> +int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
> + unsigned long arg)
> +{
> + void __user *argp = (void __user *)arg;
For the conversion, you should also use compat_ptr() instead of the
cast. This currently only makes a difference on s390, which does
not have wireless, but it's better not to give wrong examples in the
code.
Arnd <><
next prev parent reply other threads:[~2008-06-04 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 20:28 [PATCH 9/12]: wext: Dispatch and handle compat ioctls entirely in net/wireless/wext.c David Miller
2008-06-04 12:20 ` Arnd Bergmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-06-17 7:54 David Miller
2008-06-03 19:20 David Miller
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=200806041420.49316.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mokuno@sm.sony.co.jp \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).