linux/arch/riscv
Jason Wang 803930ee35
riscv: use strscpy to replace strlcpy
The strlcpy should not be used because it doesn't limit the source
length. As linus says, it's a completely useless function if you
can't implicitly trust the source string - but that is almost always
why people think they should use it! All in all the BSD function
will lead some potential bugs.

But the strscpy doesn't require reading memory from the src string
beyond the specified "count" bytes, and since the return value is
easier to error-check than strlcpy()'s. In addition, the implementation
is robust to the string changing out from underneath it, unlike the
current strlcpy() implementation.

Thus, We prefer using strscpy instead of strlcpy.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2021-08-25 21:52:47 -07:00
..
boot riscv: dts: fu740: fix cache-controller interrupts 2021-06-19 00:11:53 -07:00
configs RISC-V: Enable Microchip PolarFire ICICLE SoC 2021-04-26 08:31:32 -07:00
errata riscv: skip errata_cip_453.o if CONFIG_ERRATA_SIFIVE_CIP_453 is disabled 2021-06-01 21:16:41 -07:00
include riscv: explicitly use symbol offsets for VDSO 2021-08-24 21:45:47 -07:00
kernel riscv: use strscpy to replace strlcpy 2021-08-25 21:52:47 -07:00
lib riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall 2021-07-06 15:09:48 -07:00
mm riscv: Support allocating gigantic hugepages using CMA 2021-08-13 21:33:54 -07:00
net riscv: bpf: Avoid breaking W^X 2021-04-26 08:25:14 -07:00
Kbuild riscv: Allow device trees to be built into the kernel 2020-05-18 11:38:05 -07:00
Kconfig riscv: Enable Undefined Behavior Sanitizer UBSAN 2021-08-24 20:59:10 -07:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.erratas riscv: enable SiFive errata CIP-453 and CIP-1200 Kconfig only if CONFIG_64BIT=y 2021-05-06 09:40:13 -07:00
Kconfig.socs riscv: sifive: fix Kconfig errata warning 2021-06-12 17:20:50 -07:00
Makefile riscv: explicitly use symbol offsets for VDSO 2021-08-24 21:45:47 -07:00