[Intel-wired-lan] [PATCH] overflow: Change DEFINE_FLEX to take __counted_by member

2024-03-05 Thread Kees Cook
: Kees Cook --- Cc: Przemek Kitszel Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Gustavo A. R. Silva" Cc: intel-wired-...@lists.osuosl.org Cc: net...@vger.kernel.org Cc: linux-harden...@vger.kernel.

[Intel-wired-lan] [PATCH v2] overflow: Change DEFINE_FLEX to take __counted_by member

2024-03-06 Thread Kees Cook
The norm should be flexible array structures with __counted_by annotations, so DEFINE_FLEX() is updated to expect that. Rename the non-annotated version to DEFINE_RAW_FLEX(), and update the few existing users. Signed-off-by: Kees Cook --- Cc: Przemek Kitszel Cc: Jesse Brandeburg Cc: Tony

Re: [Intel-wired-lan] [PATCH] overflow: Change DEFINE_FLEX to take __counted_by member

2024-03-06 Thread Kees Cook
On Wed, Mar 06, 2024 at 08:06:29AM +0100, Przemek Kitszel wrote: > On 3/6/24 04:25, Gustavo A. R. Silva wrote: > > > > > > On 05/03/24 19:07, Kees Cook wrote: > > > The norm should be flexible array structures with __counted_by > > > annotations, so

Re: [Intel-wired-lan] [PATCH v2] overflow: Change DEFINE_FLEX to take __counted_by member

2024-03-09 Thread Kees Cook
On Fri, Mar 08, 2024 at 08:20:18PM +, Simon Horman wrote: > On Wed, Mar 06, 2024 at 03:51:36PM -0800, Kees Cook wrote: > > The norm should be flexible array structures with __counted_by > > annotations, so DEFINE_FLEX() is updated to expect that. Rename > > the non

Re: [Intel-wired-lan] [PATCH net-next v9 7/9] libeth: add Rx buffer management

2024-04-09 Thread Kees Cook
gt;>> + */ > >>> +struct libeth_fq { > >>> + struct_group_tagged(libeth_fq_fp, fp, > >>> + struct page_pool *pp; > >>> + struct libeth_fqe *fqes; > >>> + > >>> + u32 truesize; > >>> + u32 count; > >>> + ); > >>> + > >>> + /* Cold fields */ > >>> + u32 buf_len; > >>> + int nid; > >>> +}; > > Thanks, > Olek -- Kees Cook

Re: [Intel-wired-lan] [PATCH net-next 0/7] net: intel: replace deprecated strncpy uses

2023-10-10 Thread Kees Cook
: Jesse Brandeburg > > > > PS: have you considered adding a script to scripts/coccinelle/api which > > might catch and try to fix future (ab)users of strncpy? > > There is a checkpatch routine for it. Also, the docs are littered with > aversions to strncpy. With that bei

Re: [Intel-wired-lan] [PATCH net-next 0/7] net: intel: replace deprecated strncpy uses

2023-10-10 Thread Kees Cook
> e1000: replace deprecated strncpy with strscpy > fm10k: replace deprecated strncpy with strscpy > i40e: use scnprintf over strncpy+strncat > igb: replace deprecated strncpy with strscpy > igbvf: replace deprecated strncpy

Re: [Intel-wired-lan] [PATCH 0/3] ethtool: Add ethtool_puts()

2023-10-26 Thread Kees Cook
ule like I had to adjust the next rule: completely remove and re-add the arguments: - ethtool_sprintf(&BUF, VAR) + ethtool_puts(&BUF, VAR) Then I think the handful of weird line wraps in the treewide patch will go away. -- Kees Cook __

Re: [Intel-wired-lan] [PATCH 0/3] ethtool: Add ethtool_puts()

2023-10-26 Thread Kees Cook
On Thu, Oct 26, 2023 at 09:33:17AM -0700, Joe Perches wrote: > On Thu, 2023-10-26 at 08:47 -0700, Kees Cook wrote: > > On Wed, Oct 25, 2023 at 11:40:31PM +, Justin Stitt wrote: > > > @replace_2_args@ > > > identifier BUF; > > > expression VAR; > >

Re: [Intel-wired-lan] [PATCH iwl-net] ice: health.c: fix compilation on gcc 7.5

2025-02-07 Thread Kees Cook
] = "Update to the latest NVM > image."; > > static const struct ice_health_status ice_health_status_lookup[] = { > {ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_STRICT, "An unsupported module > was detected.", > I'd agree that would be the preferred fix. :) -- Kees Cook