[PATCH v4 2/2] ubifs: use strscpy() and kmemdup_nul() where appropriate

Dmitry Antipov dmantipov at yandex.ru
Mon Apr 13 06:24:42 PDT 2026


On Fri, 2026-04-10 at 07:57 +0200, Richard Weinberger wrote:

> Dmitry, how are you testing these changes?

# modprobe nandsim second_id_byte=0xdc third_id_byte=0x80 fourth_id_byte=0x1d
# modprobe ubi mtd=0
# ubimkvol /dev/ubi0 -N test -m
Set volume size to 517644288
Volume ID 0, size 4012 LEBs (517644288 bytes, 493.6 MiB), LEB size 129024
bytes (126.0 KiB), dynamic, name "test", alignment 1
# mount -t ubifs ubi0:test /mnt/ubifs
# cp -a [~390M source tree] /mnt/ubifs
# diff -ur [tree] /mnt/ubifs/[tree]
# umount /mnt/ubifs
# sync
# mount /mnt/ubifs
# diff -ur [tree] /mnt/ubifs/[tree]

etc, etc. And yes, I'm aware of fsck.ubifs since 2.3.0 of mtd-utils.

Dmitry



More information about the linux-mtd mailing list