From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbbEFQgF (ORCPT ); Wed, 6 May 2015 12:36:05 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:56834 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752108AbbEFQav (ORCPT ); Wed, 6 May 2015 12:30:51 -0400 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: baolin.wang@linaro.org, tglx@linutronix.de, albert.aribaud@3adev.fr, john.stultz@linaro.org, bamvor.zhangjian@linaro.org, ruchandani.tina@gmail.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, libc-alpha@sourceware.org, Arnd Bergmann Subject: [PATCH 04/19] y2038: introduce CONFIG_COMPAT_TIME Date: Wed, 6 May 2015 18:30:11 +0200 Message-Id: <1430929826-318934-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.1.0.rc2 In-Reply-To: <1430929826-318934-1-git-send-email-arnd@arndb.de> References: <1430929826-318934-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:jj86vo3wWSjTLPIT34AVu+i7+cqzymiFYHE0B0hufz16lItRX// tCV/aPXhbYDiaBxQ1RHnthmY31ij8msRExVQhRN3mm34P1f8pnRPoi9VWKm0WGORjAGB8ay PqIJAGQ1YivrsKsCKw1rGY38CidGA0HRhMn+Cn5Ybj+zqhAVR74f4VVxdNVgoC6r9IabG0V GLDkMZRS/uDWr++TMyZrQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are a total of system calls (aside from ioctl) that pass a time_t or derived data structure as an argument, and in order to extend time_t to 64-bit, we have to replace them with new system calls and keep providing backwards compatibility. To avoid adding completely new and untested code for this purpose, we introduce a new CONFIG_COMPAT_TIME symbol that is always set on 64-bit architectures with 32-bit compat mode, as well as all 32-bit architectures that have been extended to provide the new system calls. After this is done for all architectures, the CONFIG_COMPAT_TIME symbol can be made a user-selected option, to enable users to build a kernel that only provides y2038-safe system calls. Signed-off-by: Arnd Bergmann --- arch/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index a65eafb24997..630d3d289569 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -545,4 +545,15 @@ config OLD_SIGACTION config COMPAT_OLD_SIGACTION bool +config ARCH_HAS_COMPAT_TIME + def_bool COMPAT + +config COMPAT_TIME + def_bool ARCH_HAS_COMPAT_TIME + help + This should be selected by all architectures that need to support + system calls with a 32-bit time_t. Traditionally, this has been + used on all 32-bit architectures, and needs to be supported on + 64-bit architectures as part of compat syscall handling. + source "kernel/gcov/Kconfig" -- 2.1.0.rc2