From: Kalle Valo <kvalo@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH 0/3] net: wireless: use struct_size where appropriate
Date: Tue, 28 Feb 2023 08:24:18 +0200 [thread overview]
Message-ID: <87h6v61f59.fsf@kernel.org> (raw)
In-Reply-To: <20230227203927.3662811-1-jacob.e.keller@intel.com> (Jacob Keller's message of "Mon, 27 Feb 2023 12:39:24 -0800")
Jacob Keller <jacob.e.keller@intel.com> writes:
> This series fixes a few wireless drivers to use struct_size rather than open
> coding some equivalent checks. This ensures that these size calculations
> will not overflow but instead be bounded at SIZE_MAX.
>
> In the first case, the code is first converted to a flexible array, which
> saves a few bytes of memory in addition to the fix with struct_size.
>
> These were caught with a coccinelle patch I recently posted at [1].
>
> [1]: https://lore.kernel.org/all/20230227202428.3657443-1-jacob.e.keller@intel.com/
>
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Cc: linux-wireless@vger.kernel.org
>
> Jacob Keller (3):
> wifi: ipw2x00: convert ipw_fw_error->elem to flexible array[]
> wifi: cfg80211: use struct_size and size_sub for payload length
> wifi: nl80211: convert cfg80211_scan_request allocation to *_size
> macros
>
> drivers/net/wireless/intel/ipw2x00/ipw2200.c | 7 +++--
> drivers/net/wireless/intel/ipw2x00/ipw2200.h | 3 +--
> .../net/wireless/quantenna/qtnfmac/commands.c | 7 ++---
> net/wireless/nl80211.c | 26 ++++++++++---------
> 4 files changed, 22 insertions(+), 21 deletions(-)
I don't see the actual patches, only the cover letter. Also nothing on
patchwork:
https://patchwork.kernel.org/project/linux-wireless/list/?state=*
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2023-02-28 6:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 20:39 [PATCH 0/3] net: wireless: use struct_size where appropriate Jacob Keller
2023-02-28 6:24 ` Kalle Valo [this message]
2023-02-28 16:21 ` Keller, Jacob E
-- strict thread matches above, loose matches on Subject: below --
2023-02-28 16:22 Jacob Keller
2023-02-28 16:29 ` Jacob Keller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6v61f59.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.