[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3758173.O0N9ZgmMoN@wuerfel>
Date: Wed, 13 Aug 2014 22:06:19 +0200
From: Arnd Bergmann <arnd@...db.de>
To: ksummit-discuss@...ts.linuxfoundation.org
Cc: Ben Hutchings <ben@...adent.org.uk>,
John Stultz <john.stultz@...aro.org>,
"Joseph S. Myers" <joseph@...esourcery.com>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [Ksummit-discuss] 2038 Kernel Summit Discussion Fodder
On Wednesday 13 August 2014 03:06:53 Ben Hutchings wrote:
> > On the kernel side, it also adds more complexity, where we have to add
> > even more complex compat support for 64bit systems to handle all the
> > various 32bit applications possible.
> [...]
>
> Didn't we need to do this already to support x32? Have compat ioctls
> involving time been botched?
AFAICT, every ioctl that involves passing a __kernel_ulong_t or
__kernel_ulong_t is potentially broken on x32, and this includes
everything passing a time_t or timespec.
The problem is that the libc ioctl() function ends up in the kernel's
compat_ioctl handler, which expects the 32-bit ABI, not the 64-bit ABI.
Most other syscalls in x32 however use the 64-bit ABI.
It works only for drivers that use the same function for .ioctl and
.compat_ioctl, and that encode the size of the data structure correctly
in the ioctl command code. I assume this is how we will do it for all
32-bit architectures with 64-bit time_t, but on x32 it also concerns
other types that use __kernel_long_t.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists