| 2be6ce9d | 02-Dec-2024 |
Gabriela Bittencourt <gbittencourt@lkcamp.dev> |
unicode: kunit: change tests filename and path
Change utf8 kunit test filename and path to follow the style convention on Documentation/dev-tools/kunit/style.rst
Co-developed-by: Pedro Orlando <por
unicode: kunit: change tests filename and path
Change utf8 kunit test filename and path to follow the style convention on Documentation/dev-tools/kunit/style.rst
Co-developed-by: Pedro Orlando <porlando@lkcamp.dev> Signed-off-by: Pedro Orlando <porlando@lkcamp.dev> Co-developed-by: Danilo Pereira <dpereira@lkcamp.dev> Signed-off-by: Danilo Pereira <dpereira@lkcamp.dev> Signed-off-by: Gabriela Bittencourt <gbittencourt@lkcamp.dev> Reviewed-by: David Gow <davidgow@google.com> Acked-by: Gabriel Krisman Bertazi <krisman@suse.de> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Reviewed-by: Rae Moar <rmoar@google.com> Link: https://lore.kernel.org/r/20241202075545.3648096-7-davidgow@google.com Signed-off-by: Kees Cook <kees@kernel.org>
show more ...
|
| 142fa60f | 21-Oct-2024 |
André Almeida <andrealmeid@igalia.com> |
unicode: Recreate utf8_parse_version()
All filesystems that currently support UTF-8 casefold can fetch the UTF-8 version from the filesystem metadata stored on disk. They can get the data stored and
unicode: Recreate utf8_parse_version()
All filesystems that currently support UTF-8 casefold can fetch the UTF-8 version from the filesystem metadata stored on disk. They can get the data stored and directly match it to a integer, so they can skip the string parsing step, which motivated the removal of this function in the first place.
However, for tmpfs, the only way to tell the kernel which UTF-8 version we are about to use is via mount options, using a string. Re-introduce utf8_parse_version() to be used by tmpfs.
This version differs from the original by skipping the intermediate step of copying the version string to an auxiliary string before calling match_token(). This versions calls match_token() in the argument string. The paramenters are simpler now as well.
utf8_parse_version() was created by 9d53690f0d4 ("unicode: implement higher level API for string handling") and later removed by 49bd03cc7e9 ("unicode: pass a UNICODE_AGE() tripple to utf8_load").
Signed-off-by: André Almeida <andrealmeid@igalia.com> Link: https://lore.kernel.org/r/20241021-tonyk-tmpfs-v8-4-f443d5814194@igalia.com Reviewed-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
show more ...
|
| 66715f00 | 12-Sep-2024 |
Gan Jie <ganjie182@gmail.com> |
unicode: change the reference of database file
Commit 2b3d04787012 ("unicode: Add utf8-data module") changed the database file from 'utf8data.h' to 'utf8data.c' to build separate module, but it seem
unicode: change the reference of database file
Commit 2b3d04787012 ("unicode: Add utf8-data module") changed the database file from 'utf8data.h' to 'utf8data.c' to build separate module, but it seems forgot to update README.utf8data , which may causes confusion. Update the README.utf8data and the default 'UTF8_NAME' in 'mkutf8data.c'.
Signed-off-by: Gan Jie <ganjie182@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20240912031932.1161-1-ganjie182@gmail.com Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
show more ...
|
| 156bb2c5 | 03-Sep-2024 |
André Almeida <andrealmeid@igalia.com> |
unicode: Fix utf8_load() error path
utf8_load() requests the symbol "utf8_data_table" and then checks if the requested UTF-8 version is supported. If it's unsupported, it tries to put the data table
unicode: Fix utf8_load() error path
utf8_load() requests the symbol "utf8_data_table" and then checks if the requested UTF-8 version is supported. If it's unsupported, it tries to put the data table using symbol_put(). If an unsupported version is requested, symbol_put() fails like this:
kernel BUG at kernel/module/main.c:786! RIP: 0010:__symbol_put+0x93/0xb0 Call Trace: <TASK> ? __die_body.cold+0x19/0x27 ? die+0x2e/0x50 ? do_trap+0xca/0x110 ? do_error_trap+0x65/0x80 ? __symbol_put+0x93/0xb0 ? exc_invalid_op+0x51/0x70 ? __symbol_put+0x93/0xb0 ? asm_exc_invalid_op+0x1a/0x20 ? __pfx_cmp_name+0x10/0x10 ? __symbol_put+0x93/0xb0 ? __symbol_put+0x62/0xb0 utf8_load+0xf8/0x150
That happens because symbol_put() expects the unique string that identify the symbol, instead of a pointer to the loaded symbol. Fix that by using such string.
Fixes: 2b3d04787012 ("unicode: Add utf8-data module") Signed-off-by: André Almeida <andrealmeid@igalia.com> Reviewed-by: Theodore Ts'o <tytso@mit.edu> Link: https://lore.kernel.org/r/20240902225511.757831-2-andrealmeid@igalia.com Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
show more ...
|
| 68318904 | 24-May-2024 |
Jeff Johnson <quic_jjohnson@quicinc.com> |
unicode: add MODULE_DESCRIPTION() macros
Currently 'make W=1' reports: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8data.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/un
unicode: add MODULE_DESCRIPTION() macros
Currently 'make W=1' reports: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8data.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8-selftest.o
Add a MODULE_DESCRIPTION() to utf8-selftest.c and utf8data.c_shipped, and update mkutf8data.c to add a MODULE_DESCRIPTION() to any future generated utf8data file.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240524-md-unicode-v1-1-e2727ce8574d@quicinc.com Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
show more ...
|
| e2a58d2d | 15-Sep-2021 |
Christoph Hellwig <hch@lst.de> |
unicode: only export internal symbols for the selftests
The exported symbols in utf8-norm.c are not needed for normal file system consumers, so move them to conditional _GPL exports just for the sel
unicode: only export internal symbols for the selftests
The exported symbols in utf8-norm.c are not needed for normal file system consumers, so move them to conditional _GPL exports just for the selftest.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
show more ...
|
| 6ca99ce7 | 15-Sep-2021 |
Christoph Hellwig <hch@lst.de> |
unicode: cache the normalization tables in struct unicode_map
Instead of repeatedly looking up the version add pointers to the NFD and NFD+CF tables to struct unicode_map, and pass a unicode_map plu
unicode: cache the normalization tables in struct unicode_map
Instead of repeatedly looking up the version add pointers to the NFD and NFD+CF tables to struct unicode_map, and pass a unicode_map plus index to the functions using the normalization tables.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
show more ...
|
| fbc59d65 | 15-Sep-2021 |
Christoph Hellwig <hch@lst.de> |
unicode: move utf8cursor to utf8-selftest.c
Only used by the tests, so no need to keep it in the core.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Gabriel Krisman Bertazi <krisman@
unicode: move utf8cursor to utf8-selftest.c
Only used by the tests, so no need to keep it in the core.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
show more ...
|
| 9012d79c | 15-Sep-2021 |
Christoph Hellwig <hch@lst.de> |
unicode: simplify utf8len
Just use the utf8nlen implementation with a (size_t)-1 len argument, similar to utf8_lookup. Also move the function to utf8-selftest.c, as it isn't used anywhere else.
Si
unicode: simplify utf8len
Just use the utf8nlen implementation with a (size_t)-1 len argument, similar to utf8_lookup. Also move the function to utf8-selftest.c, as it isn't used anywhere else.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
show more ...
|
| 379210db | 15-Sep-2021 |
Christoph Hellwig <hch@lst.de> |
unicode: remove the unused utf8{,n}age{min,max} functions
No actually used anywhere.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> |