summaryrefslogtreecommitdiff
path: root/rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2026-05-19 20:22:52 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-05-28 21:24:49 -0700
commit6e30111dbb4075e3c26c230417b32bc4a1c66831 (patch)
tree730841bb975e71505a3b89e17b3fa2ced60edd1b /rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
parentdcc8a57815534e3844f342b28ecfb6e626a816a0 (diff)
lib: fix _parse_integer_limit() to handle overflow
Patch series "lib and lib/cmdline enhancements", v11. 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. Getting feedback from RISCV core maintainers would be very helpful. Special thanks to Andy Shevchenko, Charlie Jenkins, and Andrew Morton. This patch (of 8): In '_parse_integer_limit()', adjust native integer arithmetic with near-to-overflow branch where 'check_mul_overflow()' and 'check_add_overflow()' are used to check whether an intermediate result goes out of range, and denote such a case with ULLONG_MAX, thus making the function more similar to standard C library's 'strtoull()'. Adjust comment to kernel-doc style as well. Link: https://lore.kernel.org/20260519172259.908980-1-dmantipov@yandex.ru Link: https://lore.kernel.org/20260519172259.908980-2-dmantipov@yandex.ru Link: https://lore.kernel.org/linux-riscv/20260403103338.1122415-1-dmantipov@yandex.ru [1] Link: https://lore.kernel.org/linux-riscv/20260427090105.705529-1-dmantipov@yandex.ru [2] Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexandre Ghiti <alex@ghiti.fr> Cc: Andriy Shevchenko <andriy.shevchenko@intel.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions