From: Dinh Nguyen <dinguyen@altera.com>
To: Vince Bridgers <vbridgers2013@gmail.com>
Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org,
peppe.cavallaro@st.com, robh+dt@kernel.org, pawel.moll@arm.com,
mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
galak@codeaurora.org, rayagond@vayavyalabs.com
Subject: Re: [PATCH net-next v2 0/2] stmmac: fix kernel crashes for jumbo frames
Date: Tue, 14 Jan 2014 09:52:50 -0600 [thread overview]
Message-ID: <1389714770.10673.6.camel@linux-builds1> (raw)
In-Reply-To: <1389710409-14106-1-git-send-email-vbridgers2013@gmail.com>
Hi Vince
On Tue, 2014-01-14 at 08:40 -0600, Vince Bridgers wrote:
> These patches address two kernel crashes seen when using jumbo frames on
> the Synopsys stmmac driver, and adds device tree configurability for the
> maximum mtu. The Synopsys emac fifo sizes can be configured when a logic
> design is synthesized, but does not provide a way for a driver to query the
> exact fifo size.
>
> The crashes seen were due to two issues.
>
> 1) The dma buffer size was being set after the dma buffers were allocated.
> This caused a crash when changing the mtu since it was possible the buffers
> would subsequently be freed using an incorrect dma buffer size. This could
> also cause kernel panics due to memory corruption since a large mtu size could
> have been configured, but the dma buffers were not sized accordingly.
>
> 2) Jumbo frames were being enabled by default, but the dma buffers were not
> sized accordingly. This caused memory corruption in the context of certain
> types of network traffic, leading to kernel panics.
>
> I've tested these changes using automated, reproducible testware. I can
> demonstrate the panics described before the fixes and show that the fixes
> address the problems described.
>
> Testing and improvements continue through the use of the mentioned automated
> and reproducible testware.
>
> Vince Bridgers
>
> Vince Bridgers (2):
> dts: Add a binding for Synopsys emac max-frame-size
> stmmac: Fix kernel crashes for jumbo frames
>
> Documentation/devicetree/bindings/net/stmmac.txt | 5 +++++
> drivers/net/ethernet/stmicro/stmmac/common.h | 4 +++-
> drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 7 ++-----
> .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 7 ++++++-
> .../net/ethernet/stmicro/stmmac/dwmac100_core.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++++++----
> .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 +++++
> include/linux/stmmac.h | 1 +
> 8 files changed, 30 insertions(+), 12 deletions(-)
What has changed since v1? A version log would be nice.
Thanks,
Dinh
WARNING: multiple messages have this Message-ID (diff)
From: Dinh Nguyen <dinguyen@altera.com>
To: Vince Bridgers <vbridgers2013@gmail.com>
Cc: <devicetree@vger.kernel.org>, <netdev@vger.kernel.org>,
<peppe.cavallaro@st.com>, <robh+dt@kernel.org>,
<pawel.moll@arm.com>, <mark.rutland@arm.com>,
<ijc+devicetree@hellion.org.uk>, <galak@codeaurora.org>,
<rayagond@vayavyalabs.com>
Subject: Re: [PATCH net-next v2 0/2] stmmac: fix kernel crashes for jumbo frames
Date: Tue, 14 Jan 2014 09:52:50 -0600 [thread overview]
Message-ID: <1389714770.10673.6.camel@linux-builds1> (raw)
In-Reply-To: <1389710409-14106-1-git-send-email-vbridgers2013@gmail.com>
Hi Vince
On Tue, 2014-01-14 at 08:40 -0600, Vince Bridgers wrote:
> These patches address two kernel crashes seen when using jumbo frames on
> the Synopsys stmmac driver, and adds device tree configurability for the
> maximum mtu. The Synopsys emac fifo sizes can be configured when a logic
> design is synthesized, but does not provide a way for a driver to query the
> exact fifo size.
>
> The crashes seen were due to two issues.
>
> 1) The dma buffer size was being set after the dma buffers were allocated.
> This caused a crash when changing the mtu since it was possible the buffers
> would subsequently be freed using an incorrect dma buffer size. This could
> also cause kernel panics due to memory corruption since a large mtu size could
> have been configured, but the dma buffers were not sized accordingly.
>
> 2) Jumbo frames were being enabled by default, but the dma buffers were not
> sized accordingly. This caused memory corruption in the context of certain
> types of network traffic, leading to kernel panics.
>
> I've tested these changes using automated, reproducible testware. I can
> demonstrate the panics described before the fixes and show that the fixes
> address the problems described.
>
> Testing and improvements continue through the use of the mentioned automated
> and reproducible testware.
>
> Vince Bridgers
>
> Vince Bridgers (2):
> dts: Add a binding for Synopsys emac max-frame-size
> stmmac: Fix kernel crashes for jumbo frames
>
> Documentation/devicetree/bindings/net/stmmac.txt | 5 +++++
> drivers/net/ethernet/stmicro/stmmac/common.h | 4 +++-
> drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 7 ++-----
> .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 7 ++++++-
> .../net/ethernet/stmicro/stmmac/dwmac100_core.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++++++----
> .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 +++++
> include/linux/stmmac.h | 1 +
> 8 files changed, 30 insertions(+), 12 deletions(-)
What has changed since v1? A version log would be nice.
Thanks,
Dinh
next prev parent reply other threads:[~2014-01-14 15:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 14:40 [PATCH net-next v2 0/2] stmmac: fix kernel crashes for jumbo frames Vince Bridgers
2014-01-14 14:40 ` [PATCH net-next v2 1/2] dts: Add a binding for Synopsys emac max-frame-size Vince Bridgers
2014-01-14 15:57 ` Dinh Nguyen
2014-01-14 15:57 ` Dinh Nguyen
2014-01-14 16:07 ` Florian Fainelli
2014-01-14 16:30 ` Vince Bridgers
2014-01-14 14:40 ` [PATCH net-next v2 2/2] stmmac: Fix kernel crashes for jumbo frames Vince Bridgers
2014-01-14 15:52 ` Dinh Nguyen [this message]
2014-01-14 15:52 ` [PATCH net-next v2 0/2] stmmac: fix " Dinh Nguyen
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=1389714770.10673.6.camel@linux-builds1 \
--to=dinguyen@altera.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=pawel.moll@arm.com \
--cc=peppe.cavallaro@st.com \
--cc=rayagond@vayavyalabs.com \
--cc=robh+dt@kernel.org \
--cc=vbridgers2013@gmail.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.