All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Arnd Bergmann <arnd@arndb.de>, ksummit-discuss@lists.linuxfoundation.org
Cc: John Stultz <john.stultz@linaro.org>,
	lkml <linux-kernel@vger.kernel.org>,
	"Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: [Ksummit-discuss] 2038 Kernel Summit Discussion Fodder
Date: Fri, 18 Sep 2015 17:04:22 -0700	[thread overview]
Message-ID: <55FCA686.601@zytor.com> (raw)
In-Reply-To: <3758173.O0N9ZgmMoN@wuerfel>

On 08/13/2014 01:06 PM, Arnd Bergmann wrote:
> 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.
> 

OK, super-late reply.

Actually we have by and large dealt with that.  Sadly this meant an
increase in the number of paths with conditional ABI.

	-hpa

WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Arnd Bergmann <arnd@arndb.de>, ksummit-discuss@lists.linuxfoundation.org
Cc: Ben Hutchings <ben@decadent.org.uk>,
	John Stultz <john.stultz@linaro.org>,
	"Joseph S. Myers" <joseph@codesourcery.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [Ksummit-discuss] 2038 Kernel Summit Discussion Fodder
Date: Fri, 18 Sep 2015 17:04:22 -0700	[thread overview]
Message-ID: <55FCA686.601@zytor.com> (raw)
In-Reply-To: <3758173.O0N9ZgmMoN@wuerfel>

On 08/13/2014 01:06 PM, Arnd Bergmann wrote:
> 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.
> 

OK, super-late reply.

Actually we have by and large dealt with that.  Sadly this meant an
increase in the number of paths with conditional ABI.

	-hpa



  reply	other threads:[~2015-09-19  0:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13  0:01 [Ksummit-discuss] 2038 Kernel Summit Discussion Fodder John Stultz
2014-08-13  2:06 ` Ben Hutchings
2014-08-13  2:06   ` Ben Hutchings
2014-08-13  4:03   ` John Stultz
2014-08-13  4:03     ` John Stultz
2014-08-13 20:06   ` Arnd Bergmann
2014-08-13 20:06     ` Arnd Bergmann
2015-09-19  0:04     ` H. Peter Anvin [this message]
2015-09-19  0:04       ` H. Peter Anvin
2014-08-13 12:05 ` Joseph S. Myers
2014-08-13 12:05   ` Joseph S. Myers
2014-08-13 15:37 ` [Ksummit-discuss] " Joseph S. Myers
2014-08-13 15:37   ` Joseph S. Myers
2014-08-13 15:37   ` Joseph S. Myers

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=55FCA686.601@zytor.com \
    --to=hpa@zytor.com \
    --cc=arnd@arndb.de \
    --cc=john.stultz@linaro.org \
    --cc=joseph@codesourcery.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.