From: "Laszlo Ersek" <lersek@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
Pedro Falcato <pedro.falcato@gmail.com>,
edk2-devel-groups-io <devel@edk2.groups.io>
Subject: Re: [edk2-devel] efi and ext4 and case sensitive file names
Date: Thu, 28 Sep 2023 10:01:49 +0200 [thread overview]
Message-ID: <f75be06c-9b60-9e21-5876-76f57ca6e56c@redhat.com> (raw)
In-Reply-To: <6odzwzflo4id7ra3cphgk3rhfpr7iqojsfqkbu4tutapcyhk2v@njifptgxmw5n>
On 9/27/23 14:09, kraxel at redhat.com (Gerd Hoffmann) wrote:
> Hi,
>
> I've noticed that the edk2 ext4 driver does case-insensitive filename
> matching. I know the fat filesystem is case-insensitive, and the uefi
> spec describing the fat filesystem also explicitly says it is
> case-insensitive. On a quick scan I can't find anything in the uefi
> spec requiring *all* filesystem drivers being case-insensitive though.
>
> So I'm wondering whenever the ext4 driver behavior is correct. It
> certainly is different than the linux kernel's behavior which is (by
> default) case-sensitive.
>
> Also note that the linux kernel ext4 driver recently got support for
> case-insensitive file names, which must be explicitly enabled for both
> filesystems (EXT4_FEATURE_INCOMPAT_CASEFOLD) and directories
> (EXT4_CASEFOLD_FL).
>
> On practical terms I've ran into actual problems due to Fedora mounting
> the ESP at /boot/efi[1] and UKIs (unified kernel images) should be
> placed in EFI/Linux on either ESP or XBOOTLDR partition, which on fedora
> translates to /boot/efi/EFI/Linux (ESP) or /boot/EFI/Linux (XBOOTLDR).
> So I have both /boot/efi and /boot/EFI ...
>
> take care,
> Gerd
>
> [1] Yes, a bad choice for a number of reasons, but changing that isn't
> easy as this is hard-coded in a unknown number of places :(
I don't think this is fixable until / unless the underlying filesystem
is genuinely case-insensitive -- which is just a way to say that *all*
consumers of the filesystem must agree on case-insensitive
interpretation of pathnames.
I've encountered this issue from the opposite direction: with virtiofs.
VirtioFsDxe is case-sensitive. If you share a case-sensitive host-side
filesystem through VirtioFsDxe with guest UEFI, then in some cases that
produces unexpected results in UEFI. UEFI apps expect case-insensitive
handling, while Linux apps expect case-sensitive handling. At best this
conflict can be resolved at the deepest level, in the underlying
filesystem's specification.
So my point is, even if you flipped Ext4Pkg to case-sensitive behavior,
you'd still see issues, namely between UEFI apps and Linux apps. Those
would only go away if the underlying ext4 filesystem used both of those
new flags that you mention (at which point Ext4Pkg could be
case-sensitive or -insensitive, it wouldn't matter).
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109142): https://edk2.groups.io/g/devel/message/109142
Mute This Topic: https://groups.io/mt/101615699/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-09-28 8:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 12:09 [edk2-devel] efi and ext4 and case sensitive file names Gerd Hoffmann
2023-09-28 8:01 ` Laszlo Ersek [this message]
2023-09-28 17:57 ` Pedro Falcato
2023-09-29 9:47 ` Marvin Häuser
2023-09-29 10:55 ` Pedro Falcato
2023-09-29 10:58 ` Michael Brown
2023-09-29 11:01 ` Marvin Häuser
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-list 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=f75be06c-9b60-9e21-5876-76f57ca6e56c@redhat.com \
--to=devel@edk2.groups.io \
/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