Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jingjing Xu <xujingjing@cmss.chinamobile.com>
Cc: donald.hunter@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] tools: ynl: preserve non-ASCII string attribute bytes
Date: Tue, 10 Nov 2026 10:58:45 -0800	[thread overview]
Message-ID: <20261110105845.0c9faffb@kernel.org> (raw)
In-Reply-To: <20261110033922.49297-1-xujingjing@cmss.chinamobile.com>

On Tue, 10 Nov 2026 03:39:22 +0000 Jingjing Xu wrote:
> Netlink strings are not restricted to ASCII. 

Not sure where you got that idea.

> A valid non-ASCII interface
> name makes a getlink dump fail with UnicodeDecodeError, and encoding
> such a name for a rename request raises UnicodeEncodeError.
> 
> Use UTF-8 with surrogateescape for both directions. This preserves ASCII
> behavior, handles UTF-8 names and round-trips raw non-UTF-8 bytes that
> Linux also permits in interface names. Do not replace invalid bytes and
> lose the original name.
> 
> Discovered by Codex-assisted code inspection

So you made up a problem and then decided to fix it?
Please don't waste our time :/

      parent reply	other threads:[~2026-11-10 18:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  3:39 [PATCH net] tools: ynl: preserve non-ASCII string attribute bytes Jingjing Xu
2026-11-10  6:37 ` Hangbin Liu
2026-11-10 11:50 ` Xia Yan
2026-11-10 18:58 ` Jakub Kicinski [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=20261110105845.0c9faffb@kernel.org \
    --to=kuba@kernel.org \
    --cc=donald.hunter@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=xujingjing@cmss.chinamobile.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