From: Al Viro <viro@ftp.linux.org.uk>
To: Philip Langdale <philipl@overt.org>
Cc: Jiri Kosina <jkosina@suse.cz>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hiddev: Add 32bit ioctl compatibilty
Date: Sat, 13 Oct 2007 01:02:21 +0100 [thread overview]
Message-ID: <20071013000221.GC8181@ftp.linux.org.uk> (raw)
In-Reply-To: <47100864.2090208@overt.org>
On Fri, Oct 12, 2007 at 04:51:00PM -0700, Philip Langdale wrote:
> The hiddev driver currently lacks 32bit ioctl compatibility, so
> if you're running with a 64bit kernel and 32bit userspace, it won't
> work.
>
> I'm pretty sure that the only thing missing is a compat_ioctl
> implementation as all structs have fixed size fields.
>
> +static long hiddev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> +{
> + struct inode *inode = file->f_path.dentry->d_inode;
> + return hiddev_ioctl(inode, file, cmd, compat_ptr(arg));
> +}
Just how many instances of that sucker do we need? It's nothing but
struct inode *inode = file->f_path.dentry->d_inode;
return file->f_op->ioctl(inode, file, cmd, compat_ptr(arg));
next prev parent reply other threads:[~2007-10-13 0:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 23:51 [PATCH] hiddev: Add 32bit ioctl compatibilty Philip Langdale
2007-10-13 0:02 ` Al Viro [this message]
2007-10-13 17:42 ` Philip Langdale
2007-10-20 15:50 ` [PATCH] compat_ioctl: introduce generic_compat_ioctl helper Arnd Bergmann
2007-10-20 16:03 ` [PATCH] hiddev: simplify 32bit ioctl compatibilty Arnd Bergmann
2007-10-20 16:11 ` [PATCH] compat_ioctl: introduce generic_compat_ioctl helper Christoph Hellwig
2007-10-20 16:23 ` Arnd Bergmann
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=20071013000221.GC8181@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=philipl@overt.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