drop_monitor: Make timestamps y2038 safe
authorIdo Schimmel <idosch@mellanox.com>
Fri, 23 Aug 2019 15:47:21 +0000 (18:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Aug 2019 21:58:07 +0000 (14:58 -0700)
commitbd1200b79510a68554890af2f48d92be6eb1daf8
treeb0197551de3751c819ab54940fea0c6dd818bf76
parentbf1867db9b850fff2dd54a1a117a684a10b8cd90
drop_monitor: Make timestamps y2038 safe

Timestamps are currently communicated to user space as 'struct
timespec', which is not considered y2038 safe since it uses a 32-bit
signed value for seconds.

Fix this while the API is still not part of any official kernel release
by using 64-bit nanoseconds timestamps instead.

Fixes: ca30707dee2b ("drop_monitor: Add packet alert mode")
Fixes: 5e58109b1ea4 ("drop_monitor: Add support for packet alert mode for hardware drops")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/net_dropmon.h
net/core/drop_monitor.c