[Y2038] [PATCH v6 0/1] Make input drivers y2038 safe

2018-01-06 Thread Deepa Dinamani
32 bit interfaces at compile time. Changes from v1: * Updated changes according to review comments. * Posted userspace library changes that go along with the series. Deepa Dinamani (1): input: Deprecate real timestamps beyond year 2106 drivers/input/evdev.c| 16

[Y2038] [PATCH evemu] evemu: Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- src/evemu.c | 35 +++ 1 file changed, 23 insertions(+), 12 deletions(-)

[Y2038] [PATCH v3 04/10] arch: introduce CONFIG_64BIT_TIME

2018-01-15 Thread Deepa Dinamani
for this purpose, we introduce a new CONFIG_64BIT_TIME symbol. Every architecture that supports new 64 bit time_t syscalls enables this config. After this is done for all architectures, the CONFIG_64BIT_TIME symbol will be deleted. Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by:

[Y2038] [PATCH v3 05/10] arch: Introduce CONFIG_COMPAT_32BIT_TIME

2018-01-15 Thread Deepa Dinamani
. For instance, architecure syscall tables need to be updated to drop support for 32 bit time_t syscalls. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- arch/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 183f6293d596..cb2f68

[Y2038] [PATCH v3 03/10] compat: enable compat_get/put_timespec64 always

2018-01-15 Thread Deepa Dinamani
These functions are used in the repurposed compat syscalls to provide backward compatibility for using 32 bit time_t on 32 bit systems. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/compat.h | 2 -- include/linux/compat_time.h | 4 kernel/co

[Y2038] [PATCH v3 01/10] compat: Make compat helpers independent of CONFIG_COMPAT

2018-01-15 Thread Deepa Dinamani
Many of the compat time syscalls are also repurposed as 32 bit native syscalls to provide backward compatibility while adding new y2038 safe sycalls. Enabling the helpers makes this possible. Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Deepa Dinamani <deepa.ker...@

[Y2038] [PATCH] Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/input.h | 14 +- src/evdev-mt-touchpad.c | 11 +-- src/evdev-ta

[Y2038] [PATCH libevdev] Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/input.h | 13 - libevdev/libevdev.c | 6 -- test/test-libevdev-

[Y2038] [PATCH v3 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion

2018-01-15 Thread Deepa Dinamani
to exclusively mark legacy syscalls. Deepa Dinamani (10): compat: Make compat helpers independent of CONFIG_COMPAT include: Move compat_timespec/ timeval to compat_time.h compat: enable compat_get/put_timespec64 always arch: introduce CONFIG_64BIT_TIME arch: Introduce

[Y2038] [PATCH] Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/input.h | 14 +- src/evdev-mt-touchpad.c | 11 +-- src/evdev-ta

[Y2038] [PATCH] Update struct input_event

2018-01-15 Thread Deepa Dinamani
The struct input_event is not y2038 safe. Update the struct according to the kernel patch: https://lkml.org/lkml/2018/1/6/324 Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- src/core.c| 3 ++- test/mtdev-test.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)

[Y2038] [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-01-15 Thread Deepa Dinamani
: r...@kernel.org Cc: schwidef...@de.ibm.com Cc: seb...@linux.vnet.ibm.com Cc: sparcli...@vger.kernel.org Cc: s...@linux.vnet.ibm.com Cc: ubr...@linux.vnet.ibm.com Cc: will.dea...@arm.com Cc: x...@kernel.org Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Deepa Dinamani <deepa.ker

[Y2038] [PATCH v3 06/10] posix-clocks: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME

2018-01-15 Thread Deepa Dinamani
functions with clock_nanosleep. But, there is no plan to provide y2038 safe solution for nanosleep. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- kernel/time/hrtimer.c | 2 +- kernel/time/posix-stubs.c | 2 ++ kernel/time/posix-timers.c | 14 -- 3 files chang

[Y2038] [PATCH v3 10/10] nanosleep: change time types to safe __kernel_* types

2018-01-15 Thread Deepa Dinamani
-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/restart_block.h | 7 ++- include/linux/syscalls.h | 6 +++--- kernel/time/hrtimer.c | 8 ++-- kernel/time/posix-stubs.c | 4 ++-- kernel/time/posix-timers.c| 4 ++-- 5 files changed, 15 insertions(

[Y2038] [PATCH v3 08/10] fix get_timespec64() for y2038 safe compat interfaces

2018-01-15 Thread Deepa Dinamani
handled correctly. x86 will be the first architecture that will use the CONFIG_64BIT_TIME. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/time.h | 4 ++-- kernel/time/time.c | 14 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/i

[Y2038] [PATCH v3 07/10] include: Add new y2038 safe __kernel_timespec

2018-01-15 Thread Deepa Dinamani
to the existing native ones with this new type. Hence, put this new type under an ifdef so that the architectures can define CONFIG_64BIT_TIME when they are ready to handle this switch. Cc: linux-a...@vger.kernel.org Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/ti

[Y2038] [PATCH v6 1/4] vfs: Add file timestamp range support

2018-01-21 Thread Deepa Dinamani
-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/super.c | 2 ++ include/linux/fs.h | 3 +++ include/linux/time64.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/fs/super.c b/fs/super.c index 672538ca9831..9e0c97e54e46 100644 --- a/fs/super.c +++ b/fs/super.c @@

[Y2038] [PATCH v6 2/4] ext4: Initialize timestamps limits

2018-01-21 Thread Deepa Dinamani
ext4 has different overflow limits for max filesystem timestamps based on the extra bytes available. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: "Theodore Ts'o" <ty...@mit.edu> Cc: Andreas Dilger <adilger.ker...@dilger.ca> Cc: linux-e...@vger.kernel.

[Y2038] [PATCH v6 4/4] utimes: Clamp the timestamps before update

2018-01-21 Thread Deepa Dinamani
() can be replaced by clamp(). Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/utimes.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/fs/utimes.c b/fs/utimes.c index e4b3d7c2c9f5..82fdcc3284b9 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@

Re: [Y2038] [PATCH] Update struct input_event

2018-01-30 Thread Deepa Dinamani
On Tue, Jan 30, 2018 at 9:50 AM, Martin Kepplinger <mart...@posteo.de> wrote: > Am 16.01.2018 01:16 schrieb Deepa Dinamani: >> >> The struct input_event is not y2038 safe. >> Update the struct according to the kernel patch: >> https://lkml.org/lkml/2018/1/6/324

Re: [Y2038] [PATCH libevdev] Update struct input_event

2018-01-30 Thread Deepa Dinamani
n, Jan 15, 2018 at 04:21:08PM -0800, Deepa Dinamani wrote: >>> >>> The struct input_event is not y2038 safe. >>> Update the struct according to the kernel patch: >>> https://lkml.org/lkml/2018/1/6/324 >>> >>> Signed-off-by: Deepa Dinamani <d

Re: [Y2038] [PATCH] [RFC] y2038: globally rename compat_time to old_time32

2018-07-14 Thread Deepa Dinamani
Right now we only have compat syscalls and native syscalls. Until we transition all the architectures to use the new syscalls, wouldn't it be the same sort of confusion as exists today? These structures today are still used by compat entry points. I'm trying to understand why such a cleanup would

[Y2038] [PATCH 3/5] ppoll: use __kernel_timespec

2018-09-01 Thread Deepa Dinamani
32 bit : ppoll_time32 Compat : compat_sys_ppoll Signed-off-by: Deepa Dinamani --- fs/select.c | 171 ++- include/linux/compat.h | 5 ++ include/linux/syscalls.h | 5 +- 3 files changed, 124 insertions(+), 57 deletions(-) diff --git a/fs

[Y2038] [PATCH 2/5] signal: Add restore_user_sigmask()

2018-09-01 Thread Deepa Dinamani
038 syscalls in the subsequent patches, we add 2 more new versions of the syscalls(for pselect, ppoll and io_pgetevents) in addition to the existing native and compat versions. Adding such an api reduces the logic that would need to be replicated otherwise. Signed-off-by: Deepa Dinamani --- fs/ai

[Y2038] [PATCH 0/5] y2038: Make ppoll, io_pgetevents and pselect y2038 safe

2018-09-01 Thread Deepa Dinamani
. 2. Provide y2038 safe versions of syscalls for all ABIs. [1] https://lkml.org/lkml/2018/8/27/651 Deepa Dinamani (5): signal: Add set_user_sigmask() signal: Add restore_user_sigmask() ppoll: use __kernel_timespec pselect6: use __kernel_timespec io_pgetevents: use __kernel_timespec fs

Re: [Y2038] [PATCH 3/6] timex: prepare compat helpers for y2038 changes

2018-07-05 Thread Deepa Dinamani
The error is fixed with the following patch that goes in before patch 3/6 above in the series. Let me know if I should post a v2 instead. Thanks, Deepa commit bfe4b046ed7f01154aef44fcb77d3f172929ccc2 Author: Deepa Dinamani Date: Thu Jul 5 11:47:25 2018 -0700 riscv: Include asm-generic

[Y2038] [PATCH v2 4/7] timex: prepare compat helpers for y2038 changes

2018-07-05 Thread Deepa Dinamani
Move struct compat_timex to compat_time.h. This is in line with other compat time structures that are planned to be deprecated eventually. Also enable compat_get/put_timex helpers unconditionally. Signed-off-by: Deepa Dinamani Cc: linux-a...@vger.kernel.org --- include/asm-generic/compat.h

[Y2038] [PATCH v2 2/7] sparc: Make thread_info.h available directly

2018-07-05 Thread Deepa Dinamani
linux/compat.h was including this indirectly for asm/compat.h dependencies. Signed-off-by: Deepa Dinamani Cc: da...@davemloft.net Acked-by: David S. Miller --- arch/sparc/include/asm/compat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/include/asm/compat.h b/arch/sparc

[Y2038] [PATCH v2 1/7] arm64: Make basic compat_* types always available

2018-07-05 Thread Deepa Dinamani
As we repurpose more compat syscalls to be used in non CONFIG_COMPAT usecases as part of solving y2038, we need to make these basic types available unconditionally. Signed-off-by: Deepa Dinamani Cc: catalin.mari...@arm.com --- arch/arm64/include/asm/compat.h | 22 -- 1 file

[Y2038] [PATCH v2 0/7] Introduce struct __kernel_timex

2018-07-05 Thread Deepa Dinamani
struct __kernel_timex. 3. Use struct __kernel_timex in place of struct timex. 4. Switch syscalls to use struct __kernel_timex. [1] https://sourceware.org/ml/libc-alpha/2015-05/msg00070.html Changes since v1: * Fix riscv asm/compat.h to pick up generic compat types Deepa Dinamani (7): arm64

[Y2038] [PATCH v2 5/7] time: Add struct __kernel_timex

2018-07-05 Thread Deepa Dinamani
of the time type; keep rest of struct timex the same. This requires extra syscalls to manage all 3 cases on 64 bit architectures. This will not need any application level changes but will add more complexity from kernel side. Signed-off-by: Deepa Dinamani --- include/linux/timex.h | 7

[Y2038] [PATCH v2 3/7] riscv: Include asm-generic/compat.h

2018-07-05 Thread Deepa Dinamani
be to make compat_time.h to be conditional on CONFIG_COMPAT_32BIT_TIME. But, since riscv is already has an asm/compat.h include the generic version instead. Signed-off-by: Deepa Dinamani Cc: pal...@sifive.com Cc: linux-ri...@lists.infradead.org --- arch/riscv/include/asm/compat.h | 3 +++ 1 file

[Y2038] [PATCH v2 6/7] timex: use __kernel_timex internally

2018-07-05 Thread Deepa Dinamani
)) ) @depends on patch forall@ identifier ts; identifier fn; @@ fn(..., - struct timex *ts, + struct __kernel_timex *ts, ...) { ... } @depends on patch forall@ identifier ts; identifier fn; @@ fn(..., - struct timex *ts) { + struct __kernel_timex *ts) { ... } Signed-off-by: Deepa Dinamani Cc

[Y2038] [PATCH v2 7/7] timex: change syscalls to use struct __kernel_timex

2018-07-05 Thread Deepa Dinamani
struct timex is not y2038 safe. Switch all the syscall apis to use y2038 safe __kernel_timex. Note that sys_adjtimex() does not have a y2038 safe solution. The api is meant to be deprecated on 32 bit machines after y2038. Signed-off-by: Deepa Dinamani Cc: linux-...@vger.kernel.org --- include

Re: [Y2038] [PATCH 3/6] timex: prepare compat helpers for y2038 changes

2018-07-05 Thread Deepa Dinamani
, 5 Jul 2018, Deepa Dinamani wrote: > >> The error is fixed with the following patch that goes in before patch >> 3/6 above in the series. >> Let me know if I should post a v2 instead. >> >> Thanks, >> Deepa >> >> >> commit bfe4b046ed7f01154aef44

Re: [Y2038] [PATCH v2 3/7] riscv: Include asm-generic/compat.h

2018-07-05 Thread Deepa Dinamani
On Thu, Jul 5, 2018 at 3:21 PM, Christoph Hellwig wrote: > On Thu, Jul 05, 2018 at 02:36:00PM -0700, Deepa Dinamani wrote: >> defconfig, allmodconfig and nomodconfig. >> And hence does not inlude definitions for compat data types. >> >> Now that time syscalls are being

[Y2038] [PATCH v3 0/7] Introduce struct __kernel_timex

2018-07-06 Thread Deepa Dinamani
up generic compat types Deepa Dinamani (7): arm64: Make basic compat_* types always available sparc: Make thread_info.h available directly riscv: Delete asm/compat.h timex: prepare compat helpers for y2038 changes time: Add struct __kernel_timex timex: use __kernel_timex internally

Re: [Y2038] [PATCH v2 3/7] riscv: Include asm-generic/compat.h

2018-07-06 Thread Deepa Dinamani
On Fri, Jul 6, 2018 at 4:42 AM, Arnd Bergmann wrote: > On Fri, Jul 6, 2018 at 1:56 AM, Deepa Dinamani wrote: >> On Thu, Jul 5, 2018 at 3:21 PM, Christoph Hellwig wrote: >>> On Thu, Jul 05, 2018 at 02:36:00PM -0700, Deepa Dinamani wrote: >>>> defconfig

[Y2038] [PATCH v3 3/7] riscv: Delete asm/compat.h

2018-07-06 Thread Deepa Dinamani
/compat.h provides definitions for riscv 32 bit mode. Alternative would be to make compat_time.h to be conditional on CONFIG_COMPAT_32BIT_TIME. But, since riscv does not does not need asm/compat.h, delete it instead. Signed-off-by: Deepa Dinamani Cc: pal...@sifive.com Cc: linux-ri

[Y2038] [PATCH v3 2/7] sparc: Make thread_info.h available directly

2018-07-06 Thread Deepa Dinamani
linux/compat.h was including this indirectly for asm/compat.h dependencies. Signed-off-by: Deepa Dinamani Cc: da...@davemloft.net Acked-by: David S. Miller --- arch/sparc/include/asm/compat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/include/asm/compat.h b/arch/sparc

[Y2038] [PATCH v3 1/7] arm64: Make basic compat_* types always available

2018-07-06 Thread Deepa Dinamani
As we repurpose more compat syscalls to be used in non CONFIG_COMPAT usecases as part of solving y2038, we need to make these basic types available unconditionally. Signed-off-by: Deepa Dinamani Cc: catalin.mari...@arm.com --- arch/arm64/include/asm/compat.h | 22 -- 1 file

[Y2038] [PATCH v3 5/7] time: Add struct __kernel_timex

2018-07-06 Thread Deepa Dinamani
of the time type; keep rest of struct timex the same. This requires extra syscalls to manage all 3 cases on 64 bit architectures. This will not need any application level changes but will add more complexity from kernel side. Signed-off-by: Deepa Dinamani --- include/linux/timex.h | 7

[Y2038] [PATCH v3 7/7] timex: change syscalls to use struct __kernel_timex

2018-07-06 Thread Deepa Dinamani
struct timex is not y2038 safe. Switch all the syscall apis to use y2038 safe __kernel_timex. Note that sys_adjtimex() does not have a y2038 safe solution. The api is meant to be deprecated on 32 bit machines after y2038. Signed-off-by: Deepa Dinamani Cc: linux-...@vger.kernel.org --- include

Re: [Y2038] [PATCH v6 3/4] vfs: Add timestamp_truncate() api

2018-01-23 Thread Deepa Dinamani
On Mon, Jan 22, 2018 at 12:25 PM, Linus Torvalds <torva...@linux-foundation.org> wrote: > On Sun, Jan 21, 2018 at 6:04 PM, Deepa Dinamani <deepa.ker...@gmail.com> > wrote: >> + t.tv_nsec -= t.tv_nsec % gran; > > This doesn't actuall ywork if tv_nsec is

Re: [Y2038] [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-06 Thread Deepa Dinamani
On Tue, Mar 6, 2018 at 4:48 AM, Christian Borntraeger <borntrae...@de.ibm.com> wrote: > > > On 03/06/2018 01:46 PM, Arnd Bergmann wrote: >> On Mon, Mar 5, 2018 at 10:30 AM, Christian Borntraeger >> <borntrae...@de.ibm.com> wrote: >>> On 01/16/201

[Y2038] [PATCH v4 01/10] compat: Make compat helpers independent of CONFIG_COMPAT

2018-03-12 Thread Deepa Dinamani
Many of the compat time syscalls are also repurposed as 32 bit native syscalls to provide backward compatibility while adding new y2038 safe sycalls. Enabling the helpers makes this possible. Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Deepa Dinamani <deepa.ker...@

[Y2038] [PATCH v4 04/10] arch: introduce CONFIG_64BIT_TIME

2018-03-12 Thread Deepa Dinamani
for this purpose, we introduce a new CONFIG_64BIT_TIME symbol. Every architecture that supports new 64 bit time_t syscalls enables this config. After this is done for all architectures, the CONFIG_64BIT_TIME symbol will be deleted. Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by:

[Y2038] [PATCH v4 05/10] arch: Introduce CONFIG_COMPAT_32BIT_TIME

2018-03-12 Thread Deepa Dinamani
. For instance, architecure syscall tables need to be updated to drop support for 32 bit time_t syscalls. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- arch/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 16e6acfe8711..4377b0

[Y2038] [PATCH v4 06/10] posix-clocks: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME

2018-03-12 Thread Deepa Dinamani
functions with clock_nanosleep. But, there is no plan to provide y2038 safe solution for nanosleep. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- kernel/time/hrtimer.c | 2 +- kernel/time/posix-stubs.c | 2 ++ kernel/time/posix-timers.c | 14 -- 3 files chang

[Y2038] [PATCH v4 08/10] fix get_timespec64() for y2038 safe compat interfaces

2018-03-12 Thread Deepa Dinamani
handled correctly. x86 will be the first architecture that will use the CONFIG_64BIT_TIME. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/time.h | 4 ++-- kernel/time/time.c | 14 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/i

[Y2038] [PATCH v4 03/10] compat: enable compat_get/put_timespec64 always

2018-03-12 Thread Deepa Dinamani
These functions are used in the repurposed compat syscalls to provide backward compatibility for using 32 bit time_t on 32 bit systems. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/compat.h | 2 -- include/linux/compat_time.h | 4 kernel/co

[Y2038] [PATCH v4 07/10] include: Add new y2038 safe __kernel_timespec

2018-03-12 Thread Deepa Dinamani
to the existing native ones with this new type. Hence, put this new type under an ifdef so that the architectures can define CONFIG_64BIT_TIME when they are ready to handle this switch. Cc: linux-a...@vger.kernel.org Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/ti

[Y2038] [PATCH v4 09/10] change time types to new y2038 safe __kernel_* types

2018-03-12 Thread Deepa Dinamani
Change over clock_settime, clock_gettime and clock_getres syscalls to use __kernel_timespec times. This will enable changing over of these syscalls to use new y2038 safe syscalls when the architectures define the CONFIG_64BIT_TIME. Cc: linux-...@vger.kernel.org Signed-off-by: Deepa Dinamani

[Y2038] [PATCH v4 10/10] nanosleep: change time types to safe __kernel_* types

2018-03-12 Thread Deepa Dinamani
-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/restart_block.h | 7 ++- include/linux/syscalls.h | 6 +++--- kernel/time/hrtimer.c | 8 ++-- kernel/time/posix-stubs.c | 4 ++-- kernel/time/posix-timers.c| 4 ++-- 5 files changed, 15 insertions(

Re: [Y2038] [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-12 Thread Deepa Dinamani
<torva...@linux-foundation.org> Replace with globally -Deepa On Tue, Mar 6, 2018 at 2:58 PM, Deepa Dinamani <deepa.ker...@gmail.com> wrote: > On Tue, Mar 6, 2018 at 4:48 AM, Christian Borntraeger > <borntrae...@de.ibm.com> wrote: >> >> >> On 03/06/2018 01:4

Re: [Y2038] [PATCH v4 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-13 Thread Deepa Dinamani
the patch! Yet something to improve: > > [auto build test ERROR on ] > > url: > https://github.com/0day-ci/linux/commits/Deepa-Dinamani/posix_clocks-Prepare-syscalls-for-64-bit-time_t-conversion/20180313-203305 > base: > config: arm64-allnoconfig (attached as .config) >

[Y2038] [PATCH v5 05/10] arch: Introduce CONFIG_COMPAT_32BIT_TIME

2018-03-13 Thread Deepa Dinamani
. For instance, architecure syscall tables need to be updated to drop support for 32 bit time_t syscalls. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- arch/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 16e6acfe8711..4377b0

[Y2038] [PATCH v5 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-13 Thread Deepa Dinamani
: r...@kernel.org Cc: schwidef...@de.ibm.com Cc: seb...@linux.vnet.ibm.com Cc: sparcli...@vger.kernel.org Cc: s...@linux.vnet.ibm.com Cc: ubr...@linux.vnet.ibm.com Cc: will.dea...@arm.com Cc: x...@kernel.org Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Deepa Dinamani <deepa.ker

[Y2038] [PATCH v5 06/10] posix-clocks: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME

2018-03-13 Thread Deepa Dinamani
functions with clock_nanosleep. But, there is no plan to provide y2038 safe solution for nanosleep. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- kernel/time/hrtimer.c | 2 +- kernel/time/posix-stubs.c | 2 ++ kernel/time/posix-timers.c | 14 -- 3 files chang

[Y2038] [PATCH v5 07/10] include: Add new y2038 safe __kernel_timespec

2018-03-13 Thread Deepa Dinamani
to the existing native ones with this new type. Hence, put this new type under an ifdef so that the architectures can define CONFIG_64BIT_TIME when they are ready to handle this switch. Cc: linux-a...@vger.kernel.org Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/ti

[Y2038] [PATCH v5 04/10] arch: introduce CONFIG_64BIT_TIME

2018-03-13 Thread Deepa Dinamani
for this purpose, we introduce a new CONFIG_64BIT_TIME symbol. Every architecture that supports new 64 bit time_t syscalls enables this config. After this is done for all architectures, the CONFIG_64BIT_TIME symbol will be deleted. Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by:

[Y2038] [PATCH v5 08/10] fix get_timespec64() for y2038 safe compat interfaces

2018-03-13 Thread Deepa Dinamani
handled correctly. x86 will be the first architecture that will use the CONFIG_64BIT_TIME. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/time.h | 4 ++-- kernel/time/time.c | 14 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/i

[Y2038] [PATCH v5 09/10] change time types to new y2038 safe __kernel_* types

2018-03-13 Thread Deepa Dinamani
Change over clock_settime, clock_gettime and clock_getres syscalls to use __kernel_timespec times. This will enable changing over of these syscalls to use new y2038 safe syscalls when the architectures define the CONFIG_64BIT_TIME. Cc: linux-...@vger.kernel.org Signed-off-by: Deepa Dinamani

[Y2038] [PATCH v5 10/10] nanosleep: change time types to safe __kernel_* types

2018-03-13 Thread Deepa Dinamani
-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/restart_block.h | 7 ++- include/linux/syscalls.h | 6 +++--- kernel/time/hrtimer.c | 8 ++-- kernel/time/posix-stubs.c | 4 ++-- kernel/time/posix-timers.c| 4 ++-- 5 files changed, 15 insertions(

Re: [Y2038] [PATCH v4 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-13 Thread Deepa Dinamani
the patch! Yet something to improve: > > [auto build test ERROR on ] > > url: > https://github.com/0day-ci/linux/commits/Deepa-Dinamani/posix_clocks-Prepare-syscalls-for-64-bit-time_t-conversion/20180313-203305 > base: > config: powerpc-iss476-smp_defconfig (attached as .confi

[Y2038] [PATCH v5 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion

2018-03-13 Thread Deepa Dinamani
because this will need to enclose compat_sys_nanosleep as well. So, defining it as config LEGACY_TIME_SYSCALLS def_bool 64BIT || !64BIT_TIME will not include compat_sys_nanosleep. We will instead need a new config to exclusively mark legacy syscalls. Deepa Dinamani (10): compat: Make compat

[Y2038] [PATCH v5 03/10] compat: enable compat_get/put_timespec64 always

2018-03-13 Thread Deepa Dinamani
These functions are used in the repurposed compat syscalls to provide backward compatibility for using 32 bit time_t on 32 bit systems. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/compat.h | 2 -- include/linux/compat_time.h | 4 kernel/co

Re: [Y2038] [PATCH v4 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-14 Thread Deepa Dinamani
On Wed, Mar 14, 2018 at 1:52 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Wed, Mar 14, 2018 at 4:50 AM, Deepa Dinamani <deepa.ker...@gmail.com> > wrote: >> The file arch/arm64/kernel/process.c needs asm/compat.h also to be >> included directly since this is included

[Y2038] [PATCH v4 2/5] signal: Add restore_user_sigmask()

2018-09-19 Thread Deepa Dinamani
038 syscalls in the subsequent patches, we add two more new versions of the syscalls (for pselect, ppoll and io_pgetevents) in addition to the existing native and compat versions. Adding such an api reduces the logic that would need to be replicated otherwise. Signed-off-by: Deepa Dinamani --- fs/ai

[Y2038] [PATCH v4 1/5] signal: Add set_user_sigmask()

2018-09-19 Thread Deepa Dinamani
rom the api as the function only returns an error on an invalid first argument that is hardcoded at these call sites. The updated logic uses set_current_blocked() instead. Signed-off-by: Deepa Dinamani --- fs/aio.c | 23 ++- fs/eventpoll.c |

[Y2038] [PATCH v4 0/5] y2038: Make ppoll, io_pgetevents and pselect y2038 safe

2018-09-19 Thread Deepa Dinamani
out by arnd Deepa Dinamani (5): signal: Add set_user_sigmask() signal: Add restore_user_sigmask() ppoll: use __kernel_timespec pselect6: use __kernel_timespec io_pgetevents: use __kernel_timespec fs/aio.c | 134 ++- fs/eventpoll.c | 52 +- fs

[Y2038] [PATCH v4 3/5] ppoll: use __kernel_timespec

2018-09-19 Thread Deepa Dinamani
32 bit : ppoll_time32 Compat : compat_sys_ppoll Signed-off-by: Deepa Dinamani --- fs/select.c | 166 ++- include/linux/compat.h | 5 ++ include/linux/syscalls.h | 5 +- 3 files changed, 120 insertions(+), 56 deletions(-) diff --git a/fs

[Y2038] [PATCH v4 5/5] io_pgetevents: use __kernel_timespec

2018-09-19 Thread Deepa Dinamani
for 32 bit ABIs) Native 32 bit : sys_io_pgetevents_time32 Compat : compat_sys_io_pgetevents Note that io_getevents syscalls do not have a y2038 safe solution. Signed-off-by: Deepa Dinamani --- fs/aio.c | 84 ++-- include/linux/compat.h | 6

[Y2038] [PATCH v4 4/5] pselect6: use __kernel_timespec

2018-09-19 Thread Deepa Dinamani
) Native 32 bit : pselect6_time32 Compat : compat_sys_pselect6 Note that all other versions of select syscalls will not have y2038 safe versions. Signed-off-by: Deepa Dinamani --- fs/select.c | 94 ++-- include/linux/compat.h | 5 +++ include

[Y2038] [PATCH] input_event: Provide override for sparc64

2018-12-29 Thread Deepa Dinamani
Signed-off-by: Deepa Dinamani --- include/uapi/linux/input.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index fb78f6f500f3..ffab958bc512 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h @@ -26

[Y2038] [PATCH v3] sock: Make sock->sk_stamp thread-safe

2018-12-27 Thread Deepa Dinamani
a0c ("net: reorganize struct sock for better data locality") Note that all the instances of the sk_stamp accesses are either through the ioctl or the syscall recvmsg. Signed-off-by: Deepa Dinamani --- Changes since v2: * added ifdef as per eric's request Changes since v1: * fixed sunrpc sk_sta

[Y2038] [PATCH] input: Fix the CONFIG_SPARC64 mixup

2019-01-20 Thread Deepa Dinamani
ms") Signed-off-by: Deepa Dinamani --- include/uapi/linux/input.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index ffab958bc512..f056b2a00d5c 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/in

Re: [Y2038] [PATCH] input_event: Provide override for sparc64

2019-01-15 Thread Deepa Dinamani
> On Jan 15, 2019, at 2:32 PM, Dmitry Torokhov > wrote: > >> On Tue, Jan 15, 2019 at 1:29 PM David Miller wrote: >> >> From: Arnd Bergmann >> Date: Tue, 15 Jan 2019 22:19:27 +0100 >> >>> The correct check appears to be >>> >>> #if defined(__sparc__) && defined(__arch64__) >> >> That is

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Deepa Dinamani
> > Also for the other comment. The reason the conditionals were not > > consistent is because they were not consistent to begin with. > > The only difference I see is an inversion of the test. Nesting order > is the same: > > int need_software_tstamp = sock_flag(sk, SOCK_RCVTSTAMP); >

Re: [Y2038] [PATCH v2 7/8] socket: Add SO_TIMESTAMPING_NEW

2018-12-18 Thread Deepa Dinamani
On Tue, Dec 18, 2018 at 8:16 AM Arnd Bergmann wrote: > > On Wed, Dec 12, 2018 at 4:25 PM Willem de Bruijn > wrote: > > On Tue, Dec 11, 2018 at 3:30 PM Deepa Dinamani > > wrote: > > > > @@ -851,39 +890,7 @@ int sock_setsockopt(struct socket *so

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-18 Thread Deepa Dinamani
On Tue, Dec 18, 2018 at 8:33 AM Arnd Bergmann wrote: > > On Sat, Dec 15, 2018 at 7:52 PM Willem de Bruijn > wrote: > > > > > 3 reasons for not doing this: > > > > > > 1. We do not want to break userspace. If we move this to > > > linux/socket.h all the userspace programs now have to include > >

[Y2038] [PATCH] sock: Make sock->sk_tstamp thread-safe

2018-12-21 Thread Deepa Dinamani
") Note that all the instances of the sk_tstamp accesses are either through the ioctl or the syscall recvmsg. Signed-off-by: Deepa Dinamani --- include/net/sock.h | 16 +--- net/compat.c | 30 +- net/core/sock.c| 34

Re: [Y2038] [PATCH] sock: Make sock->sk_tstamp thread-safe

2018-12-22 Thread Deepa Dinamani
> Are we actually worried about concurrent writers here? I thought the > only problem was a race between writer and reader, which would mean > that we could solve it using only a seqcount_t which is cheaper to > update than a seqlock_t. I considered using just the seqcount_t. But, I think we do

[Y2038] [PATCH v2 1/8] arch: Use asm-generic/socket.h when possible

2018-12-11 Thread Deepa Dinamani
Many architectures maintain an arch specific copy of the file even though there are no differences with the asm-generic one. Allow these architectures to use the generic one instead. Signed-off-by: Deepa Dinamani Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: t...@linutronix.de Cc: schwidef

[Y2038] [PATCH v2 3/8] arch: sparc: Override struct __kernel_old_timeval

2018-12-11 Thread Deepa Dinamani
-by: Deepa Dinamani Cc: sparcli...@vger.kernel.org --- arch/sparc/include/uapi/asm/posix_types.h | 10 ++ include/uapi/linux/time.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/arch/sparc/include/uapi/asm/posix_types.h b/arch/sparc/include/uapi/asm/posix_types.h

[Y2038] [PATCH v2 5/8] socket: Add struct __kernel_sock_timeval

2018-12-11 Thread Deepa Dinamani
of SO_TIMESTAMP_OLD. struct __kernel_sock_timeval will be used as the timestamp format at that time. struct __kernel_sock_timeval also maintains the same layout across 32 bit and 64 bit ABIs. Signed-off-by: Deepa Dinamani --- include/uapi/linux/time.h | 5 + 1 file changed, 5 insertions(+) diff --git

[Y2038] [PATCH v2 4/8] socket: Use old_timeval types for socket timestamps

2018-12-11 Thread Deepa Dinamani
safe types are not supported anymore. Signed-off-by: Deepa Dinamani Cc: i...@linux-pingi.de --- drivers/isdn/mISDN/socket.c | 2 +- include/linux/skbuff.h | 6 +++--- net/bluetooth/hci_sock.c| 4 ++-- net/compat.c| 6 +++--- net/ipv4/tcp.c | 2 +- net/rds/recv.c

[Y2038] [PATCH v2 8/8] socket: Update timestamping Documentation

2018-12-11 Thread Deepa Dinamani
With the new y2038 safe timestamping options added, update the documentation to reflect the changes. Signed-off-by: Deepa Dinamani --- Documentation/networking/timestamping.txt | 43 --- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/Documentation/networking

[Y2038] [PATCH v2 2/8] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD

2018-12-11 Thread Deepa Dinamani
tag suffixes. Also note that kernel will not use the untagged SO_TIMESTAMP* and SCM_TIMESTAMP* options internally anymore. Signed-off-by: Deepa Dinamani Cc: del...@gmx.de Cc: dhowe...@redhat.com Cc: j...@parisc-linux.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: linux-...@lists.infradead.org

[Y2038] [PATCH v2 7/8] socket: Add SO_TIMESTAMPING_NEW

2018-12-11 Thread Deepa Dinamani
Add SO_TIMESTAMPING_NEW variant of socket timestamp options. This is the y2038 safe versions of the SO_TIMESTAMPING_OLD for all architectures. Signed-off-by: Deepa Dinamani Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: r...@twiddle.net Cc: t...@linutronix.de Cc: ubr...@linux.ibm.com Cc

[Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-11 Thread Deepa Dinamani
Add SO_TIMESTAMP_NEW and SO_TIMESTAMPNS_NEW variants of socket timestamp options. These are the y2038 safe versions of the SO_TIMESTAMP_OLD and SO_TIMESTAMPNS_OLD for all architectures. Note that the format of scm_timestamping.ts[0] is not changed in this patch. Signed-off-by: Deepa Dinamani Cc

Re: [Y2038] [PATCH] sock: Make sock->sk_tstamp thread-safe

2018-12-23 Thread Deepa Dinamani
On Sat, Dec 22, 2018 at 11:31 PM Eric Dumazet wrote: > > > > On 12/21/2018 12:27 PM, Deepa Dinamani wrote: > > Al Viro mentioned that there is probably a race condition > > lurking in accesses of sk_tstamp on 32-bit machines. > > > > sock->sk_tstamp is

[Y2038] [PATCH v2 1/1] sock: Make sock->sk_stamp thread-safe

2018-12-22 Thread Deepa Dinamani
a0c ("net: reorganize struct sock for better data locality") Note that all the instances of the sk_stamp accesses are either through the ioctl or the syscall recvmsg. Signed-off-by: Deepa Dinamani --- Changes since v1: * fixed sunrpc sk_stamp update include/net/sock.h | 16 +++

Re: [Y2038] [PATCH v2 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-12-15 Thread Deepa Dinamani
On Sat, Dec 15, 2018 at 7:12 AM Willem de Bruijn wrote: > > On Fri, Dec 14, 2018 at 8:07 PM Deepa Dinamani wrote: > > > > > > diff --git a/arch/alpha/include/uapi/asm/socket.h > > > > b/arch/alpha/include/uapi/asm/socket.h > > > > index 00e45c80e5

Re: [Y2038] [PATCH 7/8] socket: Add SO_TIMESTAMP[NS]_NEW

2018-11-30 Thread Deepa Dinamani
On Sun, Nov 25, 2018 at 6:33 AM Willem de Bruijn wrote: > > On Sun, Nov 25, 2018 at 12:28 AM Deepa Dinamani > wrote: > > > > > > > + if (type == SO_TIMESTAMP_NEW || type == SO_TIMESTAMPNS_NEW) > > > > > + sock_set_flag

Re: [Y2038] [PATCH 2/8] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD

2018-11-30 Thread Deepa Dinamani
On Sat, Nov 24, 2018 at 7:59 PM Willem de Bruijn wrote: > > On Sat, Nov 24, 2018 at 3:58 AM Deepa Dinamani wrote: > > > > SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING options, the > > way they are currently defined, are not y2038 safe. > > Subsequent patches in

Re: [Y2038] [PATCH 3/8] socket: Disentangle SOCK_RCVTSTAMPNS from SOCK_RCVTSTAMP

2018-11-30 Thread Deepa Dinamani
On Sun, Nov 25, 2018 at 10:19 AM David Miller wrote: > > From: Willem de Bruijn > Date: Sun, 25 Nov 2018 09:18:55 -0500 > > > The existing logic is as is for a reason. There is no need to change > > it to satisfy the main purpose of your patchset? > > > > It is structured as one bit to test

[Y2038] [PATCH 2/8] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD

2018-11-23 Thread Deepa Dinamani
tag suffixes. Also note that kernel will not use the untagged SO_TIMESTAMP* and SCM_TIMESTAMP* options internally anymore. Signed-off-by: Deepa Dinamani Cc: del...@gmx.de Cc: dhowe...@redhat.com Cc: j...@parisc-linux.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: linux-...@lists.infradead.org

[Y2038] [PATCH 4/8] arch: sparc: Override struct __kernel_old_timeval

2018-11-23 Thread Deepa Dinamani
-by: Deepa Dinamani Cc: sparcli...@vger.kernel.org --- arch/sparc/include/uapi/asm/posix_types.h | 10 ++ include/uapi/linux/time.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/arch/sparc/include/uapi/asm/posix_types.h b/arch/sparc/include/uapi/asm/posix_types.h

[Y2038] [PATCH 3/8] socket: Disentangle SOCK_RCVTSTAMPNS from SOCK_RCVTSTAMP

2018-11-23 Thread Deepa Dinamani
, the updates to rds_incoming->i_rx_tstamp only track SOCK_RCVTSTAMP and not SOCK_RCVTSTAMPNS. Signed-off-by: Deepa Dinamani --- include/net/sock.h | 4 +++- net/core/sock.c| 37 - net/ipv4/tcp.c | 20 +--- net/socket.c |

<    1   2   3   4   5   6   7   >