From: "Gary Guo" <gary@garyguo.net>
To: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
"Thiébaud Weksteen" <tweek@google.com>,
"Luis Chamberlain" <mcgrof@kernel.org>,
"Petr Pavlu" <petr.pavlu@suse.com>,
"Daniel Gomez" <da.gomez@kernel.org>,
"Sami Tolvanen" <samitolvanen@google.com>,
"Aaron Tomlin" <atomlin@atomlin.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
<rust-for-linux@vger.kernel.org>, <linux-modules@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rust: macros: allow non-ASCII characters in `authors`
Date: Wed, 30 Sep 2026 14:16:37 +0100 [thread overview]
Message-ID: <DLSOH1EVCWKD.XEIME3CYEYYJ@garyguo.net> (raw)
In-Reply-To: <CANiq72nRLF7PmqqVUrAiw_M3dYZCr9ifoo+Q4SuXfBQsAFH-pQ@mail.gmail.com>
On Wed Sep 30, 2026 at 1:13 PM BST, Miguel Ojeda wrote:
> On Thu, Sep 17, 2026 at 7:11 AM Thiébaud Weksteen <tweek@google.com> wrote:
>>
>> Module authors may have non-ASCII characters in their names. In C,
>> `MODULE_AUTHOR` allows arbitrary string literals which are emitted as
>> raw UTF-8 bytes into the `.modinfo` section, and multiple in-tree
>> modules use non-ASCII author names.
>>
>> Originally, the single `author` field permitted arbitrary string literals
>> including non-ASCII characters. When support for multiple authors was
>> introduced in commit 38559da6afb2 ("rust: module: introduce `authors`
>> key"), it reused the `expect_string_array` helper that had originally been
>> added for module aliases. Because that helper enforced an ASCII check,
>> `authors` inadvertently became restricted to ASCII-only string literals.
>> Later, when the macro parsing was rewritten to use `syn` in commit
>> c578ad703ae9 ("rust: macros: use `syn` to parse `module!` macro"), this
>> restriction was carried over by using AsciiLitStr in `authors` type.
>>
>> Change the element type of `authors` in `ModuleInfo` from `AsciiLitStr`
>> to `LitStr` so that UTF-8 author names are permitted.
>>
>> Fixes: 38559da6afb2 ("rust: module: introduce `authors` key")
>> Signed-off-by: Thiébaud Weksteen <tweek@google.com>
>
> This looks good, thanks! We did discuss allowing non-ASCII long ago,
> so this wasn't intentional.
>
> Petr & modules: I can pick this on up (an Acked-by would be nice!),
> unless you want to pick it.
>
> By the way:
>
> Cc: stable@vger.kernel.org
I'm not sure that this should be considered a fix. More like a feature.
Best,
Gary
next prev parent reply other threads:[~2026-09-30 13:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 5:11 [PATCH] rust: macros: allow non-ASCII characters in `authors` Thiébaud Weksteen
2026-09-17 7:20 ` Gary Guo
2026-09-25 12:36 ` Petr Pavlu
2026-09-25 12:49 ` Gary Guo
2026-10-01 13:37 ` Petr Pavlu
2026-09-30 12:13 ` Miguel Ojeda
2026-09-30 13:16 ` Gary Guo [this message]
2026-09-30 14:54 ` Miguel Ojeda
2026-09-30 15:37 ` Gary Guo
2026-09-30 15:45 ` Miguel Ojeda
2026-10-01 13:40 ` Petr Pavlu
2026-10-02 7:06 ` Miguel Ojeda
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=DLSOH1EVCWKD.XEIME3CYEYYJ@garyguo.net \
--to=gary@garyguo.net \
--cc=aliceryhl@google.com \
--cc=atomlin@atomlin.com \
--cc=da.gomez@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=tweek@google.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.