From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753477AbbERRER (ORCPT ); Mon, 18 May 2015 13:04:17 -0400 Received: from static-87-79-237-121.netcologne.de ([87.79.237.121]:31560 "EHLO herc.mirbsd.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbbERREN convert rfc822-to-8bit (ORCPT ); Mon, 18 May 2015 13:04:13 -0400 Date: Mon, 18 May 2015 17:03:08 +0000 (UTC) From: Thorsten Glaser X-X-Sender: tg@herc.mirbsd.org To: Arnd Bergmann cc: y2038@lists.linaro.org, klibc@zytor.com, libc-alpha@sourceware.org, linux-api@vger.kernel.org, musl@lists.openwall.com, linux-kernel@vger.kernel.org, Rich Felker , cferris@google.com, enh@google.com, "Joseph S. Myers" Subject: Re: [Y2038] [klibc] kernel/libc uapi changes for y2038 In-Reply-To: <10173485.f8yUt0lQ60@wuerfel> Message-ID: References: <2664016.bYZKg6FQqR@wuerfel> <10173485.f8yUt0lQ60@wuerfel> Followup-To: poster Content-Language: de-DE-1901, en-GB X-Message-Flag: Your mailer is broken. Get an update at http://www.washington.edu/pine/getpine/pcpine.html for free. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fup2p, this is offtopic for most lists Arnd Bergmann dixit: >It's hard because we don't even know what ioctls are affected at this point, >and I was hoping to get this part merged as a stepping stone in the process >of finding out. Oh okay. >e) ioctls that pass a time value as a 'long' or '__u32' instead of > 'time_t'. Fixing them requires adding new ioctl commands to let > them work beyond 2038, independent of what we do here. Yeah, that’s going to be fun. >MIPS on the other hand is no more broken than any of the other 32-bit >ABIs, because it does not use 64-bit __kernel_long_t in its n32 ABI. I have heard from a MIPS porter that one of the flavours suffers from similar problems as x32, just not to that extent. But I don’t recall my source… >ioctls. My plan at this point is to eliminate all uses of time_t in >the kernel and replace them with time64_t or other safe types. >This way, we will eventually find all code that passes 32-bit time types >to user space and can fix it. This will take care of the time_t >related problems on x32 as well. Ah, interesting approach. And existing userspace, as well as new userspace that does not declare 64-bit time_t readiness, is still safe on currently-not-broken architectures? So, there’s enough time to fix this before the various libcs turn that on (and it had better be fixed by then, because it becomes ABI by then). Nice idea. I am wondering a bit about the ioctls being hard to find. I have not much experience with kernel programming, and even less with Linux than with MS-DOS and BSD, but should not each driver have a central ioctl entry point, from which it should cast the user space data into a (possibly locally declared) structure? bye, //mirabilos -- exceptions: a truly awful implementation of quite a nice idea. just about the worst way you could do something like that, afaic. it's like anti-design. that too… may I quote you on that? sure, tho i doubt anyone will listen ;) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Glaser Subject: Re: [klibc] kernel/libc uapi changes for y2038 Date: Mon, 18 May 2015 17:03:08 +0000 (UTC) Message-ID: References: <2664016.bYZKg6FQqR@wuerfel> <10173485.f8yUt0lQ60@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <10173485.f8yUt0lQ60@wuerfel> Content-Language: de-DE-1901, en-GB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: y2038-bounces@lists.linaro.org Sender: "Y2038" To: Arnd Bergmann Cc: klibc@zytor.com, libc-alpha@sourceware.org, y2038@lists.linaro.org, linux-api@vger.kernel.org, musl@lists.openwall.com, linux-kernel@vger.kernel.org, Rich Felker , cferris@google.com, enh@google.com, "Joseph S. Myers" List-Id: linux-api@vger.kernel.org ZnVwMnAsIHRoaXMgaXMgb2ZmdG9waWMgZm9yIG1vc3QgbGlzdHMKCkFybmQgQmVyZ21hbm4gZGl4 aXQ6Cgo+SXQncyBoYXJkIGJlY2F1c2Ugd2UgZG9uJ3QgZXZlbiBrbm93IHdoYXQgaW9jdGxzIGFy ZSBhZmZlY3RlZCBhdCB0aGlzIHBvaW50LAo+YW5kI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