aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/linux/taskstats.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-10-24 16:34:25 +0200
committerArnd Bergmann <arnd@arndb.de>2019-12-18 18:07:31 +0100
commit2d602bf28316e2f61a553f13d279f3d74c2e5189 (patch)
tree26caf2d720c009f5f68b7f4db5e0079602b9e65c /include/uapi/linux/taskstats.h
parentum: ubd: use 64-bit time_t where possible (diff)
downloadwireguard-linux-2d602bf28316e2f61a553f13d279f3d74c2e5189.tar.xz
wireguard-linux-2d602bf28316e2f61a553f13d279f3d74c2e5189.zip
acct: stop using get_seconds()
In 'struct acct', 'struct acct_v3', and 'struct taskstats' we have a 32-bit 'ac_btime' field containing an absolute time value, which will overflow in year 2106. There are two possible ways to deal with it: a) let it overflow and have user space code deal with reconstructing the data based on the current time, or b) truncate the times based on the range of the u32 type. Neither of them solves the actual problem. Pick the second one to best document what the issue is, and have someone fix it in a future version. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/uapi/linux/taskstats.h')
-rw-r--r--include/uapi/linux/taskstats.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/taskstats.h b/include/uapi/linux/taskstats.h
index 5e8ca16a9079..7d3ea366e93b 100644
--- a/include/uapi/linux/taskstats.h
+++ b/include/uapi/linux/taskstats.h
@@ -112,6 +112,7 @@ struct taskstats {
__u32 ac_gid; /* Group ID */
__u32 ac_pid; /* Process ID */
__u32 ac_ppid; /* Parent process ID */
+ /* __u32 range means times from 1970 to 2106 */
__u32 ac_btime; /* Begin time [sec since 1970] */
__u64 ac_etime __attribute__((aligned(8)));
/* Elapsed time [usec] */