From: Jeff Garzik <jgarzik@pobox.com>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: netdev@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] 2.6.25-rc6 tulip_read_eeprom fixes for BUG 4420
Date: Fri, 28 Mar 2008 21:53:25 -0400 [thread overview]
Message-ID: <47EDA115.1020200@pobox.com> (raw)
In-Reply-To: <20080324052310.GC474@colo.lackof.org>
Grant Grundler wrote:
> Jeff,
> If "location" is > "addr_len" bits, the high bits of location would interfere
> with the READ_CMD sent to the eeprom controller.
>
> A patch was submitted to bug:
> http://bugzilla.kernel.org/show_bug.cgi?id=4420
>
> which simply truncated the "location", read whatever was in "location
> modulo addr_len", and returned that value. That avoids confusing the
> eeprom but seems like the wrong solution to me.
>
> Correct would be to not read beyond "1 << addr_len" address of the eeprom.
> I am submitting two changes to implement this:
> 1) tulip_read_eeprom will return zero (since we can't return -EINVAL)
> if this is attempted (defensive programming).
> 2) In tulip_core.c, fix the tulip_read_eeprom caller so they don't
> iterate past addr_len bits and make sure the entire tp->eeprom[]
> array is cleared.
>
> I konw we don't strictly need both. I would prefer both in the tree
> since it documents the issue and provides a second "defense" from
> the bug from creeping back in.
>
> thanks,
> grant
>
> Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
applied, after manually removing "Jeff," and "thanks, grant" lines from
the changelog ;-)
prev parent reply other threads:[~2008-03-29 1:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-24 5:23 [PATCH] 2.6.25-rc6 tulip_read_eeprom fixes for BUG 4420 Grant Grundler
2008-03-29 1:53 ` Jeff Garzik [this message]
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=47EDA115.1020200@pobox.com \
--to=jgarzik@pobox.com \
--cc=akpm@linux-foundation.org \
--cc=grundler@parisc-linux.org \
--cc=netdev@vger.kernel.org \
/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.