From: Breno Leitao <leitao@debian.org>
To: Stanislav Fomichev <sdf.kernel@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH net-next 2/2] udp: convert udp_lib_getsockopt to sockopt_t
Date: Tue, 16 Jun 2026 09:22:52 -0700 [thread overview]
Message-ID: <ajF4Odi_L28LdIXC@gmail.com> (raw)
In-Reply-To: <aiy7ZR7Yz2Z4Ioyd@devvm7509.cco0.facebook.com>
On Fri, Jun 12, 2026 at 07:10:15PM -0700, Stanislav Fomichev wrote:
> On 06/12, Breno Leitao wrote:
> > int udp_lib_getsockopt(struct sock *sk, int level, int optname,
> > - char __user *optval, int __user *optlen)
> > + sockopt_t *opt)
> > {
> > struct udp_sock *up = udp_sk(sk);
> > int val, len;
> >
> > - if (get_user(len, optlen))
> > - return -EFAULT;
>
> [..]
>
> > - if (len < 0)
> > - return -EINVAL;
>
> I see this part now in sockopt_init_user, but you mention that it's a
> transitional helper. When we drop it, will we loose this <0 check?
> Maybe keep `if ((int)opt->optlen < 0))` here for backwards
> compatibility?
Good idea. I will do it and respin (once net-next reopens).
Thanks for the review,
--breno
next prev parent reply other threads:[~2026-06-16 16:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 11:45 [PATCH net-next 0/2] net: convert UDP getsockopt to sockopt_t Breno Leitao
2026-06-12 11:45 ` [PATCH net-next 1/2] net: add sockopt_init_user() for getsockopt conversion Breno Leitao
2026-06-12 11:45 ` [PATCH net-next 2/2] udp: convert udp_lib_getsockopt to sockopt_t Breno Leitao
2026-06-12 14:58 ` Willem de Bruijn
2026-06-12 16:28 ` Breno Leitao
2026-06-13 2:13 ` Willem de Bruijn
2026-06-13 2:10 ` Stanislav Fomichev
2026-06-16 16:22 ` Breno Leitao [this message]
2026-06-16 20:16 ` 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=ajF4Odi_L28LdIXC@gmail.com \
--to=leitao@debian.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf.kernel@gmail.com \
--cc=shuah@kernel.org \
--cc=willemdebruijn.kernel@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.