netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: lance.richardson.net@gmail.com
Cc: netdev@vger.kernel.org, gopalsr83@gmail.com, vapier@chromium.org,
	hjl.tools@gmail.com
Subject: Re: [PATCH] net: support compat 64-bit time in {s,g}etsockopt
Date: Fri, 27 Apr 2018 19:47:07 -0400 (EDT)	[thread overview]
Message-ID: <20180427.194707.1957018124499215257.davem@davemloft.net> (raw)
In-Reply-To: <20180425142154.28891-1-lance.richardson.net@gmail.com>

From: Lance Richardson <lance.richardson.net@gmail.com>
Date: Wed, 25 Apr 2018 10:21:54 -0400

> For the x32 ABI, struct timeval has two 64-bit fields. However
> the kernel currently interprets the user-space values used for
> the SO_RCVTIMEO and SO_SNDTIMEO socket options as having a pair
> of 32-bit fields.
> 
> When the seconds portion of the requested timeout is less than 2**32,
> the seconds portion of the effective timeout is correct but the
> microseconds portion is zero.  When the seconds portion of the
> requested timeout is zero and the microseconds portion is non-zero,
> the kernel interprets the timeout as zero (never timeout).
> 
> Fix by using 64-bit time for SO_RCVTIMEO/SO_SNDTIMEO as required
> for the ABI.
> 
> The code included below demonstrates the problem.
 ...
> Fixes: 515c7af85ed9 ("x32: Use compat shims for {g,s}etsockopt")
> Reported-by: Gopal RajagopalSai <gopalsr83@gmail.com>
> Signed-off-by: Lance Richardson <lance.richardson.net@gmail.com>

Really nice commit message and test case.

Applied and queued up for -stable, thank you.

      reply	other threads:[~2018-04-27 23:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25 14:21 [PATCH] net: support compat 64-bit time in {s,g}etsockopt Lance Richardson
2018-04-27 23:47 ` David Miller [this message]

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=20180427.194707.1957018124499215257.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gopalsr83@gmail.com \
    --cc=hjl.tools@gmail.com \
    --cc=lance.richardson.net@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vapier@chromium.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).