[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180427.194707.1957018124499215257.davem@davemloft.net>
Date: Fri, 27 Apr 2018 19:47:07 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: lance.richardson.net@...il.com
Cc: netdev@...r.kernel.org, gopalsr83@...il.com, vapier@...omium.org,
hjl.tools@...il.com
Subject: Re: [PATCH] net: support compat 64-bit time in {s,g}etsockopt
From: Lance Richardson <lance.richardson.net@...il.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@...il.com>
> Signed-off-by: Lance Richardson <lance.richardson.net@...il.com>
Really nice commit message and test case.
Applied and queued up for -stable, thank you.
Powered by blists - more mailing lists