From: Xin Long <lucien.xin@gmail.com>
To: David Ahern <dsahern@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
network dev <netdev@vger.kernel.org>, davem <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net] udp: fix the len check in udp_lib_getsockopt
Date: Sat, 29 May 2021 12:47:52 -0400 [thread overview]
Message-ID: <CADvbK_endt5VLzyDMumn6ks8oF5WkQ0hbx6XguyRbJZzOf4K5A@mail.gmail.com> (raw)
In-Reply-To: <54cb4e46-28f9-b6db-85ec-f67df1e6bacf@gmail.com>
On Fri, May 28, 2021 at 9:57 PM David Ahern <dsahern@gmail.com> wrote:
>
> On 5/28/21 7:47 PM, Xin Long wrote:
> > The partial byte(or even 0) of the value returned due to passing a wrong
> > optlen should be considered as an error. "On error, -1 is returned, and
> > errno is set appropriately.". Success returned in that case only confuses
> > the user.
>
> It is feasible that some app could use bool or u8 for options that have
> 0 or 1 values and that code has so far worked. This change would break that.
Got it.
Not sure if it's possible or necessary to also return -EINVAL if optlen == 0
next prev parent reply other threads:[~2021-05-29 16:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 19:12 [PATCH net] udp: fix the len check in udp_lib_getsockopt Xin Long
2021-05-27 19:13 ` Xin Long
2021-05-28 22:39 ` Jakub Kicinski
2021-05-29 1:47 ` Xin Long
2021-05-29 1:57 ` David Ahern
2021-05-29 16:47 ` Xin Long [this message]
2021-05-31 1:31 ` David Ahern
2021-05-31 2:02 ` Xin Long
2021-05-31 10:13 ` David Laight
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=CADvbK_endt5VLzyDMumn6ks8oF5WkQ0hbx6XguyRbJZzOf4K5A@mail.gmail.com \
--to=lucien.xin@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).