Re: [Y2038] [PATCH v2 2/2] scsi: bfa: Remove use of time_t

2015-11-18 Thread Arnd Bergmann
On Wednesday 18 November 2015 21:10:26 Amitoj Kaur Chawla wrote: > 32 bit systems using 'time_t' will break in the year 2038, so > we modify the code appropriately. > > This patch removes the cast to 'time_t' in the assignment statement > since we are eventually removing the time_t definition from

[Y2038] [PATCH v2 2/2] scsi: bfa: Remove use of time_t

2015-11-18 Thread Amitoj Kaur Chawla
32 bit systems using 'time_t' will break in the year 2038, so we modify the code appropriately. This patch removes the cast to 'time_t' in the assignment statement since we are eventually removing the time_t definition from the kernel as an effort to solve the y2038 problem. This change will avoid

Re: [Y2038] [PATCH] security: keys: convert uses of time_t to time64_t

2015-11-18 Thread Arnd Bergmann
On Wednesday 18 November 2015 17:33:38 Aya Mahfouz wrote: > > > --- > > > Changelog: > > > v1: The changes were originally made by Arnd Bergmann in > > > relation to time_t. I've broken down a patch sent to me > > > into two independent patches. > > > > I suppose you have tried and failed to spli

[Y2038] [PATCH v2 1/2] scsi: bfa: Use 'ktime_get_real_seconds()'

2015-11-18 Thread Amitoj Kaur Chawla
This patch replaces u32 time storing variable with u64 variable to store the 64 bit seconds value returned by ktime_get_real_seconds(). A cast to time_t has also been added to the assignment statement which will cause a build error when we eventually remove the time_t definition from the kernel.

Re: [Y2038] [PATCH] security: keys: convert uses of time_t to time64_t

2015-11-18 Thread Aya Mahfouz
On Wed, Nov 18, 2015 at 03:10:30PM +0100, Arnd Bergmann wrote: > On Tuesday 17 November 2015 23:20:28 Aya Mahfouz wrote: > > Changes all the uses of time_t for the structs key > > and key_preparsed_payload to time64_t. This also > > involves the functions that use them in security/keys. > > This is

Re: [Y2038] [PATCH 2/2] scsi: bfa: Remove use of 'time_t'

2015-11-18 Thread Arnd Bergmann
On Wednesday 18 November 2015 19:57:12 Amitoj Kaur Chawla wrote: > > > >> diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c > >> index 6730340..e5c211f 100644 > >> --- a/drivers/scsi/bfa/bfa_fcpim.c > >> +++ b/drivers/scsi/bfa/bfa_fcpim.c > >> @@ -1478,7 +1478,7 @@ bfa_itnim_

Re: [Y2038] [PATCH 2/2] scsi: bfa: Remove use of 'time_t'

2015-11-18 Thread Amitoj Kaur Chawla
On Tue, Nov 17, 2015 at 2:28 AM, Arnd Bergmann wrote: > I think in this case, while the change is not necessarily wrong > (it has no effect on the generated binary), we really want a code > comment at the point where the overflow happens. > > Aside from that, the description seems misleading: the

Re: [Y2038] [PATCH] security: keys: convert uses of time_t to time64_t

2015-11-18 Thread Arnd Bergmann
On Tuesday 17 November 2015 23:20:28 Aya Mahfouz wrote: > Changes all the uses of time_t for the structs key > and key_preparsed_payload to time64_t. This also > involves the functions that use them in security/keys. > This is to handle the y2038 problem where time_t will > overflow in 2038. > > A

Re: [Y2038] [PATCH 1/2] scsi: bfa: Use ktime_get_real_seconds()

2015-11-18 Thread Arnd Bergmann
On Wednesday 18 November 2015 19:25:48 Amitoj Kaur Chawla wrote: > On Tue, Nov 17, 2015 at 2:20 AM, Arnd Bergmann wrote: > > > > On Thursday 12 November 2015 18:54:51 Amitoj Kaur Chawla wrote: > > > 32 bit systems using 'struct timeval' will break in the year 2038, so > > > we modify the code appr

Re: [Y2038] [PATCH 1/2] scsi: bfa: Use ktime_get_real_seconds()

2015-11-18 Thread Amitoj Kaur Chawla
On Tue, Nov 17, 2015 at 2:20 AM, Arnd Bergmann wrote: > > On Thursday 12 November 2015 18:54:51 Amitoj Kaur Chawla wrote: > > 32 bit systems using 'struct timeval' will break in the year 2038, so > > we modify the code appropriately. > > > > This patch replaces the use of struct timeval and do_get