linux/drivers/s390
Justin Stitt e37988bcd1 s390/sclp: replace deprecated strncpy with strtomem
Let's move away from using strncpy() as it is deprecated [1].

Instead use strtomem() as `e.id` is already marked as nonstring:
|       char id[4] __nonstring;

We don't need strtomem_pad() because `e` is already memset to 0 --
rendering any additional NUL-padding useless.

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
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20231023-strncpy-drivers-s390-char-sclp-c-v1-1-eaeef80522bb@google.com
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-10-25 15:08:30 +02:00
..
block block-6.6-2023-09-08 2023-09-08 21:39:54 -07:00
char s390/sclp: replace deprecated strncpy with strtomem 2023-10-25 15:08:30 +02:00
cio s390/cio: fix virtual vs physical address confusion 2023-10-25 15:08:29 +02:00
crypto s390/ap: show APFS value on error reply 0x8B 2023-10-16 13:04:09 +02:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-03 14:34:37 -07:00
scsi scsi: zfcp: Defer fc_rport blocking until after ADISC response 2023-07-25 21:54:05 -04:00
virtio s390/airq: remove lsi_mask from airq_struct 2023-08-30 11:03:28 +02:00
Makefile