[Y2038] [PATCH] fs: cifs: Replace CURRENT_TIME by get_seconds

2016-10-01 Thread Deepa Dinamani
between server and client, and the largest timezone difference is in the range of one day. All cifs timestamps currently use timespec internally. This timestamp can also be transitioned into using timespec64 when all other timestamps for cifs is transitioned to use timespec64. Signed-off-by: Deepa

[Y2038] [PATCH] fs: ufs: Use ktime_get_real_ts64() for birthtime

2016-10-01 Thread Deepa Dinamani
CURRENT_TIME is not y2038 safe. Replace it with ktime_get_real_ts64(). Inode time formats are already 64 bit long and accommodates time64_t. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Evgeniy Dushistov <dushis...@mail.ru> --- fs/ufs/ialloc.c | 6 -- 1 fil

[Y2038] [PATCH] fs: ocfs2: Replace CURRENT_TIME macro

2016-10-01 Thread Deepa Dinamani
wide enough to accommodate time64_t. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: Arnd Bergmann <a...@arndb.de> Cc: Joel Becker <jl...@evilplan.org> Cc: ocfs2-de...@oss.oracle.com --- fs/ocfs2/cluster/heartbeat.c | 2 +- fs/ocfs2/inode.c | 2 +-

[Y2038] [PATCH] audit: Use timespec64 to represent audit timestamps

2016-10-01 Thread Deepa Dinamani
1024 characters. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: Arnd Bergmann <a...@arndb.de> Acked-by: Paul Moore <p...@paul-moore.com> Acked-by: Richard Guy Briggs <r...@redhat.com> Cc: Eric Paris <epa...@redhat.com> Cc: Paul Moore <p..

Re: [Y2038] [PATCH v2 3/4] input: Deprecate real timestamps beyond year 2106

2016-10-27 Thread Deepa Dinamani
>> struct timeval is not y2038 safe. >> All usage of timeval in the kernel will be replaced by >> y2038 safe structures. >> >> struct input_event maintains time for each input event. >> Real time timestamps are not ideal for input as this >> time can go backwards as noted in the patch a80b83b7b8

Re: [Y2038] [PATCH v2 3/4] input: Deprecate real timestamps beyond year 2106

2016-10-27 Thread Deepa Dinamani
On Wed, Oct 26, 2016 at 7:56 PM, Peter Hutterer <peter.hutte...@who-t.net> wrote: > On Mon, Oct 17, 2016 at 08:27:32PM -0700, Deepa Dinamani wrote: >> struct timeval is not y2038 safe. >> All usage of timeval in the kernel will be replaced by >> y2038 safe structure

Re: [Y2038] [PATCH v2 3/4] input: Deprecate real timestamps beyond year 2106

2016-10-28 Thread Deepa Dinamani
On Fri, Oct 28, 2016 at 5:43 AM, Arnd Bergmann <a...@arndb.de> wrote: > On Monday, October 17, 2016 8:27:32 PM CEST Deepa Dinamani wrote: >> @@ -55,24 +60,24 @@ struct ff_effect_compat { >> >> static inline size_t input_event_size(void) >> { >

Re: [Y2038] [PATCH v2 3/4] input: Deprecate real timestamps beyond year 2106

2016-10-29 Thread Deepa Dinamani
> btw, where did you post the libevdev patch? I haven't seen it anywhere I'm > subscribed to. The libevdev patch was posted to input-to...@lists.freedesktop.org : https://www.mail-archive.com/y2038@lists.linaro.org/msg01824.html -Deepa ___ Y2038

Re: [Y2038] [PATCH v2 3/4] input: Deprecate real timestamps beyond year 2106

2016-10-29 Thread Deepa Dinamani
> I think we should do those two things completely independently. > We need to do something now to preserve the current interfaces > for the glibc changes that are coming soon [1], and Deepa's > patches do that (though I now realize the changelog doesn't > mention the requirement). I'll update

Re: [Y2038] [RFC 0/6] vfs: Add timestamp range check support

2016-11-06 Thread Deepa Dinamani
On Sun, Nov 6, 2016 at 12:28 PM, Arnd Bergmann <a...@arndb.de> wrote: > On Sunday, November 6, 2016 9:44:33 AM CET Deepa Dinamani wrote: >> I will post xfs tests that validate mount and range checking. >> I will keep the policy same as what the RFC suggests for now. >>

[Y2038] [PATCH] Update libinput to support evdev driver v1.2

2016-10-19 Thread Deepa Dinamani
is proposed at https://lkml.org/lkml/2016/10/17/1146 . Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/input.h | 49 +++-- src/evdev.c | 4 ++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/i

[Y2038] [PATCH] Update libevdev to support evdev driver v1.2

2016-10-19 Thread Deepa Dinamani
interfaces of libevdev. The associated kernel driver change is at https://lkml.org/lkml/2016/10/17/1146 . Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/input.h | 47 ++ include/linux/uinput.h | 3 +++ li

[Y2038] [PATCH] Update mtdev to support evdev driver v1.2

2016-10-19 Thread Deepa Dinamani
Update input event structures read from the kernel to match the 1.2 version of the driver. There are no changes to the exposed interfaces of the mtdev. The associated kernel driver change is proposed at https://lkml.org/lkml/2016/10/17/1146 . Signed-off-by: Deepa Dinamani <deepa.

[Y2038] [PATCH v2 3/4] input: Deprecate real timestamps beyond year 2106

2016-10-17 Thread Deepa Dinamani
raw_input_event. The changes to the popular libraries will be posted along with the kernel changes. The driver version is also updated to reflect the change in event format. Suggested-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: A

[Y2038] [PATCH v2 0/4] Make input drivers y2038 safe

2016-10-17 Thread Deepa Dinamani
will be merged at the same time. Changes from v1: * Updated changes according to review comments. * Posted userspace library changes that go along with the series. Deepa Dinamani (4): uinput: Add ioctl for using monotonic/ boot times input: evdev: Replace timeval with timespec64 input

[Y2038] [PATCH v2 4/4] input: serio: Replace timeval by timespec64

2016-10-17 Thread Deepa Dinamani
are sufficient here. The unit of the delta times is also changed in certain cases to nanoseconds rather than microseconds. This is in line with timespec64 which keeps time in nanoseconds. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: Arnd Bergmann <a...@arndb.de>

[Y2038] [RESEND PATCH] fs: ufs: Use ktime_get_real_ts64() for birthtime

2016-11-11 Thread Deepa Dinamani
CURRENT_TIME is not y2038 safe. Replace it with ktime_get_real_ts64(). Inode time formats are already 64 bit long and accommodates time64_t. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/ufs/ialloc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/

Re: [Y2038] [RESEND PATCH] fs: jfs: Replace CURRENT_TIME_SEC by current_time()

2016-11-11 Thread Deepa Dinamani
On Fri, Nov 11, 2016 at 10:42 AM, Dave Kleikamp <dave.kleik...@oracle.com> wrote: > On 11/11/2016 12:00 PM, Deepa Dinamani wrote: >> jfs uses nanosecond granularity for filesystem timestamps. >> Only this assignment is not using nanosecond granularity. >> Use curr

[Y2038] [RESEND PATCH] fs: ext4: Use current_time() for inode timestamps

2016-11-11 Thread Deepa Dinamani
() or CURRENT_TIME_SEC is not required. Use current_time() directly to obtain timestamps unconditionally, and remove ext4_current_time(). Quota files are assumed to be on the same filesystem. Hence, use current_time() for these files as well. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by

[Y2038] [RFC 1/6] vfs: Add file timestamp range support

2016-11-23 Thread Deepa Dinamani
-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/libfs.c | 4 fs/super.c | 2 ++ include/linux/fs.h | 3 +++ include/linux/time64.h | 2 ++ 4 files changed, 11 insertions(+) diff --git a/fs/libfs.c b/fs/libfs.c index 48826d4..f03c904 100644 --- a/fs/l

[Y2038] [RFC 2/6] vfs: Add checks for filesystem timestamp limits

2016-11-23 Thread Deepa Dinamani
and the least max timestamp supported. If we take the sysctl approach, then the plan is to also add a boot param to support initial override of these checks without recompilation. Suggested-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> ---

[Y2038] [RFC 4/6] ext4: Initialize timestamps limits

2016-11-23 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] [RFC 3/6] afs: Add time limits in the super block

2016-11-23 Thread Deepa Dinamani
Note that all the filesystems that have such simple limits will be initialized in the same patch. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: linux-...@lists.infradead.org --- fs/afs/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/afs/super.c b/fs/afs/s

[Y2038] [RFC 6/6] utimes: Clamp the timestamps before update

2016-11-23 Thread Deepa Dinamani
here as vfs is not yet using struct timespec64 internally. This is for compilation purposes only. The actual patch can only be merged only after vfs is transitioned to use timespec64 for correct operation of clamp macro. At which point, clamp_t() will be replaced by clamp(). Signed-off-by: Deepa

[Y2038] [RFC 5/6] vfs: Add timestamp_truncate() api

2016-11-23 Thread Deepa Dinamani
for compilation purposes. The actual patch can only be merged after the vfs is transitioned to use timespec64 for correct operation of clamp macro. At which point, clamp_t() will be replaced by clamp(). Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/inode.

[Y2038] [PATCH] generic/390: Add tests for inode timestamp policy

2016-11-23 Thread Deepa Dinamani
The test helps to validate clamping and mount behaviors according to supported file system timestamp ranges. Note that the test can fail on 32-bit systems for a few file systems. This will be corrected when vfs is transitioned to use 64-bit timestamps. Signed-off-by: Deepa Dinamani <deepa.

[Y2038] [RESEND PATCH] fs: jfs: Replace CURRENT_TIME_SEC by current_time()

2016-11-11 Thread Deepa Dinamani
jfs uses nanosecond granularity for filesystem timestamps. Only this assignment is not using nanosecond granularity. Use current_time() to get the right granularity. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Acked-by: Dave Kleikamp <dave.kleik...@oracle.com> Revie

[Y2038] [RFC 2/6] vfs: Add checks for filesystem timestamp limits

2016-11-02 Thread Deepa Dinamani
and the least max timestamp supported. If we take the sysctl approach, then the plan is to also add a boot param to support initial override of these checks without recompilation. Suggested-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> ---

[Y2038] [RFC 6/6] utimes: Clamp the timestamps before update

2016-11-02 Thread Deepa Dinamani
here as vfs is not yet using struct timespec64 internally. This is for compilation purposes only. The actual patch can only be merged only after vfs is transitioned to use timespec64 for correct operation of clamp macro. At which point, clamp_t() will be replaced by clamp(). Signed-off-by: Deepa

[Y2038] [RFC 4/6] ext4: Initialize timestamps limits

2016-11-02 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] [RFC 5/6] vfs: Add timestamp_truncate() api

2016-11-02 Thread Deepa Dinamani
for compilation purposes. The actual patch can only be merged after the vfs is transitioned to use timespec64 for correct operation of clamp macro. At which point, clamp_t() will be replaced by clamp(). Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/inode.

[Y2038] [RFC 0/6] vfs: Add timestamp range check support

2016-11-02 Thread Deepa Dinamani
that the series depends on: https://lkml.org/lkml/2016/6/9/38 . This needs reposting to the mailing list. The branch for the tree along with dependency can be found at https://github.com/deepa-hub/vfs.git refs/heads/vfs_timestamp_policy Deepa Dinamani (6): vfs: Add file timestamp range support

[Y2038] [PATCH] xfs_io: implement 'utimes' command

2016-12-17 Thread Deepa Dinamani
Add the utimes command to provide a way to utilize the futimens C library call. This is the interface to the utimensat system call, which updates the mtime and atime of a file. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/input.h | 1 + io/Makefile | 2

[Y2038] [LSF/MM TOPIC] Making VFS y2038 ready

2017-01-10 Thread Deepa Dinamani
I would like to discuss approaches to finish preparing the kernel to be y2038 ready. Arnd started the effort a few years ago and I'm working on a few parts of the problem. Background: The y2038 problem arises because of time_t being defined as long, which is different between 32-bit and 64-bit

Re: [Y2038] [PATCH] generic/390: Add tests for inode timestamp policy

2016-12-02 Thread Deepa Dinamani
> Need an entry in .gitignore file too. Will add this. >> SUBDIRS = >> >> diff --git a/src/y2038_futimens.c b/src/y2038_futimens.c >> new file mode 100644 >> index 000..291e4fa >> --- /dev/null >> +++ b/src/y2038_futimens.c >> @@ -0,0 +1,61 @@ >> +#include >> +#include >> +#include >>

Re: [Y2038] [PATCH] generic/390: Add tests for inode timestamp policy

2016-12-02 Thread Deepa Dinamani
>> > +_filesystem_timestamp_range() >> > +{ >> > + device=${1:-$TEST_DEV} >> > + case $FSTYP in >> > + ext4) #dumpe2fs >> > + if [ $(dumpe2fs -h $device 2>/dev/null | grep "Inode size:" | >> > cut -d: -f2) -gt 128 ]; then >> > + echo "-2147483648 15032385535"

[Y2038] [GIT PULL] [PATCH v4 00/26] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2017-01-01 Thread Deepa Dinamani
) Deepa Dinamani (26): vfs: Add current_time() api fs: proc: Delete inode time initializations in proc_alloc_inode() fs: Replace CURRENT_TIME with current_time() for inode timestamps fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps fs: Replace

Re: [Y2038] [GIT PULL] [PATCH v4 00/26] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2017-01-01 Thread Deepa Dinamani
Thank you for the suggestion. > Who are you execting to pull this huge patch series? The last pull request was addressed to Al as per Arnd's suggestion. I'm not completely sure who should it be addressed to. > Why not just introduce the new api call, wait for that to be merged, and > then push

Re: [Y2038] [PATCH v2] generic/390: Add tests for inode timestamp policy

2016-12-30 Thread Deepa Dinamani
On Wed, Dec 28, 2016 at 3:05 AM, Eryu Guan <eg...@redhat.com> wrote: > On Sat, Dec 24, 2016 at 07:38:13PM -0800, Deepa Dinamani wrote: >> The test helps to validate clamping and mount behaviors >> according to supported file system timestamp ranges. >> >> Note

[Y2038] [PATCH v3] generic/390: Add tests for inode timestamp policy

2017-01-03 Thread Deepa Dinamani
The test helps to validate clamping and mount behaviors according to supported file system timestamp ranges. Note that the test can fail on 32-bit systems for a few file systems. This will be corrected when vfs is transitioned to use 64-bit timestamps. Signed-off-by: Deepa Dinamani <deepa.

Re: [Y2038] [PATCH v2] xfs_io: implement 'utimes' command

2016-12-29 Thread Deepa Dinamani
>> Add the utimes command to provide a way to utilize >> the futimens C library call. This is the >> interface to the utimensat system call, which updates >> the mtime and atime of a file. >> >> Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> >

[Y2038] [PATCH v2] xfs_io: implement 'utimes' command

2016-12-19 Thread Deepa Dinamani
Add the utimes command to provide a way to utilize the futimens C library call. This is the interface to the utimensat system call, which updates the mtime and atime of a file. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- Changes since v1: * changed error return values * r

Re: [Y2038] [PATCH] xfs_io: implement 'utimes' command

2016-12-18 Thread Deepa Dinamani
>> + if (argc != 5) >> + return command_usage(_cmd); > > Because you set argsmin & argsmax to 4, it should be impossible > to get here with anything other than argc=5 - it's caught > elsewhere: Yes, you are right. This was something I was using to debug. I will remove this.

[Y2038] [PATCH v2] generic/390: Add tests for inode timestamp policy

2016-12-24 Thread Deepa Dinamani
The test helps to validate clamping and mount behaviors according to supported file system timestamp ranges. Note that the test can fail on 32-bit systems for a few file systems. This will be corrected when vfs is transitioned to use 64-bit timestamps. Signed-off-by: Deepa Dinamani <deepa.

Re: [Y2038] [PATCH 7/7] Change k_clock nsleep() to use timespec64

2017-03-21 Thread Deepa Dinamani
>> index f608941..97a883a 100644 >> --- a/include/linux/posix-timers.h >> +++ b/include/linux/posix-timers.h >> @@ -94,7 +94,7 @@ struct k_clock { >> int (*clock_adj) (const clockid_t which_clock, struct timex *tx); >> int (*timer_create) (struct k_itimer *timer); >> int

Re: [Y2038] [RESEND PATCH 1/7] time: Delete do_sys_setimeofday()

2017-03-21 Thread Deepa Dinamani
>arch/alpha/kernel/osf_sys.c: In function 'SYSC_osf_settimeofday': >>> arch/alpha/kernel/osf_sys.c:1032:9: error: implicit declaration of function >>> 'do_sys_settimeofday' [-Werror=implicit-function-declaration] > return do_sys_settimeofday(tv ? : NULL, tz ? : NULL); >

[Y2038] [PATCH v2] trace: Make trace_hwlat timestamp y2038 safe

2017-03-28 Thread Deepa Dinamani
struct timespec is not y2038 safe on 32 bit machines and needs to be replaced by struct timespec64 in order to represent times beyond year 2038 on such machines. Fix all the timestamp representation in struct trace_hwlat and all the corresponding implementations. Signed-off-by: Deepa Dinamani

[Y2038] [PATCH v3] trace: Make trace_hwlat timestamp y2038 safe

2017-03-28 Thread Deepa Dinamani
struct timespec is not y2038 safe on 32 bit machines and needs to be replaced by struct timespec64 in order to represent times beyond year 2038 on such machines. Fix all the timestamp representation in struct trace_hwlat and all the corresponding implementations. Signed-off-by: Deepa Dinamani

[Y2038] [PATCH v2 2/7] time: Change posix clocks ops interfaces to use timespec64

2017-03-26 Thread Deepa Dinamani
that the clock_getres() interface has also been changed to use timespec64 even though this particular interface is not affected by the y2038 problem. This helps verification for internal kernel code for y2038 readiness by getting rid of time_t/ timeval/ timespec. Signed-off-by: Deepa Dinamani <deepa.

[Y2038] [PATCH v2 1/7] time: Delete do_sys_setimeofday()

2017-03-26 Thread Deepa Dinamani
struct timespec is not y2038 safe on 32 bit machines and needs to be replaced with struct timespec64. do_sys_timeofday() is just a wrapper function. Replace all calls to this function with direct calls to do_sys_timeofday64() instead and delete do_sys_timeofday(). Signed-off-by: Deepa Dinamani

[Y2038] [PATCH v2 0/7] Change k_clock interfaces to use timespec64

2017-03-26 Thread Deepa Dinamani
for alpha. Deepa Dinamani (7): time: Delete do_sys_setimeofday() time: Change posix clocks ops interfaces to use timespec64 Change k_clock clock_get() to use timespec64 Change k_clock clock_getres() to use timespec64 Change k_clock clock_set() to use timespec64 Change k_clock timer_set

[Y2038] [PATCH v2 6/7] Change k_clock timer_set() and timer_get() to use timespec64

2017-03-26 Thread Deepa Dinamani
series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- drivers/char/mmtimer.c | 20 ++-- include/linux/posix-timers.h | 12 ++-- kernel/time/alarmtimer.c | 14 +++--- kernel/time/posix-clock.c | 21 +++-- kerne

[Y2038] [PATCH v2 3/7] Change k_clock clock_get() to use timespec64

2017-03-26 Thread Deepa Dinamani
struct timespec is not y2038 safe on 32 bit machines. Replace uses of struct timespec with struct timespec64 in the kernel. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- drivers/char/mmtimer.c

[Y2038] [PATCH v2 4/7] Change k_clock clock_getres() to use timespec64

2017-03-26 Thread Deepa Dinamani
this particular interface is not affected by the y2038 problem. This helps verification for internal kernel code for y2038 readiness by getting rid of time_t/ timeval/ timespec. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- drivers/char/mmtimer.c | 2 +- include/linux/posix-ti

[Y2038] [PATCH v2 5/7] Change k_clock clock_set() to use timespec64

2017-03-26 Thread Deepa Dinamani
struct timespec is not y2038 safe on 32 bit machines. Replace uses of struct timespec with struct timespec64 in the kernel. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- drivers/char/mmtimer.c

[Y2038] [RESEND PATCH 6/7] Change k_clock timer_set() and timer_get() to use timespec64

2017-03-18 Thread Deepa Dinamani
struct timespec is not y2038 safe. The plan is to get rid of all uses of timespec internally in the kernel. Replace uses of timespec with timespec64. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- driver

[Y2038] [RESEND PATCH 7/7] Change k_clock nsleep() to use timespec64

2017-03-18 Thread Deepa Dinamani
struct timespec is not y2038 safe. The plan is to get rid of all uses of timespec internally in the kernel. Replace uses of timespec with timespec64. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include

[Y2038] [PATCH 4/7] Change k_clock clock_getres() to use timespec64

2017-03-18 Thread Deepa Dinamani
struct timespec is not y2038 safe. The plan is to get rid of all uses of timespec internally in the kernel. Replace uses of timespec with timespec64. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- driver

[Y2038] [PATCH 6/7] Change k_clock timer_set() and timer_get() to use timespec64

2017-03-18 Thread Deepa Dinamani
struct timespec is not y2038 safe. The plan is to get rid of all uses of timespec internally in the kernel. Replace uses of timespec with timespec64. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- driver

[Y2038] [PATCH 5/7] Change k_clock clock_set() to use timespec64

2017-03-18 Thread Deepa Dinamani
struct timespec is not y2038 safe. The plan is to get rid of all uses of timespec internally in the kernel. Replace uses of timespec with timespec64. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- driver

[Y2038] [PATCH 3/7] Change k_clock clock_get() to use timespec64

2017-03-18 Thread Deepa Dinamani
struct timespec is not y2038 safe. The plan is to get rid of all uses of timespec internally in the kernel. Replace uses of timespec with timespec64. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- driver

[Y2038] [PATCH 1/7] time: Delete do_sys_setimeofday()

2017-03-18 Thread Deepa Dinamani
are done by the underlying function do_sys_setimeofday64(). Replace do_sys_setimeofday64() directly instead of do_sys_settimeofday(). The do_sys_setimeofday64() calls timespec64_valid() internally, which is the same as timespec_valid(). Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.

[Y2038] [PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64

2017-03-18 Thread Deepa Dinamani
-by: Deepa Dinamani <deepa.ker...@gmail.com> --- drivers/ptp/ptp_clock.c | 18 +++--- include/linux/posix-clock.h | 10 +- kernel/time/posix-clock.c | 34 -- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/drivers/ptp/ptp_clo

[Y2038] [PATCH 0/7] Change k_clock interfaces to use timespec64

2017-03-18 Thread Deepa Dinamani
character limit, have been left as-is to facilitate easier review. Deepa Dinamani (7): time: Delete do_sys_setimeofday() time: Change posix clocks ops interfaces to use timespec64 Change k_clock clock_get() to use timespec64 Change k_clock clock_getres() to use timespec64 Change k_clock clock_set

[Y2038] [RESEND PATCH 0/7] Change k_clock interfaces to use timespec64

2017-03-18 Thread Deepa Dinamani
-noted style issues, such as the 80 line character limit, have been left as-is to facilitate easier review. Deepa Dinamani (7): time: Delete do_sys_setimeofday() time: Change posix clocks ops interfaces to use timespec64 Change k_clock clock_get() to use timespec64 Change k_clock clock_getres

[Y2038] [RESEND PATCH 4/7] Change k_clock clock_getres() to use timespec64

2017-03-18 Thread Deepa Dinamani
struct timespec is not y2038 safe. The plan is to get rid of all uses of timespec internally in the kernel. Replace uses of timespec with timespec64. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- driver

[Y2038] [RESEND PATCH 1/7] time: Delete do_sys_setimeofday()

2017-03-18 Thread Deepa Dinamani
are done by the underlying function do_sys_setimeofday64(). Replace do_sys_setimeofday64() directly instead of do_sys_settimeofday(). The do_sys_setimeofday64() calls timespec64_valid() internally, which is the same as timespec_valid(). Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.

[Y2038] [RESEND PATCH 5/7] Change k_clock clock_set() to use timespec64

2017-03-18 Thread Deepa Dinamani
struct timespec is not y2038 safe. The plan is to get rid of all uses of timespec internally in the kernel. Replace uses of timespec with timespec64. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- driver

Re: [Y2038] [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64

2017-03-20 Thread Deepa Dinamani
> When changing the PTP code, please put the PTP maintainer onto CC. Will do. Thanks for pointing out the omission. -Deepa ___ Y2038 mailing list Y2038@lists.linaro.org https://lists.linaro.org/mailman/listinfo/y2038

Re: [Y2038] [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64

2017-03-20 Thread Deepa Dinamani
> Please do not explain WHAT the patch is doing. We can see that from the > diff itself. What's important is the WHY. A good changelog is structured in > paragraphs, which explain the context, the problem and the solution. Please > read Documentation/process/submitting-patches.rst. Let me give you

[Y2038] [PATCH v5 4/5] vfs: Add timestamp_truncate() api

2017-04-08 Thread Deepa Dinamani
for compilation purposes. Also note that clamp won't do the right thing for timestamps beyond 2038 on 32-bit machines until the vfs uses timespec64. After the vfs is transitioned to use timespec64 for timestamps, clamp_t() can be replaced by clamp(). Signed-off-by: Deepa Dinamani <deepa.

[Y2038] [PATCH v5 3/5] ext4: Initialize timestamps limits

2017-04-08 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 v5 2/5] vfs: Add checks for filesystem timestamp limits

2017-04-08 Thread Deepa Dinamani
recompilation. Suggested-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- Documentation/admin-guide/kernel-parameters.txt | 8 fs/inode.c | 15 +++ fs/internal.h

[Y2038] [PATCH v5 1/5] vfs: Add file timestamp range support

2017-04-08 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 b8b6a08..f9c2241 100644 --- a/fs/super.c +++ b/fs/super.c @@ -247,6

[Y2038] [PATCH v5 0/5] vfs: Add timestamp range check support

2017-04-08 Thread Deepa Dinamani
documentation warning Changes since v2: * Introduce early boot param override for checks. * Drop afs patch for timestamp limits. Changes since v1: * return EROFS on mount errors * fix mtime copy/paste error in utimes Deepa Dinamani (5): vfs: Add file timestamp range support vfs: Add checks

Re: [Y2038] [PATCH v5 2/5] vfs: Add checks for filesystem timestamp limits

2017-04-08 Thread Deepa Dinamani
>> Allow read only mounts for filesystems that do not >> have maximum timestamps beyond the y2038 expiry >> timestamp. > > This option seems arbitrary and pointless. > > Nobody sane should ever enable it except for testing, but for testing > it would be much better to simply specify what the limit

[Y2038] [PATCH 10/12] apparmorfs: Replace CURRENT_TIME with current_time()

2017-04-07 Thread Deepa Dinamani
to be transitioned to y2038 safe behavior along with this change. CURRENT_TIME macro will be deleted before merging the aforementioned change. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- security/apparmor/apparmorfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/se

[Y2038] [PATCH 12/12] time: Delete current_fs_time() function

2017-04-07 Thread Deepa Dinamani
All uses of the current_fs_time() function have been replaced by other time interfaces. And, its use cases can be fulfilled by current_time() or ktime_get_* variants. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: Arnd Bergmann <a...@arndb.de> --- include/lin

Re: [Y2038] [PATCH 02/12] trace: Make trace_hwlat timestamp y2038 safe

2017-04-07 Thread Deepa Dinamani
>> - trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu ts:%ld.%09ld", >> + trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu >> ts:%lld.%09ld", >>field->seqnum, >>field->duration, >>

[Y2038] [PATCH 02/12] trace: Make trace_hwlat timestamp y2038 safe

2017-04-07 Thread Deepa Dinamani
struct timespec is not y2038 safe on 32 bit machines and needs to be replaced by struct timespec64 in order to represent times beyond year 2038 on such machines. Fix all the timestamp representation in struct trace_hwlat and all the corresponding implementations. Signed-off-by: Deepa Dinamani

[Y2038] [PATCH 03/12] fs: cifs: Replace CURRENT_TIME by other appropriate apis

2017-04-07 Thread Deepa Dinamani
timestamps can also be transitioned into using timespec64 when all other timestamps for cifs is transitioned to use timespec64. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: Arnd Bergmann <a...@arndb.de> --- fs/cifs/cifsencrypt.c | 4 +++- fs/cifs/cifssm

[Y2038] [PATCH 08/12] fs: ubifs: Replace CURRENT_TIME_SEC with current_time

2017-04-07 Thread Deepa Dinamani
super_block. The granularity check to call current_fs_time() or CURRENT_TIME_SEC is not required. Use current_time() directly to update inode timestamp. Use timespec_trunc during file system creation, before the first inode is created. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Re

[Y2038] [PATCH 09/12] lustre: Replace CURRENT_TIME macro

2017-04-07 Thread Deepa Dinamani
with this change. CURRENT_TIME macro will be deleted before merging the aforementioned change. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- drivers/staging/lustre/lustre/llite/llite_lib.c | 6 +++--- drivers/staging/lustre/lustre/osc/osc_io.c | 4 ++-- 2 files chan

[Y2038] [PATCH 05/12] fs: ufs: Use ktime_get_real_ts64() for birthtime

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME is not y2038 safe. Replace it with ktime_get_real_ts64(). Inode time formats are already 64 bit long and accommodates time64_t. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- fs/ufs/ialloc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/

[Y2038] [PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-04-07 Thread Deepa Dinamani
on the server, use timespec_trunc() to truncate the timestamp, using the right granularity from the superblock. This api will be transitioned to be y2038 safe along with vfs. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: Arnd Bergmann <a...@arndb.de> --- drivers

[Y2038] [PATCH 07/12] fs: btrfs: Use ktime_get_real_ts for root ctime

2017-04-07 Thread Deepa Dinamani
timespec64 as well. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Acked-by: David Sterba <dste...@suse.com> Reviewed-by: Arnd Bergmann <a...@arndb.de> --- fs/btrfs/root-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/root-tree.c b/fs

[Y2038] [PATCH 06/12] audit: Use timespec64 to represent audit timestamps

2017-04-07 Thread Deepa Dinamani
1024 characters. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: Arnd Bergmann <a...@arndb.de> Acked-by: Paul Moore <p...@paul-moore.com> Acked-by: Richard Guy Briggs <r...@redhat.com> --- include/linux/audit.h | 4 ++-- kernel/audit.c| 10 ++

[Y2038] [PATCH 11/12] time: Delete CURRENT_TIME_SEC and CURRENT_TIME

2017-04-07 Thread Deepa Dinamani
All uses of CURRENT_TIME_SEC and CURRENT_TIME macros have been replaced by other time functions. These macros are also not y2038 safe. And, all their use cases can be fulfilled by y2038 safe ktime_get_* variants. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Acked-by: John

[Y2038] [PATCH 01/12] fs: f2fs: Use ktime_get_real_seconds for sit_info times

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME_SEC is not y2038 safe. Replace use of CURRENT_TIME_SEC with ktime_get_real_seconds in segment timestamps used by GC algorithm including the segment mtime timestamps. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: Arnd Bergmann <a...@arndb.de>

[Y2038] [PATCH 00/12] Delete CURRENT_TIME, CURRENT_TIME_SEC and current_fs_time

2017-04-07 Thread Deepa Dinamani
will be picking up the patch in your trees. Let me know if anybody has other preferences for merging. Deepa Dinamani (12): fs: f2fs: Use ktime_get_real_seconds for sit_info times trace: Make trace_hwlat timestamp y2038 safe fs: cifs: Replace CURRENT_TIME by other appropriate apis fs: ceph

Re: [Y2038] [PATCH 06/12] audit: Use timespec64 to represent audit timestamps

2017-04-08 Thread Deepa Dinamani
> I have no problem merging this patch into audit/next for v4.12, would > you prefer me to do that so at least this patch is merged? This would be fine. But, I think whoever takes the last 2 deletion patches should also take them. I'm not sure how that part works out. > It would probably make

[Y2038] [PATCH v3 4/6] ipc: sem: Make sem_array timestamps y2038 safe

2017-08-02 Thread Deepa Dinamani
are not changed as part of the patch. They will be part of a different series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Reviewed-by: Arnd Bergmann <a...@arndb.de> --- include/linux/sem.h | 3 ++- ipc/sem.c | 18 +- 2 files changed, 11 inser

[Y2038] [PATCH v3 2/6] ipc: mqueue: Replace timespec with timespec64

2017-08-02 Thread Deepa Dinamani
. The syscall interfaces themselves are not changed as part of the patch. They will be part of a different series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Paul Moore <p...@paul-moore.com> Cc: Richard Guy Briggs <r...@redhat.com> Reviewed-by: Richard Guy Briggs <r...

[Y2038] [PATCH v3 0/6] Make ipc y2038 safe

2017-08-02 Thread Deepa Dinamani
The series aims to transition internal workings of ipc subsystem to use y2038-safe types and apis. The series is based on Al Viro's #work.ipc branch. Changes since v2: * Removed extra typecasts Changes since v1: * Addressed audit review comments Deepa Dinamani (6): ipc: Make sys_semtimedop

Re: [Y2038] [PATCH v2 4/6] ipc: sem: Make sem_array timestamps y2038 safe

2017-08-01 Thread Deepa Dinamani
> Unless I'm missing something here, you can drop the cast to > unsigned long long: time64_t is always 'long long' and won't > cause a warning here. > > We only need a cast like this when printing the members of 'struct > timespec64', since that can be either 'long long' or 'long', when > it is

[Y2038] [PATCH 2/2] io_getevents: Use timespec64 to represent timeouts

2017-08-04 Thread Deepa Dinamani
by getting rid of timespec internally. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: linux-...@kvack.org --- fs/aio.c | 55 ++- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 8f0127

[Y2038] [PATCH v2 0/6] Make ipc y2038 safe

2017-07-30 Thread Deepa Dinamani
The series aims to transition internal workings of ipc subsystem to use y2038-safe types and apis. The series is based on Al Viro's #work.ipc branch. Changes since v1: * Addressed audit review comments Deepa Dinamani (6): ipc: Make sys_semtimedop() y2038 safe ipc: mqueue: Replace timespec

[Y2038] [PATCH v2 1/6] ipc: Make sys_semtimedop() y2038 safe

2017-07-30 Thread Deepa Dinamani
struct timespec is not y2038 safe on 32 bit machines. Replace timespec with y2038 safe struct timespec64. Note that the patch only changes the internals without modifying the syscall interface. This will be part of a separate series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.

[Y2038] [PATCH v2 3/6] ipc: msg: Make msg_queue timestamps y2038 safe

2017-07-30 Thread Deepa Dinamani
themselves are not changed as part of the patch. They will be part of a different series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> --- include/linux/msg.h | 7 --- ipc/msg.c | 12 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/linux/m

[Y2038] [PATCH v2 2/6] ipc: mqueue: Replace timespec with timespec64

2017-07-30 Thread Deepa Dinamani
. The syscall interfaces themselves are not changed as part of the patch. They will be part of a different series. Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com> Cc: Paul Moore <p...@paul-moore.com> Cc: Richard Guy Briggs <r...@redhat.com> Reviewed-by: Richard Guy Briggs <r...@red

<    1   2   3   4   5   6   7   >