]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8989d4d946b25d48e48a50d1509eb11036bb2f37
treeb0197551de3751c819ab54940fea0c6dd818bf76
parent88fc0238efad020584108cd6170116c45f890c6a
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: c02e8c82b0e0 ("drop_monitor: Add packet alert mode")
Fixes: 5bcca770f478 ("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