[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C2D7FE5348E1B147BCA15975FBA23075665A5DED@IN01WEMBXB.internal.synopsys.com>
Date: Wed, 17 Jun 2015 07:03:25 +0000
From: Vineet Gupta <Vineet.Gupta1@...opsys.com>
To: "arc-linux-dev@...opsys.com" <arc-linux-dev@...opsys.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [arc-linux-dev] [PATCH] stmmac: explicitly zero des0 & des1 on
init
+CC linux-arch, linux-mm, Arnd and Marek
On Tuesday 16 June 2015 11:11 PM, Alexey Brodkin wrote:
Current implementtion of descriptor init procedure only takes care about
ownership flag. While it is perfectly possible to have underlying memory
filled with garbage on boot or driver installation.
And randomly set flags in non-zeroed des0 and des1 fields may lead to
unpredictable behavior of the GMAC DMA block.
Solution to this problem is as simple as explicit zeroing of both des0
and des1 fields of all buffer descriptors.
Signed-off-by: Alexey Brodkin <abrodkin@...opsys.com><mailto:abrodkin@...opsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com><mailto:peppe.cavallaro@...com>
Cc: arc-linux-dev@...opsys.com<mailto:arc-linux-dev@...opsys.com>
Cc: linux-kernel@...r.kernel.org<mailto:linux-kernel@...r.kernel.org>
Cc: stable@...r.kernel.org<mailto:stable@...r.kernel.org>
FWIW, this was causing sporadic/random networking flakiness on ARC SDP platform (scheduled for upstream inclusion in next window)
This also leads to an interesting question - should arch/*/dma_alloc_coherent() and friends unconditionally zero out memory (vs. the current semantics of letting only doing it based on gfp, as requested by driver). This is the second instance we ran into stale descriptor memory, the first one was in dw_mmc driver which was recently fixed in upstream as well (although debugged independently by Alexey and using the upstream fix)
http://www.spinics.net/lists/linux-mmc/msg31600.html
The pros is better out of box experience (despite buggy drivers) while the cons are they remain broken and perhaps increased boot time due to extra memzero....
Thx,
-Vineet
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists