linux/arch/um
Justin Stitt 32280e83b5 um: Refactor deprecated strncpy to memcpy
Use `memcpy` since `console_buf` is not expected to be NUL-terminated
and it more accurately describes what is happening with the buffers
`console_buf` and `string` as per Kees' analysis [1].

Also mark char buffer as `__nonstring` as per Kees' suggestion [2].

This change now makes it more clear what this code does and that
`console_buf` is not expected to be NUL-terminated.

Link: https://lore.kernel.org/all/202308081708.D5ADC80F@keescook/ [1]
Link: https://github.com/KSPP/linux/issues/90 [2]
Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
Cc: linux-hardening@vger.kernel.org
Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2023-08-26 22:48:38 +02:00
..
configs um: Fix hostaudio build errors 2023-08-19 23:30:22 +02:00
drivers um: Refactor deprecated strncpy to memcpy 2023-08-26 22:48:38 +02:00
include um: fix 3 instances of -Wmissing-prototypes 2023-08-26 22:45:05 +02:00
kernel um: fix 3 instances of -Wmissing-prototypes 2023-08-26 22:45:05 +02:00
os-Linux um: Remove strlcpy usage 2023-08-19 22:24:39 +02:00
scripts um: prevent user code in modules 2023-04-20 23:06:38 +02:00
.gitignore um: gitignore: Add kernel/capflags.c 2021-12-21 21:22:43 +01:00
Kbuild um: use obj-y to descend into arch/um/*/ 2023-08-26 22:41:34 +02:00
Kconfig Landlock updates for v6.5-rc1 2023-06-27 17:10:27 -07:00
Kconfig.debug um: Disable CONFIG_GCOV with MODULES 2021-04-15 23:10:33 +02:00
Makefile um: use obj-y to descend into arch/um/*/ 2023-08-26 22:41:34 +02:00
Makefile-os-Linux
Makefile-skas