summaryrefslogtreecommitdiffstats
path: root/lib/random32.c
diff options
context:
space:
mode:
authorArnd Bergmann2018-07-11 12:19:13 +0200
committerSteffen Klassert2018-07-11 15:25:30 +0200
commit386c5680e2e80b012de557cf8326962070e0897b (patch)
tree3daeb6c7a2943f19b531a89e23ae917990d6f4ac /lib/random32.c
parentxfrm: Allow Set Mark to be Updated Using UPDSA (diff)
downloadkernel-qcow2-linux-386c5680e2e80b012de557cf8326962070e0897b.tar.gz
kernel-qcow2-linux-386c5680e2e80b012de557cf8326962070e0897b.tar.xz
kernel-qcow2-linux-386c5680e2e80b012de557cf8326962070e0897b.zip
xfrm: use time64_t for in-kernel timestamps
The lifetime managment uses '__u64' timestamps on the user space interface, but 'unsigned long' for reading the current time in the kernel with get_seconds(). While this is probably safe beyond y2038, it will still overflow in 2106, and the get_seconds() call is deprecated because fo that. This changes the xfrm time handling to use time64_t consistently, along with reading the time using the safer ktime_get_real_seconds(). It still suffers from problems that can happen from a concurrent settimeofday() call or (to a lesser degree) a leap second update, but since the time stamps are part of the user API, there is nothing we can do to prevent that. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'lib/random32.c')
0 files changed, 0 insertions, 0 deletions