From: Olivier Gayot <olivier.gayot@canonical.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-efi@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org,
Daniel Bungert <daniel.bungert@canonical.com>,
Olivier Gayot <olivier.gayot@canonical.com>
Subject: [PATCH v2 0/1] block: fix conversion of GPT partition name to 7-bit
Date: Tue, 23 May 2023 09:54:06 +0200 [thread overview]
Message-ID: <f19a6d8a-c85a-963e-412e-efaa7f520453@canonical.com> (raw)
Hi Davidlohr,
This is a no-change resubmission of a patch that I originally sent to
LKML without CC-ing the relevant subsystem maintainers:
https://lore.kernel.org/all/4ae6d363-2f9b-5028-db1a-061b6f1e8fbe@canonical.com/
I apologize for the oversight in my previous submission.
--
While investigating a userspace issue, we noticed that the PARTNAME udev
property for GPT partitions is not always valid ASCII / UTF-8.
The value of the PARTNAME property for GPT partitions is initially set
by the kernel using the utf16_le_to_7bit function.
This function does a very basic conversion from UTF-16 to 7-bit ASCII by
dropping the first byte of each UTF-16 character and replacing the
remaining byte by "!" if it is not printable.
Essentially, it means that characters outside the ASCII range get
"converted" to other characters which are unrelated. Using this function
for data that is presented in userspace feels questionable and using a
proper conversion to UTF-8 would probably be preferable. However, the
patch attached does not attempt to change this design.
The patch attached actually addresses an implementation issue in the
utf16_le_to_7bit function, which causes the output of the function to
not always be valid 7-bit ASCII.
Olivier Gayot (1):
block: fix conversion of GPT partition name to 7-bit ASCII
block/partitions/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
Olivier
next reply other threads:[~2023-05-23 7:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 7:54 Olivier Gayot [this message]
2023-05-23 7:54 ` [PATCH v2 1/1] " Olivier Gayot
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=f19a6d8a-c85a-963e-412e-efaa7f520453@canonical.com \
--to=olivier.gayot@canonical.com \
--cc=axboe@kernel.dk \
--cc=daniel.bungert@canonical.com \
--cc=dave@stgolabs.net \
--cc=linux-block@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®