From: Kalle Valo <kvalo@kernel.org>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Colin Ian King <colin.i.king@gmail.com>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()
Date: Fri, 14 Apr 2023 15:38:13 +0300 [thread overview]
Message-ID: <87edom7i6i.fsf@kernel.org> (raw)
In-Reply-To: <87bkjqzrdm.fsf@toke.dk> ("Toke \=\?utf-8\?Q\?H\=C3\=B8iland-J\?\= \=\?utf-8\?Q\?\=C3\=B8rgensen\=22's\?\= message of "Fri, 14 Apr 2023 12:32:05 +0200")
(dropping stable from cc)
Toke Høiland-Jørgensen <toke@toke.dk> writes:
> Kalle Valo <kvalo@kernel.org> writes:
>
>> Toke Høiland-Jørgensen <toke@toke.dk> writes:
>>
>>> This partially reverts commit e161d4b60ae3a5356e07202e0bfedb5fad82c6aa.
>>>
>>> Turns out the channelmap variable is not actually read-only, it's modified
>>> through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function,
>>> so making it read-only causes page faults when that code is hit.
>>>
>>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217183
>>> Fixes: e161d4b60ae3 ("wifi: ath9k: Make arrays prof_prio and
>>> channelmap static const")
>>> Cc: stable@vger.kernel.org
>>> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
>>
>> I guess the casting in MCI_GPM_CLR_CHANNEL_BIT() hide this and made it
>> impossible for the compiler to detect it? A perfect example why I hate
>> casting :)
>
> Yup, exactly. I was also assuming the compiler would catch it, but yay, C! :/
We have so many static checkers that I wonder if those would be able to
catch these kind of buggy casts? We had a similar bug in rtw89 something
like a year ago.
> Anyway, cf the bugzilla this was a pretty bad regression for 6.2, so
> would be good to move this along reasonably quickly (although I guess we
> just missed the -net PR for rc7)...
I'm not planning to send anymore stuff to v6.3 so my plan is to take
this to -next. The merge window is very close anyway so this shouldn't
cause too much delay.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2023-04-14 12:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 21:41 [PATCH] wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels() Toke Høiland-Jørgensen
2023-04-14 10:00 ` Kalle Valo
2023-04-14 10:32 ` Toke Høiland-Jørgensen
2023-04-14 12:38 ` Kalle Valo [this message]
2023-04-18 10:14 ` Toke Høiland-Jørgensen
2023-04-19 4:54 ` Kalle Valo
2023-04-20 13:50 ` Thorsten Leemhuis
2023-04-20 14:24 ` Toke Høiland-Jørgensen
2023-04-20 14:50 ` Jakub Kicinski
2023-04-20 15:56 ` Toke Høiland-Jørgensen
2023-04-20 16:39 ` Jakub Kicinski
2023-04-20 15:59 ` Thorsten Leemhuis
2023-04-20 16:55 ` Jakub Kicinski
2023-04-20 18:27 ` Linux regression tracking (Thorsten Leemhuis)
2023-04-19 14:24 ` Kalle Valo
2023-04-19 15:18 ` Colin King (gmail)
2023-04-20 21:09 ` One-off regression fix for 6.3 [was: Re: [PATCH] wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()] Toke Høiland-Jørgensen
2023-04-20 22:27 ` Linus Torvalds
2023-04-20 22:38 ` Toke Høiland-Jørgensen
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=87edom7i6i.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=colin.i.king@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=toke@toke.dk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).