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

2023-10-14 Thread Julia Lawall
On Sat, 14 Oct 2023, Kees Cook wrote: > On Sat, Oct 14, 2023 at 08:34:53AM +0200, Christophe JAILLET 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

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

2023-10-14 Thread Kees Cook
On Thu, Oct 12, 2023 at 07:44:29PM +, 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 fw_info->fw_file_name to be NUL-terminated based on its use > w

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

2023-10-14 Thread Kees Cook
On Sat, Oct 14, 2023 at 03:55:41AM +0200, Andrew Lunn wrote: > > 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 stron

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

2023-10-14 Thread Kees Cook
On Sat, Oct 14, 2023 at 08:34:53AM +0200, Christophe JAILLET 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 checking via CONFIG_UBSAN_BOUNDS > (f

Re: [PATCH] PCI: hv: Annotate struct hv_dr_state with __counted_by

2023-10-14 Thread Krzysztof WilczyƄski
Hello, > 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/mem

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

2023-10-14 Thread Andrew Lunn
On Thu, Oct 12, 2023 at 10:33:34PM +, 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. > > Other implementations of .*get_drvinfo use strscpy so this patch brings >

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

2023-10-14 Thread Andrew Lunn
On Thu, Oct 12, 2023 at 10:30:54PM +, 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. > > Other implementations of .*get_drvinfo use strscpy so this patch brings >

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

2023-10-14 Thread Andrew Lunn
On Thu, Oct 12, 2023 at 09:20:04PM +, 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. > > Based on usage part_str usage within txgbe_read_pba_string(), we expect >

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

2023-10-14 Thread Andrew Lunn
On Thu, Oct 12, 2023 at 09:05:40PM +, 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. > > Considering the above, a suitable replacement is `strscpy` [2] due to > t

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

2023-10-14 Thread Andrew Lunn
On Thu, Oct 12, 2023 at 08:53:30PM +, 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 mdio_bus_id to be NUL-terminated based on its use with > snprin