linux/drivers/soc
Justin Stitt 166db01007 soc: qcom: cmd-db: replace deprecated strncpy with strtomem
strncpy() is an ambiguous and potentially dangerous interface [1]. We
should prefer more robust and less ambiguous alternatives.

@query is marked as __nonstring and doesn't need to be NUL-terminated.

Since we are doing a string to memory copy, we can use the aptly named
"strtomem" -- specifically, the "pad" variant to also ensure NUL-padding
throughout the destination buffer.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240319-strncpy-drivers-soc-qcom-cmd-db-c-v3-1-aeb5c5180c32@google.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-04-21 12:26:47 -05:00
..
amlogic pmdomain: amlogic: Move Kconfig options to the pmdomain subsystem 2023-09-20 10:08:45 +02:00
apple soc: apple: mailbox: error pointers are negative integers 2024-01-30 11:34:49 -08:00
aspeed soc/aspeed: Convert to platform remove callback returning void 2023-10-13 15:04:12 +10:30
atmel soc: microchip: Explicitly include correct DT includes 2023-07-29 16:54:29 +03:00
bcm SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
canaan
dove soc: dove: add missing of_node_put 2023-09-20 11:28:02 +02:00
fsl Including fixes from CAN, netfilter, wireguard and IPsec. 2024-03-21 14:50:39 -07:00
fujitsu soc/fujitsu: a64fx-diag: Convert to platform remove callback returning void 2023-10-14 23:27:01 +02:00
gemini
hisilicon soc: hisilicon: kunpeng_hccs: Support the platform with PCC type3 and interrupt ack 2023-12-07 06:16:35 +00:00
imx - Move Kconfig files into the pmdomain subsystem 2023-11-01 13:09:46 -10:00
ixp4xx soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void 2023-10-14 23:27:13 +02:00
lantiq
litex soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void 2023-10-14 23:27:17 +02:00
loongson Convert drivers/soc to struct platform_driver::remove_new() 2023-10-16 22:51:31 +02:00
mediatek soc: mediatek: mtk-socinfo: Add extra entry for MT8183 2024-01-31 09:41:43 +01:00
microchip soc: microchip: Fix POLARFIRE_SOC_SYS_CTRL input prompt 2024-01-22 16:39:40 +00:00
nuvoton
pxa soc: pxa: ssp: fix casts 2024-01-09 08:25:29 +01:00
qcom soc: qcom: cmd-db: replace deprecated strncpy with strtomem 2024-04-21 12:26:47 -05:00
renesas soc: renesas: rcar-rst: Add support for R-Car V4M 2024-01-31 15:08:41 +01:00
rockchip SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
samsung soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs 2024-02-25 11:39:23 +01:00
sunxi soc: sunxi: sram: export register 0 for THS on H616 2024-03-11 17:14:46 +01:00
tegra soc/tegra: pmc: Add SD wake event for Tegra234 2024-02-16 12:35:56 +01:00
ti soc: ti: k3-socinfo: Add JTAG ID for J722S 2023-12-13 07:52:32 -06:00
ux500
versatile
xilinx Char/Misc and other Driver changes for 6.8-rc1 2024-01-17 16:47:17 -08:00
Kconfig soc: sifive: shunt ccache driver to drivers/cache 2023-11-22 11:49:25 +00:00
Makefile soc: sifive: shunt ccache driver to drivers/cache 2023-11-22 11:49:25 +00:00