net_device *net)
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 20231012-strncpy-drivers-net-usb-sr9800-c-38f712c2ff72
Best regards,
--
Justin Stitt
usb_make_path(dev->udev, info->bus_info, sizeof(info->bus_info));
}
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 20231012-strncpy-drivers-net-usb-lan78xx-c-f19433ee0f0a
Best regards,
--
Justin Stitt
g, ETH_GSTRING_LEN);
- }
+ for (i = 0; i < ARRAY_SIZE(smsc_hw_stats); i++)
+ ethtool_sprintf(&data, "%s", smsc_hw_stats[i].string);
}
static u64 smsc_get_stat(struct phy_device *phydev, int i)
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 2023
2c911d8f38d8247814b4c07f49a2
change-id: 20231012-strncpy-drivers-net-phy-nxp-tja11xx-c-99019080b1d4
Best regards,
--
Justin Stitt
100btx_rx_err");
}
static void cbtx_get_stats(struct phy_device *phydev,
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 20231012-strncpy-drivers-net-phy-nxp-cbtx-c-266285682759
Best regards,
--
Justin Stitt
On Thu, Oct 12, 2023 at 2:59 PM Andrew Lunn wrote:
>
> On Thu, Oct 12, 2023 at 09:53:03PM +, Justin Stitt wrote:
> > strncpy() is deprecated for use on NUL-terminated destination strings
> > [1] and as such we should prefer more robust and less ambiguous string
> > interfaces.
>
> Hi Justin
>
On Thu, Oct 12, 2023 at 09:53:03PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
Hi Justin
You just sent two patches with the same Subject. That got me confu
On Thu, Oct 12, 2023 at 09:43:02PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> We expect new_bus->id to be NUL-terminated but not NUL-padded based on
>
trscpy(mdiodev->modalias, bi->modalias,
sizeof(mdiodev->modalias));
mdiodev->bus_match = mdio_device_bus_match;
mdiodev->dev.platform_data = (void *)bi->platform_data;
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 20231012-s
t;id, "gpio", sizeof(new_bus->id));
if (pdata) {
new_bus->phy_mask = pdata->phy_mask;
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 20231012-strncpy-drivers-net-mdio-mdio-gpio-c-bddd9ed0c630
Best regards,
--
Justin Stitt
wx, part_str, TXGBE_PBANUM_LENGTH);
if (err)
- strncpy(part_str, "Unknown", TXGBE_PBANUM_LENGTH);
+ strscpy(part_str, "Unknown", sizeof(part_str));
netif_info(wx, probe, netdev, "%pM\n", netdev->dev_addr);
---
base-commit: cbf3a2cb156a2c
On Thu, Oct 12, 2023 at 08:38:19PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> `desc` is expected to be NUL-terminated as evident by the manual
> NUL-by
one_get_msglevel(struct net_device *ndev)
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 20231012-strncpy-drivers-net-ethernet-ti-netcp_ethss-c-305a53873cfc
Best regards,
--
Justin Stitt
On 12/10/2023 21:38, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> `desc` is expected to be NUL-terminated as evident by the manual
> NUL-byte assignment. Moreov
eof(mdio_bus_id) - 1] = '\0';
dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);
if (!dev)
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id: 20231012-strncpy-drivers-net-ethernet-ti-cpmac-c-9d9d1b33d595
Best regards,
--
Justin Stitt
ESCRIPTION),
MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_NUM(outlen));
- desc[MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_NUM(outlen)]
= '\0';
} else {
desc[0] = '\0';
}
---
base-commit: cbf3a2cb156a2c911d8f38d8247814
On 12/10/2023 22:02, Krzysztof Kozlowski wrote:
>
> On Sat, 07 Oct 2023 22:36:33 -0500, Sam Protsenko wrote:
>> Reserve a 2 MiB memory region to record kmsg dumps, console, ftrace and
>> userspace messages. The implemented memory split allows capturing and
>> reading corresponding ring buffers:
>>
On Sat, 07 Oct 2023 22:36:33 -0500, Sam Protsenko wrote:
> Reserve a 2 MiB memory region to record kmsg dumps, console, ftrace and
> userspace messages. The implemented memory split allows capturing and
> reading corresponding ring buffers:
> * dmesg: 6 dumps, 128 KiB each
> * console: 128 Ki
On Thu, Oct 12, 2023 at 2:53 PM Rob Herring wrote:
>
> On Tue, Oct 10, 2023 at 07:27:19PM +0200, Duje Mihanović wrote:
> > Add the "marvell,pxa1908-padconf" compatible to allow migrating to a
> > separate pinctrl driver later.
> >
> > Signed-off-by: Duje Mihanović
> > ---
> > Documentation/devic
On Tue, Oct 10, 2023 at 07:27:19PM +0200, Duje Mihanović wrote:
> Add the "marvell,pxa1908-padconf" compatible to allow migrating to a
> separate pinctrl driver later.
>
> Signed-off-by: Duje Mihanović
> ---
> Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml | 4
> 1 file chang
On 10/10/2023 19:27, Duje Mihanović wrote:
> Add the "marvell,pxa1908-padconf" compatible to allow migrating to a
> separate pinctrl driver later.
>
> Signed-off-by: Duje Mihanović
> ---
> Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml | 4
> 1 file changed, 4 insertions(+)
>
On 10/10/2023 3:26 PM, Justin Stitt wrote:
> Hi,
>
> This series aims to eliminate uses of strncpy() as it is a deprecated
> interface [1] with many viable replacements available.
>
> Predominantly, strscpy() is the go-to replacement as it guarantees
> NUL-termination on the destination buffer
On 03 Oct 16:17, Kees Cook wrote:
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for
On 03 Oct 16:17, Kees Cook wrote:
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for
On 11 Oct 21:04, Justin Stitt wrote:
`strncpy` is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.
We expect `dst` to be NUL-terminated based on its use with format
strings:
| mlx4_dbg(dev, "Reportin
On 11 Oct 14:34, Kees Cook wrote:
On Wed, Oct 11, 2023 at 09:29:57PM +, Justin Stitt wrote:
In total, just assigning this version string takes:
(1) strncpy()'s
(5) strlen()'s
(3) strncat()'s
(1) snprintf()'s
(4) max_t()'s
Moreover, `strncpy` is deprecated [1] and `strncat` really shouldn't
default:
dev_err(&pdev->dev, "%s: Invalid device id\n",
---
base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2
change-id:
20231012-strncpy-drivers-net-ethernet-qlogic-qlcnic-qlcnic_83xx_init-c-7858019dc583
Best regards,
--
Justin Stitt
On Thu, Oct 12, 2023 at 06:35:41PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> This patch eliminates three uses of strncpy():
>
> Firstly, `dest` is ex
Hi Kartik,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tegra/for-next]
[also build test WARNING on kees/for-next/hardening akpm-mm/mm-everything
linus/master v6.6-rc5 next-20231012]
[If your patch is applied to the wrong git tree, kindly drop us a note
strncpy() is deprecated for use on NUL-terminated destination strings
[1] and as such we should prefer more robust and less ambiguous string
interfaces.
This patch eliminates three uses of strncpy():
Firstly, `dest` is expected to be NUL-terminated which is evident by the
manual setting of a NUL-
On Fri, 23 Jun 2023 10:27:06 +0800, Jiasheng Jiang wrote:
> Add check for the return value of kstrdup() and return the error
> if it fails in order to avoid NULL pointer dereference.
>
>
Applied to for-next/pstore, thanks!
[1/1] pstore/platform: Add check for kstrdup
https://git.kernel.or
On Wed, Oct 11, 2023 at 08:18:45PM -0600, Gustavo A. R. Silva wrote:
> In order to gain the bounds-checking coverage that __counted_by provides
> to flexible-array members at run-time via CONFIG_UBSAN_BOUNDS (for array
> indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions),
> we
On Wed, Oct 11, 2023 at 08:17:36PM -0600, Gustavo A. R. Silva wrote:
> `struct clk_hw_onecell_data` is a flexible structure, which means that
> it contains flexible-array member at the bottom, in this case array
> `hws`:
>
> include/linux/clk-provider.h:
> 1380 struct clk_hw_onecell_data {
> 1381
On Thu, 12 Oct 2023 06:50:40 +0200, Lukas Bulwahn wrote:
> Commit 5a0b11a180a9 ("iommu/amd: Remove iommu_v2 module") removes the
> config AMD_IOMMU_V2.
>
> Remove the reference to this config in the x86 architecture-specific
> hardening config fragment as well.
>
>
> [...]
Applied to for-next/h
On Wed, Oct 11, 2023 at 09:48:39PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> We expect res->name to be NUL-terminated based on its usage with format
>
Kees Cook wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
> array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/m
36 matches
Mail list logo