Re: dev_ifname32() fails on 32->64bit calls in copy_in_user().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux