From: "Michael Büsch" <m@bues.ch>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>,
Alexey Zaytsev <alexey.zaytsev@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
netdev@vger.kernel.org, Gary Zambrano <zambrano@broadcom.com>,
bugme-daemon@bugzilla.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Pekka Pietikainen <pp@ee.oulu.fi>,
Florian Schirmer <jolt@tuxbox.org>,
Felix Fietkau <nbd@openwrt.org>, Michael Buesch <mb@bu3sch.de>
Subject: Re: [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten
Date: Wed, 6 Jul 2011 18:12:58 +0200 [thread overview]
Message-ID: <20110706181258.57b3c112@maggie> (raw)
In-Reply-To: <1309968019.2292.44.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
On Wed, 06 Jul 2011 18:00:19 +0200
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Not exactly :
>
> If we read one skb at descriptor 0, we prepare a new buffer on slot 200,
> and advance DMARX_PTR to 201*sizeof(descriptor).
I don't think so. Why do you think this is the case?
We allocate a new descriptor buffer for the consumed buffer at exactly
the same place (which is "cons").
(Alternatively, we leave the buffer in place, and just copy the data to a new buffer).
And DMARX_PTR is updated to the last "cons", which is one beyond
the last buffer that we consumed (and pushed up the net stack).
(Note that "beyond" always means "beyond" in the sense of a DMA _ring_,
which honors the EOT bit. This is done by masking cons with RX_RING_SIZE-1,
which is thus assumed to be a power of two).
> > I don't know why b44 sets the DMARX_PTR to 200 initially (which is 40
> > descriptors, as this is a byte pointer). This seems kind of arbitrary.
> > In b43 we set it to (NR_OF_DESCRIPTORS - 1) * sizeof(descriptor).
> > But I don't think it really matters. It only limits the usable DMA
> > area before the first interrupt (or poll) occurs. After the final
> > B44_DMARX_PTR write in b44_rx(), the full descriptor range (well, minus one)
> > will be usable.
>
> Yes, this is probably a small bug, we should fix it for correctness.
I wouldn't call this a bug.
> > Summary: I don't see where the DMA engine code is broken (except for
> > the minor missing wmb(), which doesn't trigger this memory corruption, though)
> >
> > I hope that helps to clear up stuff...
>
> Well, you describe (nicely, thanks !) your understanding of how work the
> driver and chip.
>
> Problem is we suspect a wrong statement or wrong hardware ;)
>
> Another problem is Alexey doesnt answer anymore, and I dont have this
> (old) hardware...
I do really think that either
1) His device is broken. Chips break. I already saw several devices
with HND DMA engine that broke down after some time of use.
or
2) The bug is at another place, but not in the lowlevel DMA handling.
Could this possibly be some kind of context issue? threaded IRQs?
The net subsys was rather picky about context, last time I looked
into it. see the .._ni() style functions.
> Other point : Do you know why b44_get_ringparam() doesnt set
> ering->tx_max_pending and ering->tx_pending
>
> The comment seems wrong :
> /* XXX ethtool lacks a tx_max_pending, oops... */
Well, I _guess_ that ering->tx_max_pending was added later? (I didn't
even check if it's there _now_, though.)
next prev parent reply other threads:[~2011-07-06 16:13 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-38102-10286@https.bugzilla.kernel.org/>
2011-06-29 21:51 ` [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten Andrew Morton
2011-07-01 6:01 ` Alexey Zaytsev
2011-07-02 21:25 ` Alexey Zaytsev
2011-07-03 15:46 ` Eric Dumazet
2011-07-04 11:48 ` Alexey Zaytsev
2011-07-04 13:05 ` Michael Büsch
2011-07-04 13:57 ` Eric Dumazet
2011-07-04 14:27 ` Michael Büsch
2011-07-04 14:43 ` Michael Büsch
2011-07-04 14:53 ` Eric Dumazet
2011-07-04 15:12 ` Eric Dumazet
2011-07-04 20:25 ` Alexey Zaytsev
2011-07-04 22:29 ` Alexey Zaytsev
2011-07-05 3:44 ` Eric Dumazet
2011-07-05 3:56 ` Alexey Zaytsev
2011-07-05 4:11 ` Eric Dumazet
2011-07-05 4:14 ` Eric Dumazet
2011-07-05 4:17 ` Alexey Zaytsev
2011-07-05 4:18 ` Alexey Zaytsev
2011-07-05 4:25 ` Eric Dumazet
2011-07-05 4:29 ` Alexey Zaytsev
2011-07-05 4:38 ` Eric Dumazet
2011-07-05 4:57 ` Alexey Zaytsev
2011-07-05 5:10 ` Eric Dumazet
2011-07-05 5:18 ` Alexey Zaytsev
2011-07-05 5:33 ` Eric Dumazet
2011-07-05 5:59 ` Eric Dumazet
2011-07-05 16:05 ` Neil Horman
2011-07-05 16:12 ` Eric Dumazet
2011-07-05 16:27 ` Michael Büsch
2011-07-05 16:42 ` Neil Horman
2011-07-05 16:47 ` Eric Dumazet
2011-07-05 16:57 ` Eric Dumazet
2011-07-05 17:01 ` Joe Perches
2011-07-05 17:21 ` Neil Horman
2011-07-05 18:06 ` Neil Horman
2011-07-05 18:13 ` Eric Dumazet
2011-07-05 18:32 ` Eric Dumazet
2011-07-05 18:45 ` Eric Dumazet
2011-07-05 19:53 ` Neil Horman
2011-07-05 20:02 ` Eric Dumazet
2011-07-05 20:15 ` Eric Dumazet
2011-07-05 22:06 ` Neil Horman
2011-07-06 15:32 ` Michael Büsch
2011-07-06 16:00 ` Eric Dumazet
2011-07-06 16:12 ` Michael Büsch [this message]
2011-07-06 16:35 ` Eric Dumazet
2011-07-06 16:56 ` Eric Dumazet
2011-07-07 6:32 ` Alexey Zaytsev
2011-07-07 6:48 ` Eric Dumazet
2011-07-07 7:45 ` Alexey Zaytsev
2011-07-07 9:20 ` Eric Dumazet
2011-07-07 9:34 ` Alexey Zaytsev
2011-07-07 9:37 ` Alexey Zaytsev
2011-07-07 9:43 ` Alexey Zaytsev
2011-07-07 9:52 ` Eric Dumazet
2011-07-05 4:21 ` Eric Dumazet
2011-07-04 14:00 ` Eric Dumazet
2011-07-04 14:31 ` Michael Büsch
2011-07-04 14:45 ` Eric Dumazet
2011-07-04 14:51 ` Michael Büsch
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=20110706181258.57b3c112@maggie \
--to=m@bues.ch \
--cc=akpm@linux-foundation.org \
--cc=alexey.zaytsev@gmail.com \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jolt@tuxbox.org \
--cc=mb@bu3sch.de \
--cc=nbd@openwrt.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=pp@ee.oulu.fi \
--cc=zambrano@broadcom.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.