From: Ben Hutchings <bhutchings@solarflare.com>
To: Zachary Amsden <zach@vmware.com>
Cc: "Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
Qicheng Christopher Li <chrisl@vmware.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"arvidjaar@mail.ru" <arvidjaar@mail.ru>,
"Allan, Bruce W" <bruce.w.allan@intel.com>,
"jeff@garzik.org" <jeff@garzik.org>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
"Ronciak, John" <john.ronciak@intel.com>,
"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@intel.com>,
Pratap Subrahmanyam <pratap@vmware.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"mm-commits@vger.kernel.org" <mm-commits@vger.kernel.org>
Subject: Re: + e1000e-prevent-corruption-of-eeprom-nvm.patch added to -mm tree
Date: Wed, 3 Sep 2008 01:44:56 +0100 [thread overview]
Message-ID: <20080903004454.GV7908@solarflare.com> (raw)
In-Reply-To: <1220398304.32688.163.camel@bodhitayantram.eng.vmware.com>
Zachary Amsden wrote:
> On Tue, 2008-09-02 at 14:58 -0700, Brandeburg, Jesse wrote:
[...]
> > VMWare issues really do not apply to the Linux kernel, and unless the
> > architecture of ethtool->ioctl->rtnl->e1000e has changed without me
> > noticing. In that case every driver that used ethtool would be broken.
>
> No, any drivers that have a state machine consisting of a base register
> that is used to index which datum is read from device EEPROM by the data
> register would be broken.
>
> This is not a VMware issue, its a fundamental hardware synchronization
> issue caused by the dependence of data read/write on a device register.
> Does the net layer protect against e1000 issuing simultaneous EEPROM
> read / write?
All ethtool commands are serialised by the RTNL as Jesse said above.
> I have no idea. It probably should. Should the driver
> take extra precautions of its own to ensure this on non hot-paths, to
> avoid corrupting EEPROM memory and resulting in a non-functional NIC?
>
> Absolutely.
>
> From casual inspection it looks like set_mtu is done under dev_baselock, while ethtool is done under rtnl_lock.
>
> Setting the MTU internally reads the EEPROM, which could contend with and corrupt and eeprom operations.
No, MTU changes are done by another ioctl which takes the RTNL. It's
not hard to find this stuff in net/core/dev.c.
Please do VMware driver developers a favour and pay a little more
attention to such subtleties.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2008-09-03 0:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200809021919.m82JJweC008488@imap1.linux-foundation.org>
2008-09-02 21:58 ` + e1000e-prevent-corruption-of-eeprom-nvm.patch added to -mm tree Brandeburg, Jesse
2008-09-02 23:31 ` Zachary Amsden
2008-09-03 0:32 ` + e1000e-prevent-corruption-of-eeprom-nvm.patch added to -mmtree Brandeburg, Jesse
2008-09-03 2:48 ` Christopher Li
2008-09-03 8:17 ` Zachary Amsden
2008-09-03 8:24 ` David Miller
2008-09-03 17:04 ` Andrey Borzenkov
2008-09-09 2:20 ` Allan, Bruce W
2008-09-03 0:44 ` Ben Hutchings [this message]
2008-09-03 3:04 ` + e1000e-prevent-corruption-of-eeprom-nvm.patch added to -mm tree Christopher Li
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=20080903004454.GV7908@solarflare.com \
--to=bhutchings@solarflare.com \
--cc=akpm@linux-foundation.org \
--cc=arvidjaar@mail.ru \
--cc=bruce.w.allan@intel.com \
--cc=chrisl@vmware.com \
--cc=jeff@garzik.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=john.ronciak@intel.com \
--cc=mm-commits@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=pratap@vmware.com \
--cc=zach@vmware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).