From: Arnd Bergmann <arnd@arndb.de>
To: Joel Becker <Joel.Becker@oracle.com>
Cc: Linux Netdev <linux-netdev@vger.kernel.org>,
Linux Kernel Mailing List <Linux-Kernel@vger.kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: dev_ifname32() fails on 32->64bit calls in copy_in_user().
Date: Wed, 31 Oct 2007 02:12:42 +0100 [thread overview]
Message-ID: <200710310212.42674.arnd@arndb.de> (raw)
In-Reply-To: <20071031003850.GE7517@tasint.org>
On Wednesday 31 October 2007, Joel Becker wrote:
>
> Instrumenting the kernel with printks, the EFAULT comes from
> the first copy_in_user() at line 325 of fs/compat_ioctl.c (in
> dev_ifname32()). I put some access_ok() checks in, and they do not
> trigger (access is ok). The call never even gets into sys_ioctl().
Can you printk the pointers (arg and uifr) as well? Maybe the end up
unaligned or otherwise corrupted for some reason.
Does the same thing happen when you try the ioctl on something that
is not even a socket? E.g.
#include <whatever you need...>
int main(void)
{
struct ifreq ifr = {};
ioctl(0 /* standard input! */, SIOCGIFNAME, &ifr);
perror("ioctl");
}
Arnd <><
next prev parent reply other threads:[~2007-10-31 1:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 0:38 dev_ifname32() fails on 32->64bit calls in copy_in_user() Joel Becker
2007-10-31 1:06 ` Benjamin Herrenschmidt
2007-10-31 1:12 ` Arnd Bergmann [this message]
2007-10-31 2:35 ` Benjamin Herrenschmidt
2007-10-31 3:41 ` David Miller
2007-10-31 8:03 ` Eric W. Biederman
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=200710310212.42674.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=Joel.Becker@oracle.com \
--cc=Linux-Kernel@vger.kernel.org \
--cc=benh@kernel.crashing.org \
--cc=linux-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