From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796283075; b=ZiEeeVdU1+6rRnExivMDjl+EhEkH6Fuq583BSbucMSSkgBXraAvhov30iHqglxXcIlK/ CY7eUyDfpP7PzsHejANBGagC/DGjHrfCfDwWmAD0E1NQlCP9Roj65styMuPYYsAnpiOqu i2GLz9Glp0aXZLS1gkRSLbh/Fhj3fsMfPMYHN771Vu3K2d2MoPB9nLo3kVxpna8BtGiIp tz/IAvTq5RXhtIcJWLfZbCoa2uY9rb/ivHpPzuYrsIywzKJGqHGnL26l9taoYvFejN5ME YL9AviGV/gqQ8OV6jHBzTn5K0B76CEqnR8diMX88GszYaMkuUQ6qMrbYEy6YEwEBTtA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796283075; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=nTimy6MwKlYd7d/oLh+j5TdUm+QfQoTHh0f3eQ2GnhY=; b=tNNE33iwX925iQaVge76hYdZRigjXeONH41+6IvPURKUw5fFqZcQnsYo9212J6+G9dOD a0JxZfWY65S84z8OpUzIG2w3V07gwr79BXIW6LOt9isx49CRy64VnzlMas+FgA+s1Ofv+ s4/sFckBviEAK3WZY4IC+fKz8E9VXn24mS3GQpf3K7KTckAhGMVa8BDAQtohfQhY2MtjJ ts/IuIcPAw7QE68nkWRpyLL+qSdijL6QpNwLV3dF6W24j6l8lTWO7iT/WZVgtPNYLbd1z 6jIpvoB+IS6oXVsD6cGcW43NgbpWP1YGflfiJS49uP12NCzMPbEQGQBVku2lXsJYiaQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nqmCCS8k; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC6A3606A334 for ; Thu, 3 Dec 2026 07:31:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nqmCCS8k Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B2F71F00893; Thu, 3 Dec 2026 07:31:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796283074; bh=nTimy6MwKlYd7d/oLh+j5TdUm+QfQoTHh0f3eQ2GnhY=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=nqmCCS8kKJfJzhljB3KtunPqwrYGk5fqTr5rTr+CMZgw8R3Y+Nu7hfi5tlKqOouzq yJa8sCro8ZRZqy/MFs7IYaAHrs2SnaC2fXX2jvT5M532SoM3EdoaH5z8kKqgddlmMH 7yAXknXsCFYR6wbGelTMjxc0EGHEXGd4DYjzBaVt7Pq6xYWh1y9KKTXElk8hcfXvxx /Fj9ojHLcB+odVv8qcF8ex+OJ4Dsaa5mg9SfVSatxu4Bnzl6z1gjcGL9/kl46obvNk 8y5bJ0ifi5WXwHErodYdpxFLFYKLIwIhJaP6Wk/kAUrpEi1JtBBsC+w9bOm2pISzcv GIaXoD+gwrZXg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v6 02/17] wifi: cc33xx: Add cc33xx.h, cc33xx_i.h Reply-To: sashiko-reviews@lists.linux.dev To: "Ramesh Ramalingam" Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261203070906.1294171-3-r-ramalingam@ti.com> References: <20261203070906.1294171-1-r-ramalingam@ti.com> <20261203070906.1294171-3-r-ramalingam@ti.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 07:31:14 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [Medium] wifi: cc33xx: cc33xx_rx_filter_field mixes wire layout and host pointer - [Low] wifi: cc33xx: duplicate struct ieee80211_hdr_3addr as struct ieee80211_header - [Low] wifi: cc33xx: CC33XX_AGGR_BUFFER_SIZE scales with host PAGE_SIZE -- commit 4b0d2195b69f9a28c77203d691ab37987f0041e3 Author: Michael Nemanov wifi: cc33xx: Add cc33xx.h, cc33xx_i.h This commit adds the common internal header files cc33xx.h and cc33xx_i.h defining core driver structures, hardware constants, and vif, link, and RX filter types for the cc33xx wireless driver. > diff --git a/drivers/net/wireless/ti/cc33xx/cc33xx.h b/drivers/net/wirele= ss/ti/cc33xx/cc33xx.h > new file mode 100644 > index 0000000000000..0ace1b1f557d5 > --- /dev/null > +++ b/drivers/net/wireless/ti/cc33xx/cc33xx.h > @@ -0,0 +1,445 @@ [ ... ] > +#define CC33XX_AGGR_BUFFER_SIZE (8 * PAGE_SIZE) [Severity: Low] Should CC33XX_AGGR_BUFFER_SIZE use a fixed size such as SZ_32K instead of scaling with PAGE_SIZE? On 16 KiB or 64 KiB page kernels, (8 * PAGE_SIZE) expands to 128 KiB or 512 KiB. In commit "wifi: cc33xx: Add main.c", cc33xx_alloc_hw() passes get_order(CC33XX_AGGR_BUFFER_SIZE) to __get_free_pages(), forcing an order-3 contiguous allocation and wasting up to 448 KiB per device. [ ... ] > diff --git a/drivers/net/wireless/ti/cc33xx/cc33xx_i.h b/drivers/net/wire= less/ti/cc33xx/cc33xx_i.h > new file mode 100644 > index 0000000000000..c0d739713c2ab > --- /dev/null > +++ b/drivers/net/wireless/ti/cc33xx/cc33xx_i.h > @@ -0,0 +1,415 @@ [ ... ] > +struct ieee80211_header { > + __le16 frame_ctl; > + __le16 duration_id; > + u8 da[ETH_ALEN]; > + u8 sa[ETH_ALEN]; > + u8 bssid[ETH_ALEN]; > + __le16 seq_ctl; > + u8 payload[]; > +} __packed; [Severity: Low] Can this reuse struct ieee80211_hdr_3addr from linux/ieee80211.h instead of defining struct ieee80211_header? cc33xx_i.h already includes linux/ieee80211.h via net/mac80211.h, which defines the same 24-byte 3-address MAC header. Using the generic ieee80211_ prefix risks colliding with future core headers, and u8 payload[] is unused since callers only take sizeof(struct ieee80211_header). [ ... ] > +struct cc33xx_rx_filter_field { > + __le16 offset; > + u8 len; > + u8 flags; > + u8 *pattern; > +} __packed; [Severity: Medium] Will copying pattern bytes into &field->pattern trigger a CONFIG_FORTIFY_SOURCE warning? struct cc33xx_rx_filter_field mixes the 4-byte wire header with a host pointer u8 *pattern (at an unaligned 4-byte offset on 64-bit hosts). In commit "wifi: cc33xx: Add acx.c, acx.h", cc33xx_rx_filter_flatten_fields() overlays it onto the firmware buffer: drivers/net/wireless/ti/cc33xx/acx.c:cc33xx_rx_filter_flatten_fields() { ... field =3D (struct cc33xx_rx_filter_field *)buf; ... memcpy(&field->pattern, filter->fields[i].pattern, field->len); } Because pattern is a scalar pointer rather than a flexible array member, suspending with a WoWLAN pattern longer than sizeof(u8 *) (up to RX_FILTER_MAX_PATTERN_SIZE, 91 bytes) hits fortify_warn_once() (and panics under panic_on_warn=3D1) via cc33xx_op_suspend() -> cc33xx_configure_wowlan= (). Splitting the wire-format descriptor with a flexible array u8 pattern[] from the host-side struct cc33xx_rx_filter_field avoids the field-spanning write and the unaligned pointer. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203070906.1294= 171-1-r-ramalingam@ti.com?part=3D2