[PATCH v2 2/2] net: openvswitch: Annotate struct mask_array with __counted_by

2023-10-13 Thread Christophe JAILLET
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 checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family funct

Re: [PATCH] Input: Annotate struct ff_device with __counted_by

2023-10-13 Thread Dmitry Torokhov
On Fri, Oct 06, 2023 at 01:17:39PM -0700, 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)

Re: [PATCH] net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread Andrew Lunn
> I've been told that this whole ethtool API area is considered > deprecated. If that holds, then I don't think it's worth adding new > helpers to support it when ethtool_sprintf() is sufficient. I think deprecated is too strong. The current API is not great, so maybe with time a new API will emer

Re: [PATCH v2] qed: replace uses of strncpy

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Thu, 12 Oct 2023 18:35:41 + you 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 pa

Re: [PATCH] sfc: replace deprecated strncpy with strscpy

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Thu, 12 Oct 2023 20:38:19 + you 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`

Re: [PATCH] net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Thu, 12 Oct 2023 22:25:12 + you 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. > > ethtool

Re: [PATCH] net/mlx4_core: replace deprecated strncpy with strscpy

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Wed, 11 Oct 2023 21:04:37 + you 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 expe

Re: [PATCH] ionic: replace deprecated strncpy with strscpy

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Wed, 11 Oct 2023 21:53:44 + you 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. > > NUL-pad

Re: [PATCH] net: sparx5: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Wed, 11 Oct 2023 21:37:18 + you 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. > > ethtool

Re: [PATCH] nfp: replace deprecated strncpy with strscpy

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Wed, 11 Oct 2023 21:48:39 + you 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 expe

Re: [PATCH v2] net: dsa: vsc73xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Tue, 10 Oct 2023 22:32:35 + you 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. > > ethtool

Re: [PATCH] net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread Kees Cook
On Thu, Oct 12, 2023 at 10:25:12PM +, 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. > > ethtool_sprintf() is designed specifically for get_strings() usage. > Let

Re: [PATCH] net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread Kees Cook
On Fri, Oct 13, 2023 at 02:23:34PM -0700, Justin Stitt wrote: > On Fri, Oct 13, 2023 at 2:12 PM Justin Stitt wrote: > > > > On Fri, Oct 13, 2023 at 1:13 PM Andrew Lunn wrote: > > > > > > On Fri, Oct 13, 2023 at 12:53:53PM -0700, Justin Stitt wrote: > > > > On Fri, Oct 13, 2023 at 5:22 AM Andrew L

Re: [PATCH] net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread Justin Stitt
On Fri, Oct 13, 2023 at 2:12 PM Justin Stitt wrote: > > On Fri, Oct 13, 2023 at 1:13 PM Andrew Lunn wrote: > > > > On Fri, Oct 13, 2023 at 12:53:53PM -0700, Justin Stitt wrote: > > > On Fri, Oct 13, 2023 at 5:22 AM Andrew Lunn wrote: > > > > > > > > > - for (i = 0; i < ARRAY_SIZE(tja11xx_hw_

[PATCH] ath6kl: replace deprecated strncpy with memcpy

2023-10-13 Thread Justin Stitt
b156a2c911d8f38d8247814b4c07f49a2 change-id: 20231013-strncpy-drivers-net-wireless-ath-ath6kl-init-c-ffdb45d76eaf Best regards, -- Justin Stitt

Re: [PATCH] net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread Justin Stitt
On Fri, Oct 13, 2023 at 1:13 PM Andrew Lunn wrote: > > On Fri, Oct 13, 2023 at 12:53:53PM -0700, Justin Stitt wrote: > > On Fri, Oct 13, 2023 at 5:22 AM Andrew Lunn wrote: > > > > > > > - for (i = 0; i < ARRAY_SIZE(tja11xx_hw_stats); i++) { > > > > - strncpy(data + i * ETH_GSTRING

Re: [PATCH v2] scsi: message: fusion: replace deprecated strncpy with strscpy

2023-10-13 Thread Martin K. Petersen
On Tue, 03 Oct 2023 22:15:45 +, 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. > > The only caller of mptsas_exp_repmanufacture_info() is > mptsas_probe_one_phy(

Re: [PATCH] scsi: message: fusion: replace deprecated strncpy with strscpy_pad

2023-10-13 Thread Martin K. Petersen
On Wed, 27 Sep 2023 04:06:09 +, 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. > > Since all these structs are copied out to userspace let's keep them > NUL-padd

[PATCH] ath5k: replace deprecated strncpy with strscpy

2023-10-13 Thread Justin Stitt
(led->name)); led->led_dev.name = led->name; led->led_dev.default_trigger = trigger; led->led_dev.brightness_set = ath5k_led_brightness_set; --- base-commit: cbf3a2cb156a2c911d8f38d8247814b4c07f49a2 change-id: 20231013-strncpy-drivers-net-wireless-ath-ath5k-led-c-12487cee93be Best regards, -- Justin Stitt

Re: [PATCH] net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread Andrew Lunn
On Fri, Oct 13, 2023 at 12:53:53PM -0700, Justin Stitt wrote: > On Fri, Oct 13, 2023 at 5:22 AM Andrew Lunn wrote: > > > > > - for (i = 0; i < ARRAY_SIZE(tja11xx_hw_stats); i++) { > > > - strncpy(data + i * ETH_GSTRING_LEN, > > > - tja11xx_hw_stats[i].string, ET

Re: [PATCH] net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread Justin Stitt
On Fri, Oct 13, 2023 at 5:22 AM Andrew Lunn wrote: > > > - for (i = 0; i < ARRAY_SIZE(tja11xx_hw_stats); i++) { > > - strncpy(data + i * ETH_GSTRING_LEN, > > - tja11xx_hw_stats[i].string, ETH_GSTRING_LEN); > > - } > > + for (i = 0; i < ARRAY_SIZE(tja11xx

Re: [PATCH v5] module: Add CONFIG_MODULE_DISABLE_INIT_FREE option

2023-10-13 Thread Luis Chamberlain
Joey, Thanks for working hard on expanding on the commit log to try to describe the rationale for this. I'd like review from the linux-hardening folks and at least one syzkaller developer. On Fri, Oct 13, 2023 at 11:57:11AM +0530, Joey Jiao wrote: > Syzkaller uses the _RET_IP_ (also known as pc)

Re: [PATCH] net: phy: tja11xx: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread Andrew Lunn
> - for (i = 0; i < ARRAY_SIZE(tja11xx_hw_stats); i++) { > - strncpy(data + i * ETH_GSTRING_LEN, > - tja11xx_hw_stats[i].string, ETH_GSTRING_LEN); > - } > + for (i = 0; i < ARRAY_SIZE(tja11xx_hw_stats); i++) > + ethtool_sprintf(&data, "%s", tj

Re: [PATCH] net: phy: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread Andrew Lunn
Hi Justin The Subject line should say which PHY you are patching, nxp-cbtx. The patches which follow do have driver names. Please repost with the Subject corrected. Please also take a look at https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html which will tell you about network

Re: [PATCH] net: mdio: replace deprecated strncpy with strscpy

2023-10-13 Thread Andrew Lunn
On Thu, Oct 12, 2023 at 03:01:06PM -0700, Justin Stitt wrote: > 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 prefe

Re: [PATCH] ibmvnic: replace deprecated strncpy with strscpy

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Mon, 09 Oct 2023 23:19:57 + you 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. > > NUL-pa

Re: [PATCH][next] net: wwan: t7xx: Add __counted_by for struct t7xx_fsm_event and use struct_size()

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Mon, 9 Oct 2023 15:46:18 -0600 you 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 boun

Re: [PATCH] net: fec: replace deprecated strncpy with ethtool_sprintf

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Mon, 09 Oct 2023 23:05:41 + you 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. > > ethtoo