All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	benjamin.berg@intel.com, dmantipov@yandex.ru,
	gregory.greenman@intel.com, gustavoars@kernel.org,
	haim.dreyfuss@intel.com, johannes.berg@intel.com,
	kvalo@kernel.org, linux-hardening@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	luciano.coelho@intel.com, miriam.rachel.korenblit@intel.com,
	shaul.triebitz@intel.com, yedidya.ben.shimol@intel.com
Subject: Re: [PATCH] wifi: iwlwifi: mvm: Fix __counted_by usage in cfg80211_wowlan_nd_*
Date: Sun, 17 Nov 2024 03:04:37 -0800	[thread overview]
Message-ID: <202411170303.1F0B0E2@keescook> (raw)
In-Reply-To: <0f7d2d25-5c7c-4a19-8af7-ce38ee630d4d@wanadoo.fr>

On Thu, Jun 20, 2024 at 08:53:45PM +0200, Christophe JAILLET wrote:
> Le 20/06/2024 à 20:08, Gustavo A. R. Silva a écrit :
> > 
> > 
> > On 6/20/24 12:02, Gustavo A. R. Silva wrote:
> > > 
> > > > My understanding is that 'match', is allocated by :
> > > >      match = kzalloc(struct_size(match, channels, n_channels),
> > > > GFP_KERNEL);
> > > > 
> > > > So match->n_channels is *0* when iwl_mvm_query_set_freqs() is called.
> > > 
> > > n_channels is updated in the line before calling kzalloc():
> > > 
> > > n_channels = iwl_mvm_query_num_match_chans(mvm, d3_data->nd_results, i);
> > > 
> > > match = kzalloc(struct_size(match, channels, n_channels), GFP_KERNEL);
> > 
> > then match->n_channels updated here:
> > 
> >           if (!match)
> >               goto out_report_nd;
> > +        match->n_channels = n_channels;
> 
> Thanks for the explanation.
> This is what I was looking for, and I missed this line.
> 
> Sorry for the noise.

Hi,

This patch is still needed and doesn't appear in -next (nor Linus's
tree). Should I resend it?

Thanks!

-Kees

-- 
Kees Cook

      parent reply	other threads:[~2024-11-17 11:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 21:12 [PATCH] wifi: iwlwifi: mvm: Fix __counted_by usage in cfg80211_wowlan_nd_* Kees Cook
2024-06-19 21:22 ` Gustavo A. R. Silva
2024-06-20 17:06 ` Christophe JAILLET
2024-06-20 18:02   ` Gustavo A. R. Silva
2024-06-20 18:08     ` Gustavo A. R. Silva
2024-06-20 18:53       ` Christophe JAILLET
2024-06-20 19:02         ` Gustavo A. R. Silva
2024-11-17 11:04         ` Kees Cook [this message]

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=202411170303.1F0B0E2@keescook \
    --to=kees@kernel.org \
    --cc=benjamin.berg@intel.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dmantipov@yandex.ru \
    --cc=gregory.greenman@intel.com \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=haim.dreyfuss@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=kvalo@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=shaul.triebitz@intel.com \
    --cc=yedidya.ben.shimol@intel.com \
    /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.