linux/drivers/s390/char
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
..
con3215.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
con3270.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
ctrlchar.c s390/ctrlchar: fix kernel doc comment 2021-09-07 13:38:42 +02:00
ctrlchar.h
defkeymap.c
defkeymap.map
diag_ftp.c s390/ctlreg: rename ctl_reg.h to ctlreg.h 2023-09-19 13:26:56 +02:00
diag_ftp.h
fs3270.c s390/fs3270: split header files 2023-01-09 14:34:05 +01:00
hmcdrv_cache.c s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
hmcdrv_cache.h
hmcdrv_dev.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
hmcdrv_dev.h
hmcdrv_ftp.c s390/hmcdrv_ftp: fix kernel doc comment 2021-09-07 13:38:42 +02:00
hmcdrv_ftp.h
hmcdrv_mod.c
Kconfig s390/uvdevice: Add info IOCTL 2023-06-16 11:08:09 +02:00
keyboard.c
keyboard.h tty: the rest, stop using tty_schedule_flip() 2021-11-25 18:35:23 +01:00
Makefile s390/tty3270: rename to con3270 2023-01-09 14:33:56 +01:00
monreader.c s390/monreader: fix virtual vs physical address confusion 2023-08-30 11:03:26 +02:00
monwriter.c s390: include linux/io.h instead of asm/io.h 2023-07-03 11:19:40 +02:00
raw3270.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
raw3270.h s390/fs3270: split header files 2023-01-09 14:34:05 +01:00
sclp_ap.c
sclp_cmd.c s390/sclp: handle default case in sclp memory notifier 2023-10-25 15:08:29 +02:00
sclp_con.c s390/consoles: improve panic notifiers reliability 2022-05-06 20:45:13 +02:00
sclp_config.c s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
sclp_cpi_sys.c
sclp_cpi_sys.h
sclp_ctl.c
sclp_diag.h
sclp_early_core.c s390/ctlreg: add struct ctlreg 2023-09-19 13:26:56 +02:00
sclp_early.c s390/ctlreg: rename ctl_reg.h to ctlreg.h 2023-09-19 13:26:56 +02:00
sclp_ftp.c s390/hmcdrv: use strscpy() instead of strlcpy() 2023-02-06 11:13:53 +01:00
sclp_ftp.h
sclp_ocf.c
sclp_pci.c
sclp_quiesce.c s390/sclp: Remove quiesce power management support 2021-06-18 16:41:20 +02:00
sclp_rw.c TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
sclp_rw.h TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
sclp_sd.c s390/sclp_sd: use default_groups in kobj_type 2022-01-08 17:44:05 +01:00
sclp_sdias.c s390/sclp_sdias: fix sclp_sdias_copy() virtual vs physical address confusion 2022-02-06 23:31:29 +01:00
sclp_sdias.h
sclp_tty.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
sclp_tty.h
sclp_vt220.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
sclp.c s390/sclp: replace deprecated strncpy with strtomem 2023-10-25 15:08:30 +02:00
sclp.h s390/sclp: replace zero-length array with flexible-array member 2023-04-13 17:36:29 +02:00
tape_34xx.c s390/tape: fix comment typo 2022-07-28 18:05:23 +02:00
tape_3590.c
tape_3590.h
tape_char.c s390: Fix fall-through warnings for Clang 2021-07-13 14:43:09 -05:00
tape_class.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
tape_class.h
tape_core.c
tape_proc.c
tape_std.c s390/tape: fix timer initialization in tape_std_assign() 2021-11-08 14:17:49 +01:00
tape_std.h
tape.h
uvdevice.c s390/uvdevice: Add 'Lock Secret Store' UVC 2023-06-16 11:08:09 +02:00
vmcp.c s390/mm: make virt_to_pfn() a static inline 2023-08-16 15:13:03 +02:00
vmlogrdr.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
vmur.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
vmur.h s390/vmur: generate uevent on unsolicited device end 2022-10-10 10:15:10 +02:00
zcore.c docs: move s390 under arch 2023-07-24 12:12:24 +02:00