From: Willem de Bruijn <willemdebruijn.kernel@gmail•com>
To: Kuniyuki Iwashima <kuniyu@google•com>,
Eric Dumazet <edumazet@google•com>
Cc: "David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>,
Paolo Abeni <pabeni@redhat•com>,
Willem de Bruijn <willemdebruijn.kernel@gmail•com>,
Jason Wang <jasowang@redhat•com>,
Andrew Lunn <andrew+netdev@lunn•ch>,
Simon Horman <horms@kernel•org>,
Kuniyuki Iwashima <kuni1840@gmail•com>,
netdev@vger•kernel.org
Subject: Re: [PATCH v1 net-next] tun: Ignore tun in netdev_lock_pos().
Date: Fri, 27 Mar 2026 19:16:19 -0400 [thread overview]
Message-ID: <willemdebruijn.kernel.64bceda776b2@gmail.com> (raw)
In-Reply-To: <CAAVpQUB=LtWXq_bzET2DOkyw_y5qRsuUf_fNCRE+TtiVHFktZw@mail.gmail.com>
Kuniyuki Iwashima wrote:
> On Fri, Mar 27, 2026 at 2:48 PM Eric Dumazet <edumazet@google•com> wrote:
> >
> > On Fri, Mar 27, 2026 at 2:34 PM Kuniyuki Iwashima <kuniyu@google•com> wrote:
> > >
> > > dev->type could be any value on tun due to TUNSETLINK.
> > >
> > > Let's not warn about it in netdev_lock_pos().
> > >
> > > Signed-off-by: Kuniyuki Iwashima <kuniyu@google•com>
> >
> > Hmmm... should we instead have a list of supported types ?
> >
> > And reject user space requests for unsupported ones ?
>
> I chose a safer way but maybe we could reuse tun_get_addr_len()
> and define the default case there as unsupported ?
>
> I guess it's okay even if it breaks userspace because we can
> just add a single line to restore the support.
We shouldn't risk breaking userspace, over such a sanity check.
Presumably any truly newly added type will have a non-zero addr_len.
While tun sets this to zero for weird inputs. Maybe just filter on
that in the WARN_ONCE?
next prev parent reply other threads:[~2026-03-27 23:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 21:34 [PATCH v1 net-next] tun: Ignore tun in netdev_lock_pos() Kuniyuki Iwashima
2026-03-27 21:48 ` Eric Dumazet
2026-03-27 22:22 ` Kuniyuki Iwashima
2026-03-27 23:16 ` Willem de Bruijn [this message]
2026-03-28 0:19 ` Eric Dumazet
2026-03-30 2:29 ` Willem de Bruijn
2026-03-29 3:36 ` kernel test robot
2026-03-29 4:06 ` kernel test robot
2026-03-29 11:10 ` kernel test robot
2026-03-29 13:36 ` kernel test robot
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=willemdebruijn.kernel.64bceda776b2@gmail.com \
--to=willemdebruijn.kernel@gmail$(echo .)com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=jasowang@redhat$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=kuni1840@gmail$(echo .)com \
--cc=kuniyu@google$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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