All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	pkshih@realtek.com, kvalo@codeaurora.org, davem@davemloft.net,
	kuba@kernel.org
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA
Date: Thu, 19 Nov 2020 09:54:14 +0800	[thread overview]
Message-ID: <9a4a11cf-6505-3434-85fa-262e3e16bc47@gmail.com> (raw)
In-Reply-To: <d3996305-136a-708b-0dba-e9428f9da5cb@lwfinger.net>

Thanks for the advice.
I have added the description of the changes and resent the patches.


Best wishes,
Jia-Ju Bai

On 2020/11/19 1:20, Larry Finger wrote:
> On 11/17/20 7:53 PM, Jia-Ju Bai wrote:
>> In rtl88ee_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on
>> line 677:
>>    dma_addr_t mapping = dma_map_single(..., skb->data, ...);
>>
>> On line 680, skb->data is assigned to hdr after cast:
>>    struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data);
>>
>> Then hdr->frame_control is accessed on line 681:
>>    __le16 fc = hdr->frame_control;
>>
>> This DMA access may cause data inconsistency between CPU and hardwre.
>>
>> To fix this bug, hdr->frame_control is accessed before the DMA mapping.
>>
>> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
>> ---
>>   drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> What changed between v1 and v2?
>
> As outlined in Documentation/process/submitting-patches.rst, you 
> should add a '---' marker and descrive what was changed. I usually 
> summarize the changes, but it is also possible to provide a diffstat 
> of the changes as the above file shows.
>

      reply	other threads:[~2020-11-19  1:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18  1:53 [PATCH v2 1/4] rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA Jia-Ju Bai
2020-11-18  2:33 ` Pkshih
2020-11-18 17:20 ` Larry Finger
2020-11-19  1:54   ` Jia-Ju Bai [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=9a4a11cf-6505-3434-85fa-262e3e16bc47@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pkshih@realtek.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.