linux/arch/powerpc/platforms/ps3
Justin Stitt f94a84a091 powerpc/ps3: refactor strncpy usage
`strncpy` is deprecated for use on NUL-terminated destination strings [1].

`make_first_field()` should use similar implementation to `make_field()`
due to memcpy having more obvious behavior here. The end result yields
the same behavior as the previous `strncpy`-based implementation
including the NUL-padding.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://github.com/KSPP/linux/issues/90
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230816-strncpy-arch-powerpc-platforms-ps3-repository-v1-1-88283b02fb09@google.com
2023-08-18 11:48:42 +10:00
..
device-init.c powerpc/ps3: Convert half completion to rcuwait 2020-03-21 16:00:22 +01:00
exports.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
gelic_udbg.c powerpc/ps3: Add __init attribute to eligible functions 2021-12-23 22:33:16 +11:00
htab.c powerpc/ps3: Change updateboltedpp() panic to info 2023-02-12 22:11:35 +11:00
hvcall.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
interrupt.c powerpc: Convert irq_domain_add_legacy_isa use to irq_domain_add_legacy 2021-06-10 13:09:16 +01:00
Kconfig powerpc: Remove remaining parts of oprofile 2022-07-27 21:36:05 +10:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
os-area.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
platform.h powerpc/ps3: Add __init attribute to eligible functions 2021-12-23 22:33:16 +11:00
repository.c powerpc/ps3: refactor strncpy usage 2023-08-18 11:48:42 +10:00
setup.c powerpc/platforms: Use 'compatible' property for simple cases 2023-03-15 00:52:10 +11:00
smp.c powerpc/ps3: Add __init attribute to eligible functions 2021-12-23 22:33:16 +11:00
spu.c powerpc/ps3: Add __init attribute to eligible functions 2021-12-23 22:33:16 +11:00
system-bus.c driver core: fixup for "driver core: make struct bus_type.uevent() take a const *" 2023-01-30 17:02:03 +01:00
time.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00