From: Christoph Hellwig <hch@lst.de>
To: William McVicker <willmcvicker@google.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
hch@lst.de, linux-ext4@vger.kernel.org,
"Stephen E. Baker" <baker.stephen.e@gmail.com>,
adilger.kernel@dilger.ca
Subject: Re: simplify ext4_sb_read_encoding regression
Date: Sun, 16 Apr 2023 07:47:42 +0200 [thread overview]
Message-ID: <20230416054742.GA5427@lst.de> (raw)
In-Reply-To: <ZDnbW1qYmBLycefL@google.com>
On Fri, Apr 14, 2023 at 04:01:47PM -0700, William McVicker wrote:
> I believe I figured out what is going on here since I am hitting a similar
> issue with CONFIG_UNICODE. If you take a look at the .config from Stephen's
> message, you'll see that he sets:
>
> CONFIG_TRIM_UNUSED_KSYMS=y
> CONFIG_UNUSED_KSYMS_WHITELIST=""
>
> When trimming is enabled, kbuild will strip all exported symbols that are not
> listed in the whitelist. As a result, when utf8-core.c calls:
>
> um->tables = symbol_request(utf8_data_table);
>
> it will fail since `utf8_data_table` doesn't exist in the exported section of
> the kernel symbol table. For me on Android, this leads to the userdata
> partition failing to mount. To be clear, this happens when CONFIG_UNICODE=y.
>
> One question I have is -- Why are we using symbol_request()/symbol_put() when
> `utf8_data_table` is exported? Why can't we directly reference the
> `utf8_data_table` symbol?
We could, but that would require to always include the huge utf8
case folding tables into the kernel.
The idea here is that there is no sane way to move the utf8 handling code
into a module that only gets used some times, because common file systems
like ext4 call into it. But they only actually use the case folding for
the very rare case of someone actually using the case insensitive file
system feature, so we only load the module containing the table for that
case.
> If we need to use symbol_request() when CONFIG_UNICODE=m, then can we apply the
> below patch to fix this when CONFIG_UNICODE=y? I have verified this works for
> me with CONFIG_UNICODE=y and CONFIG_TRIM_UNUSED_KSYMS=y.
We could do that, but it seems a bit ugly. What prevents symbol_request
from working properly for this case in your setup?
next prev parent reply other threads:[~2023-04-16 5:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAFDdnB1Rq3vNe_qt_0u+inzOuL4vrGhgbOoQZKBwfBktni=Npw@mail.gmail.com>
2022-05-29 1:24 ` simplify ext4_sb_read_encoding regression Theodore Ts'o
2022-05-29 12:19 ` Theodore Ts'o
2022-05-29 22:49 ` Stephen E. Baker
2022-05-30 1:49 ` Theodore Ts'o
2022-05-30 22:20 ` Stephen E. Baker
2022-05-31 0:16 ` Theodore Ts'o
2022-05-31 1:37 ` Theodore Ts'o
2022-06-02 2:06 ` Stephen E. Baker
2022-06-02 14:47 ` Theodore Ts'o
2023-04-14 23:01 ` William McVicker
2023-04-16 5:47 ` Christoph Hellwig [this message]
2023-04-16 5:56 ` Christoph Hellwig
2023-04-17 3:26 ` Theodore Ts'o
2023-04-17 16:16 ` Will McVicker
2022-05-28 22:55 Stephen E. Baker
2022-05-30 14:21 ` Gabriel Krisman Bertazi
2022-05-30 22:27 ` Stephen E. Baker
2022-05-31 0:56 ` Dave Chinner
2022-05-31 2:39 ` Stephen E. Baker
2022-06-02 17:47 ` Gabriel Krisman Bertazi
2022-06-05 0:11 ` Stephen E. Baker
2022-06-05 3:21 ` Stephen E. Baker
2022-06-05 6:23 ` Gabriel Krisman Bertazi
2022-06-05 13:56 ` Stephen E. Baker
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=20230416054742.GA5427@lst.de \
--to=hch@lst.de \
--cc=adilger.kernel@dilger.ca \
--cc=baker.stephen.e@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=willmcvicker@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).