Re: Why does x86_64 support a SuSE-specific ioctl?

From: Andi Kleen (ak@muc.de)
Date: Sat Oct 05 2002 - 10:00:13 EST


"H. Peter Anvin" <hpa@zytor.com> writes:
> > -
> > + case TIOCGDEV:
> > + return put_user (kdev_t_to_nr (real_tty->device), (unsigned int*) arg);
>
> This is broken -- you're returning a dev_t as an unsigned int. On
> i386 that means overwriting two bytes of userspace you shouldn't be,

The interface is defined as int, not as dev_t (see the ioctl defines)

I'm not aware of anybody proposing 64bit dev_t for the kernel,
only 32bit dev_t, and the interface provides for that.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:50 EST