summaryrefslogtreecommitdiffstats
path: root/include/uapi/asm-generic/msgbuf.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-11-04 21:17:26 +0100
committerArnd Bergmann <arnd@arndb.de>2019-11-15 14:38:28 +0100
commitcaf5e32d4ea7253820f38dd7c429f8d4a8019c5f (patch)
tree1a428ad98618a0a9e5585feddf8d628887cc9522 /include/uapi/asm-generic/msgbuf.h
parent176ed98c8a76ee08babf99b25b00992c2a5e7bbc (diff)
downloadlinux-stable-caf5e32d4ea7253820f38dd7c429f8d4a8019c5f.tar.gz
linux-stable-caf5e32d4ea7253820f38dd7c429f8d4a8019c5f.tar.bz2
linux-stable-caf5e32d4ea7253820f38dd7c429f8d4a8019c5f.zip
y2038: ipc: remove __kernel_time_t reference from headers
There are two structures based on time_t that conflict between libc and kernel: timeval and timespec. Both are now renamed to __kernel_old_timeval and __kernel_old_timespec. For time_t, the old typedef is still __kernel_time_t. There is nothing wrong with that name, but it would be nice to not use that going forward as this type is used almost only in deprecated interfaces because of the y2038 overflow. In the IPC headers (msgbuf.h, sembuf.h, shmbuf.h), __kernel_time_t is only used for the 64-bit variants, which are not deprecated. Change these to a plain 'long', which is the same type as __kernel_time_t on all 64-bit architectures anyway, to reduce the number of users of the old type. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/uapi/asm-generic/msgbuf.h')
-rw-r--r--include/uapi/asm-generic/msgbuf.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
index 9fe4881557cb..af95aa89012e 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -13,9 +13,9 @@
* everyone just ended up making identical copies without specific
* optimizations, so we may just as well all use the same one.
*
- * 64 bit architectures typically define a 64 bit __kernel_time_t,
- * so they do not need the first three padding words.
- * On big-endian systems, the padding is in the wrong place.
+ * 64 bit architectures use a 64-bit long time field here, while
+ * 32 bit architectures have a pair of unsigned long values.
+ * On big-endian systems, the lower half is in the wrong place.
*
* Pad space is left for:
* - 2 miscellaneous 32-bit values
@@ -24,9 +24,9 @@
struct msqid64_ds {
struct ipc64_perm msg_perm;
#if __BITS_PER_LONG == 64
- __kernel_time_t msg_stime; /* last msgsnd time */
- __kernel_time_t msg_rtime; /* last msgrcv time */
- __kernel_time_t msg_ctime; /* last change time */
+ long msg_stime; /* last msgsnd time */
+ long msg_rtime; /* last msgrcv time */
+ long msg_ctime; /* last change time */
#else
unsigned long msg_stime; /* last msgsnd time */
unsigned long msg_stime_high;