mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
303678350a
These `sprintf()` calls are used repeatedly to write to a buffer. There is no protection against overflow other than reviewers explicitly checking to see if the buffers are big enough. However, such issues are easily missed during review and when they are missed, we would rather stop printing rather than have a buffer overflow, so we convert these functions to use `kmem_scnprintf()`. The Linux kernel provides an entire page for module parameters, so we are safe to write up to PAGE_SIZE. Removing `sprintf()` from these functions removes the last instances of `sprintf()` usage in our platform-independent kernel code. This improves XNU kernel compatibility because the XNU kernel does not support (removed support for?) `sprintf()`. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14209 |
||
---|---|---|
.. | ||
cityhash.c | ||
zfeature_common.c | ||
zfs_comutil.c | ||
zfs_deleg.c | ||
zfs_fletcher_aarch64_neon.c | ||
zfs_fletcher_avx512.c | ||
zfs_fletcher_intel.c | ||
zfs_fletcher_sse.c | ||
zfs_fletcher_superscalar4.c | ||
zfs_fletcher_superscalar.c | ||
zfs_fletcher.c | ||
zfs_namecheck.c | ||
zfs_prop.c | ||
zpool_prop.c | ||
zprop_common.c |