From: Mikael Pettersson <mikpe@csd.uu.se>
To: "Moore, Eric Dean" <Emoore@lsil.com>
Cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
Keith Owens <kaos@ocs.com.au>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: RE: 2.4.25-rc1: Inconsistent ioctl symbol usage in drivers/messag e/fusion/mptctl.c
Date: Wed, 11 Feb 2004 12:14:07 +0100 [thread overview]
Message-ID: <16426.3711.606419.745835@alkaid.it.uu.se> (raw)
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E5703D1A97A@exa-atlanta.se.lsil.com>
Moore, Eric Dean writes:
> On Tuesday, February 10, 2004 9:25 AM, Mikael Pettersson wrote:
> > Moore, Eric Dean writes:
> > > If we pass NULL as the 2nd parameter for
> > register_ioctl32_conversion(),
> > > the mpt_ioctl() entry point is *not* called when running a 32 bit
> > > application in x86_64 mode.
> >
> > Ok, but you still don't need sys_ioctl() since the one-liner
> >
> > > > filp->f_op->ioctl(filp->f_dentry->d_inode, filp, cmd, arg)
> >
> > (or a hardcoded call to your ioctl() method) suffices.
> >
> > sys_ioctl() mostly just checks for special case ioctls before
> > doing the line above, but those special cases can't occur
> > since the kernel has already matched your particular ioctl.
> >
> > /Mikael
> >
>
>
> Ok - I have modified the mpt fusion driver per your suggestions.
> Please advise if this would work.
...
> static int
> +compat_mptctl_ioctl(unsigned int fd, unsigned int cmd,
> + unsigned long arg, struct file *filp)
> +{
> + dctlprintk((KERN_INFO MYNAM "::compat_mptctl_ioctl() called\n"));
> +
> + return mptctl_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
> +}
> +
> +static int
> compat_mptfwxfer_ioctl(unsigned int fd, unsigned int cmd,
> unsigned long arg, struct file *filp)
> {
> @@ -2864,30 +2872,31 @@
> }
>
> #ifdef MPT_CONFIG_COMPAT
> - err = register_ioctl32_conversion(MPTIOCINFO, sys_ioctl);
> + err = register_ioctl32_conversion(MPTIOCINFO, compat_mptctl_ioctl);
Looks fine to me.
I forgot to mention that sys_ioctl() also does lock_kernel(), but
AMD64's sys32_ioctl() does not. So if you rely on having the BKL
you'll need to add lock_kernel() to your wrapper above.
/Mikael
next prev parent reply other threads:[~2004-02-11 11:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-10 23:53 Moore, Eric Dean
2004-02-11 11:14 ` Mikael Pettersson [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-10 16:10 Moore, Eric Dean
2004-02-10 16:24 ` Mikael Pettersson
2004-02-09 19:43 Moore, Eric Dean
2004-02-10 9:47 ` Mikael Pettersson
2004-02-09 15:58 Moore, Eric Dean
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=16426.3711.606419.745835@alkaid.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=Emoore@lsil.com \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/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
all inboxes | Powered by JetHome®