From: Kalle Valo <kvalo@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH] wifi: libertas: use variable-size data in assoc req/resp cmd
Date: Fri, 27 May 2022 15:02:47 +0300 [thread overview]
Message-ID: <87r14fp4ig.fsf@kernel.org> (raw)
In-Reply-To: <c5fe3475cdfbe2633e965682ac41db5e61271411.camel@sipsolutions.net> (Johannes Berg's message of "Fri, 27 May 2022 13:44:01 +0200")
Johannes Berg <johannes@sipsolutions.net> writes:
> On Fri, 2022-05-27 at 14:43 +0300, Kalle Valo wrote:
>> Johannes Berg <johannes@sipsolutions.net> writes:
>>
>> > From: Johannes Berg <johannes.berg@intel.com>
>> >
>> > The firmware has a 512 limit here, but we use less, so gcc
>> > starts complaining about it:
>> >
>> > drivers/net/wireless/marvell/libertas/cfg.c:1198:63: warning: array subscript ‘struct cmd_ds_802_11_associate_response[0]’ is partly outside array bounds of ‘unsigned char[203]’ [-Warray-bounds]
>> > 1198 | "aid 0x%04x\n", status, le16_to_cpu(resp->statuscode),
>> > | ^~
>> >
>> > Since we size the command and response buffer per our needs
>> > and not per the firmware maximum, change to a variable size
>> > data array and put the 512 only into a comment.
>> >
>> > In the end, that's actually what the code always wanted, and
>> > it simplifies the code that used to subtract the fixed size
>> > buffer size in two places.
>> >
>> > Reported-by: Jakub Kicinski <kuba@kernel.org>
>> > Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>>
>> Can we now remove the no-array-bounds hack from libertas?
>>
>
> I think Jakub said he dropped it from the patches?
Ah, indeed. I missed that, sorry for the noise.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2022-05-27 12:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 16:02 [PATCH] wifi: libertas: use variable-size data in assoc req/resp cmd Johannes Berg
2022-05-25 20:53 ` Jakub Kicinski
2022-05-25 21:18 ` Johannes Berg
2022-05-27 11:40 ` Kalle Valo
2022-05-27 22:36 ` Jakub Kicinski
2022-05-27 11:43 ` Kalle Valo
2022-05-27 11:44 ` Johannes Berg
2022-05-27 12:02 ` Kalle Valo [this message]
2022-05-30 9:13 ` Kalle Valo
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=87r14fp4ig.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--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.