From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Kim Wooseok <5mghybrid@khu.ac.kr>, linux-wireless@vger.kernel.org
Cc: Jes Sorensen <Jes.Sorensen@gmail.com>,
Ping-Ke Shih <pkshih@realtek.com>, Kalle Valo <kvalo@kernel.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH rtw-next] wifi: rtl8xxxu: isolate the USB register buffer from CPU state
Date: Sat, 17 Oct 2026 01:19:26 +0300 [thread overview]
Message-ID: <637a1420-69bc-42bc-a1aa-df70faf769da@gmail.com> (raw)
In-Reply-To: <CAH1Bc_w89ymu+E1Gx13M9JD7ZNmdQ3=y_zFwVvMkQMKk4m6NAA@mail.gmail.com>
On 16/10/2026 21:05, Kim Wooseok wrote:
> Hi Bitterblue,
>
>> Perhaps it's a silly question, but doesn't this just move the problem
>> elsewhere? Or does kmalloc_obj() guarantee that nothing else will access
>> the memory near usb_buf?
>
> With a separately allocated kmalloc buffer, the kernel ensures that
> CPU accesses to other objects do not corrupt the DMA data through
> cache-line sharing. It provides the required alignment or bounce
> buffering, and usb_control_msg() uses this DMA mapping path.
>
> The patch turns usb_buf from an embedded member into a standalone
> kmalloc buffer so that this guarantee applies to the buffer itself.
>
Okay, that's good then.
>> An allocation for every register access was not happening even before
>> this patch. I guess your LLM wrote this...
>
> I did not state that the previous code allocated a buffer on every
> register access. That sentence describes the allocation strategy for
> the newly separate buffer: allocate it once in probe and reuse it.
>
> If any part of the explanation is unclear, please point it out and I
> will clarify it. I don't think speculation about how the text was
> written is necessary.
>
> Wooseok
prev parent reply other threads:[~2026-10-16 22:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 22:39 [PATCH rtw-next] wifi: rtl8xxxu: isolate the USB register buffer Kim Wooseok via B4 Relay
2026-10-09 22:39 ` [PATCH rtw-next] wifi: rtl8xxxu: isolate the USB register buffer from CPU state Kim Wooseok via B4 Relay
2026-10-12 5:44 ` Ping-Ke Shih
2026-10-13 0:15 ` 김우석[학생](전자정보대학 전자공학과)
2026-10-13 0:44 ` Ping-Ke Shih
2026-10-13 0:58 ` Kim Wooseok
2026-10-13 1:09 ` Ping-Ke Shih
2026-10-16 17:10 ` Bitterblue Smith
2026-10-16 18:05 ` Kim Wooseok
2026-10-16 22:19 ` Bitterblue Smith [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=637a1420-69bc-42bc-a1aa-df70faf769da@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=5mghybrid@khu.ac.kr \
--cc=Jes.Sorensen@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®