Add SO_TIMESTAMPING_NEW variant of socket timestamp options.
This is the y2038 safe versions of the SO_TIMESTAMPING_OLD
for all architectures.
Signed-off-by: Deepa Dinamani
Cc: ch...@zankel.net
Cc: fenghua...@intel.com
Cc: r...@twiddle.net
Cc: t...@linutronix.de
Cc: ubr...@linux.ibm.com
Cc: linux-al...@vger.kernel.org
Cc: linux-a...@vger.kernel.org
Cc: linux-i...@vger.kernel.org
Cc: linux-m...@linux-mips.org
Cc: linux-s...@vger.kernel.org
Cc: linux-xte...@linux-xtensa.org
Cc: sparcli...@vger.kernel.org
---
arch/alpha/include/uapi/asm/socket.h | 5 +++--
arch/mips/include/uapi/asm/socket.h | 5 +++--
arch/parisc/include/uapi/asm/socket.h | 5 +++--
arch/sparc/include/uapi/asm/socket.h | 8 +---
include/linux/socket.h| 8
include/uapi/asm-generic/socket.h | 5 +++--
include/uapi/linux/errqueue.h | 4
net/core/scm.c| 27 ++
net/core/sock.c | 8 +++-
net/ipv4/tcp.c| 28 ++-
net/smc/af_smc.c | 3 ++-
net/socket.c | 13 -
12 files changed, 88 insertions(+), 31 deletions(-)
diff --git a/arch/alpha/include/uapi/asm/socket.h
b/arch/alpha/include/uapi/asm/socket.h
index 352e3dc0b3d9..da08412bd49f 100644
--- a/arch/alpha/include/uapi/asm/socket.h
+++ b/arch/alpha/include/uapi/asm/socket.h
@@ -116,19 +116,20 @@
#define SO_TIMESTAMP_NEW 62
#define SO_TIMESTAMPNS_NEW 63
+#define SO_TIMESTAMPING_NEW 64
#if !defined(__KERNEL__)
#if __BITS_PER_LONG == 64
#define SO_TIMESTAMP SO_TIMESTAMP_OLD
#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+#define SO_TIMESTAMPINGSO_TIMESTAMPING_OLD
#else
#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ?
SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW)
#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ?
SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW)
+#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ?
SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW)
#endif
-#define SO_TIMESTAMPINGSO_TIMESTAMPING_OLD
-
#define SCM_TIMESTAMP SO_TIMESTAMP
#define SCM_TIMESTAMPNSSO_TIMESTAMPNS
#define SCM_TIMESTAMPING SO_TIMESTAMPING
diff --git a/arch/mips/include/uapi/asm/socket.h
b/arch/mips/include/uapi/asm/socket.h
index d1752e3f1248..1e48f67f1052 100644
--- a/arch/mips/include/uapi/asm/socket.h
+++ b/arch/mips/include/uapi/asm/socket.h
@@ -126,19 +126,20 @@
#define SO_TIMESTAMP_NEW 62
#define SO_TIMESTAMPNS_NEW 63
+#define SO_TIMESTAMPING_NEW 64
#if !defined(__KERNEL__)
#if __BITS_PER_LONG == 64
#define SO_TIMESTAMP SO_TIMESTAMP_OLD
#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+#define SO_TIMESTAMPINGSO_TIMESTAMPING_OLD
#else
#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ?
SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW)
#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ?
SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW)
+#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ?
SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW)
#endif
-#define SO_TIMESTAMPINGSO_TIMESTAMPING_OLD
-
#define SCM_TIMESTAMP SO_TIMESTAMP
#define SCM_TIMESTAMPNSSO_TIMESTAMPNS
#define SCM_TIMESTAMPING SO_TIMESTAMPING
diff --git a/arch/parisc/include/uapi/asm/socket.h
b/arch/parisc/include/uapi/asm/socket.h
index 0a45b668abd1..e8d6cf20f9a4 100644
--- a/arch/parisc/include/uapi/asm/socket.h
+++ b/arch/parisc/include/uapi/asm/socket.h
@@ -107,19 +107,20 @@
#define SO_TIMESTAMP_NEW 0x4037
#define SO_TIMESTAMPNS_NEW 0x4038
+#define SO_TIMESTAMPING_NEW 0x4039
#if !defined(__KERNEL__)
#if __BITS_PER_LONG == 64
#define SO_TIMESTAMP SO_TIMESTAMP_OLD
#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+#define SO_TIMESTAMPINGSO_TIMESTAMPING_OLD
#else
#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ?
SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW)
#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ?
SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW)
+#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ?
SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW)
#endif
-#define SO_TIMESTAMPINGSO_TIMESTAMPING_OLD
-
#define SCM_TIMESTAMP SO_TIMESTAMP
#define SCM_TIMESTAMPNSSO_TIMESTAMPNS
#define SCM_TIMESTAMPING SO_TIMESTAMPING
diff --git a/arch/sparc/include/uapi/asm/socket.h
b/arch/sparc/include/uapi/asm/socket.h
index dc8527cae5a7..fc65bf6b6440 100644
--- a/arch/sparc/include/uapi/asm/socket.h
+++ b/arch/sparc/include/uapi/asm/socket.h
@@ -106,20 +106,22 @@
#define SO_TIMESTAMPNS_OLD 0x0021
#define SO_TIMESTAMPING_OLD 0x0023
-#define SO_TIMESTAMP_NEW 0x0040
-#define SO_TIMESTAMPNS_NEW 0x0041
+#define SO_TIMESTAMP_NEW 0x0041
+#define