Re: BUG? atleast >=2.6.19-rc5, x86 chroot on x86_64

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

 



Chuck Ebbert <[email protected]> wrote:

> I only have 32-bit userspace.  When I run your program against
> a directory on a JFS filesystem (msdos ioctls not supported)
> I get this on vanilla 2.6.19:

Can I just check?  You're using an x86_64 CPU in 64-bit mode with a 64-bit
kernel, but with a completely 32-bit userspace?

> I only have 32-bit userspace.  When I run your program against
> a directory on a JFS filesystem (msdos ioctls not supported)
> I get this on vanilla 2.6.19:

Wait!  You're using JFS, not VFAT?  Oh... I see.

Okay: It's not the MSDOS/VFAT patch that's wrong.  Please don't revert that.
It's the compat ioctl code that's "wrong".

So compat_sys_ioctl() used to return ENOTTY (ENOIOCTLCMD internally) because
the MSDOS ioctl was listed as one that could be translated but it didn't apply
to JFS.

But now, since all the block-based filesystem ioctls have been removed from
that list, you now get EINVAL, not ENOTTY.

> So apparently this is a feature?

Unfortunately, I think it has to be.  We could add a master list of ioctls to
be issued with particular errors if the driver doesn't support them, but is it
worth it?

A question for you: Why is userspace assuming that it'll get ENOTTY rather
than EINVAL?

David
-
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