Searched hist:"2 dc20f45" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/arch/powerpc/kernel/ |
H A D | rtas-proc.c | 2dc20f45 Mon Apr 23 03:36:39 CDT 2018 Arnd Bergmann <arnd@arndb.de> powerpc: rtas: clean up time handling
The to_tm() helper function operates on a signed integer for the time, so it will suffer from overflow in 2038, even on 64-bit kernels.
Rather than fix that function, this replaces its use in the rtas procfs implementation with the standard rtc_time64_to_tm() helper that is very similar but is not affected by the overflow.
In order to actually support long times, the parser function gets changed to 64-bit user input and output as well. Note that the tm_mon and tm_year representation is slightly different, so we have to manually add an offset here.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> 2dc20f45 Mon Apr 23 03:36:39 CDT 2018 Arnd Bergmann <arnd@arndb.de> powerpc: rtas: clean up time handling The to_tm() helper function operates on a signed integer for the time, so it will suffer from overflow in 2038, even on 64-bit kernels. Rather than fix that function, this replaces its use in the rtas procfs implementation with the standard rtc_time64_to_tm() helper that is very similar but is not affected by the overflow. In order to actually support long times, the parser function gets changed to 64-bit user input and output as well. Note that the tm_mon and tm_year representation is slightly different, so we have to manually add an offset here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
|