Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1432291pxa; Sun, 2 Aug 2020 07:28:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlG9wAMR46j3K7Lk8NEBLZO6SKOrF4oTxoN27r2dXzRLnvesRUSRLBfZQon1cfxefnGIxv X-Received: by 2002:a17:906:af72:: with SMTP id os18mr12404436ejb.43.1596378520144; Sun, 02 Aug 2020 07:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596378520; cv=none; d=google.com; s=arc-20160816; b=nal8yE1grupnIcf9ZL/MruhYD7MFiMJ+Rzty13fS2OSWv9Mf7y0oomRmHpa0Kn4S+C Rl1uhNsCogJGMadD6Lc5SnNry4m4fxHSXsSfPMM2ixmH835LVl2QXtrPd8il/KiTETE/ PtiD/CEy+x8x2HyrODyw6/IbkTnE0J01Lw21cb1286vOhhUDBnT2q2q2gAq+rn9mF1/8 sqPoG6wIlC0pQoh+1UuE7utGOAiHqk5LIT9+Y1ZMPUdh9960EQxDTF28+3NYMeMUp9Ul HpAM4eLFLIC2he5ouPyEpmj/dWaZpBath2C2iC4QzCS4Rh+qW9bRqtszUZ+VPNuX342O 8M/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:mime-version:user-agent:date:message-id :cc:to:subject:from; bh=4BelGiEqIrjXG2gZ0+C2iQIc/xs0ipXpKyT8ZFKys0g=; b=NewKj3LN8yiVFGkSRkD/FNTsA5nft1L8F8xNZwS+cuvp0K7e5ni5JYFx4Cg6dY1VmL xcyKulqDtHW/IP/ovjLpmKI1otksKhuQicSz62sBuOJpEHfDjImHkBqhJpnW5n/VHXu9 rspExzwowX6bKHxUswxm7cm7NvH5nApG1TPKJ2S72deNJ33FPohHxlgRMPAWKGDKRtGa zmIqRTGuHtuzObUVvGeySA9B8mJShl8iG3jmgeKnEhidqkX6CH00PoNWcaWFrxbKnbmQ BtuIU1zsShns1ZjKOZLgUYXIC4A51+ICSyweweuaw2Rkhf8GRxIYBZ9Zb5HjsvkqfVzh fVxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si7479655eja.210.2020.08.02.07.28.18; Sun, 02 Aug 2020 07:28:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726568AbgHBO0y (ORCPT + 99 others); Sun, 2 Aug 2020 10:26:54 -0400 Received: from zg8tmja5ljk3lje4mi4ymjia.icoremail.net ([209.97.182.222]:58570 "HELO zg8tmja5ljk3lje4mi4ymjia.icoremail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726058AbgHBO0x (ORCPT ); Sun, 2 Aug 2020 10:26:53 -0400 Received: from [101.5.209.60] (unknown [101.5.209.60]) by app-1 (Coremail) with SMTP id DwQGZQA3PeUJzSZfLxPrAw--.8196S2; Sun, 02 Aug 2020 22:26:19 +0800 (CST) From: Jia-Ju Bai Subject: [BUG] net: rocker: accessing the data mapped to streaming DMA To: jiri@resnulli.us, davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: Date: Sun, 2 Aug 2020 22:26:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID: DwQGZQA3PeUJzSZfLxPrAw--.8196S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYI7k0a2IF6w1UM7kC6x804xWl14x267AK xVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGw A2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26ryj 6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Gc CE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxI r21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87 Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS 07AlzVAYIcxG8wCY02Avz4vE14v_Xryl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7 v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF 1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIx AIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrJr0_WFyU JwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCT nIWIevJa73UjIFyTuYvjxUcWrWUUUUU X-CM-SenderInfo: xedlyxhdmxq3pvlqwxlxdovvfxof0/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In rocker_dma_test_offset(), "buf" is mapped to streaming DMA on line 203:   dma_handle = pci_map_single(..., buf, ...); Then, "buf" is accessed on line 229:   expect[i] = ~buf[i]; This access may cause data inconsistency between CPU cache and hardware. I am not sure how to properly fix this problem, and thus I only report it. Best wishes, Jia-Ju Bai