[PATCH v10 0/8] lib and lib/cmdline enhancements
Dmitry Antipov
dmantipov at yandex.ru
Wed May 13 06:43:59 PDT 2026
This series is a merge of the recently posted [1] and [2]. The first
one is intended to adjust '_parse_integer_limit()' and 'memparse()' to
not ignore overflows, extend string to 64-bit integer conversion tests,
add KUnit-based test for 'memparse()' and fix kernel-doc glitches found
in lib/cmdline.c. The second one was originated from RISCV-specific
build fixes needed to integrate the former and now aims to provide
platform-specific double-word shifts and corresponding KUnit test.
This series was briefly tested on X86, RISCV32, ARM, and MIPS using QEMU.
Getting feedback from RISC-V core maintainers would be very helpful.
Special thanks to Andy Shevchenko, Charlie Jenkins, and Andrew Morton.
[1] https://lore.kernel.org/linux-riscv/20260403103338.1122415-1-dmantipov@yandex.ru
[2] https://lore.kernel.org/linux-riscv/20260427090105.705529-1-dmantipov@yandex.ru
Dmitry Antipov (8):
lib: fix _parse_integer_limit() to handle overflow
lib: fix memparse() to handle overflow
lib: add more string to 64-bit integer conversion overflow tests
lib/cmdline_kunit: add test case for memparse()
lib/cmdline: adjust a few comments to fix kernel-doc -Wreturn warnings
riscv: add platform-specific double word shifts for riscv32
lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()
riscv: fix building compressed EFI image
arch/riscv/Kconfig | 3 -
arch/riscv/kernel/image-vars.h | 9 ++
arch/riscv/lib/Makefile | 1 +
arch/riscv/lib/ashldi3.S | 36 ++++++
arch/riscv/lib/ashrdi3.S | 36 ++++++
arch/riscv/lib/lshrdi3.S | 36 ++++++
drivers/firmware/efi/libstub/Makefile | 3 +-
lib/Kconfig.debug | 10 ++
lib/cmdline.c | 30 +++--
lib/kstrtox.c | 37 +++---
lib/test-kstrtox.c | 6 +
lib/tests/Makefile | 1 +
lib/tests/cmdline_kunit.c | 56 +++++++++
lib/tests/shdi3_kunit.c | 175 ++++++++++++++++++++++++++
14 files changed, 410 insertions(+), 29 deletions(-)
create mode 100644 arch/riscv/lib/ashldi3.S
create mode 100644 arch/riscv/lib/ashrdi3.S
create mode 100644 arch/riscv/lib/lshrdi3.S
create mode 100644 lib/tests/shdi3_kunit.c
--
2.54.0
More information about the linux-riscv
mailing list