netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Deepa Dinamani <deepa.kernel@gmail.com>
To: davem@davemloft.net, linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, arnd@arndb.de, y2038@lists.linaro.org
Subject: [PATCH net-next v5 07/12] socket: Add struct __kernel_sock_timeval
Date: Sat,  2 Feb 2019 07:34:49 -0800	[thread overview]
Message-ID: <20190202153454.7121-8-deepa.kernel@gmail.com> (raw)
In-Reply-To: <20190202153454.7121-1-deepa.kernel@gmail.com>

The new type is meant to be used as a y2038 safe structure
to be used as part of cmsg data.
Presently the SO_TIMESTAMP socket option uses struct timeval
for timestamps. This is not y2038 safe.
Subsequent patches in the series add new y2038 safe socket
option to be used in the place of SO_TIMESTAMP_OLD.
struct __kernel_sock_timeval will be used as the timestamp
format at that time.

struct __kernel_sock_timeval also maintains the same layout
across 32 bit and 64 bit ABIs.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
---
 include/uapi/linux/time.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/linux/time.h b/include/uapi/linux/time.h
index 04d5587f30d3..b8ad1b86b942 100644
--- a/include/uapi/linux/time.h
+++ b/include/uapi/linux/time.h
@@ -70,6 +70,11 @@ struct __kernel_old_timeval {
 };
 #endif
 
+struct __kernel_sock_timeval {
+	__s64 tv_sec;
+	__s64 tv_usec;
+};
+
 /*
  * The IDs of the various system clocks (for POSIX.1b interval timers):
  */
-- 
2.17.1


  parent reply	other threads:[~2019-02-02 15:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-02 15:34 [PATCH net-next v5 00/12] net: y2038-safe socket timestamps Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 01/12] selftests: add missing include unistd Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 02/12] socket: move compat timeout handling into sock.c Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 03/12] arch: Use asm-generic/socket.h when possible Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 04/12] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 05/12] arch: sparc: Override struct __kernel_old_timeval Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 06/12] socket: Use old_timeval types for socket timestamps Deepa Dinamani
2019-02-02 15:34 ` Deepa Dinamani [this message]
2019-02-02 15:34 ` [PATCH net-next v5 08/12] socket: Add SO_TIMESTAMP[NS]_NEW Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 09/12] socket: Add SO_TIMESTAMPING_NEW Deepa Dinamani
2019-02-10 15:43   ` Ran Rozenstein
2019-02-11  3:21     ` Deepa Dinamani
2019-02-12 19:08       ` Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 10/12] socket: Update timestamping Documentation Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 11/12] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes Deepa Dinamani
2019-02-06 11:58   ` Michael Ellerman
2019-02-02 15:34 ` [PATCH net-next v5 12/12] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW Deepa Dinamani
2019-02-02 17:15   ` Oliver Hartkopp
2019-02-03  2:47     ` Deepa Dinamani
2019-02-06 11:56   ` Michael Ellerman
2019-02-09  1:44     ` Deepa Dinamani
2019-02-10 22:12       ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190202153454.7121-8-deepa.kernel@gmail.com \
    --to=deepa.kernel@gmail.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).