LWN.net Logo

Probable e1000e corruption culprit found (and 2.6.27.1 released)

Probable e1000e corruption culprit found (and 2.6.27.1 released)

Posted Oct 17, 2008 5:45 UTC (Fri) by Cato (subscriber, #7643)
In reply to: Probable e1000e corruption culprit found (and 2.6.27.1 released) by paragw
Parent article: Probable e1000e corruption culprit found (and 2.6.27.1 released)

A simple idea to safeguard the hardware interface is to ensure that immediately before writing any hardware registers (mapped to memory), the driver must also write a 'magic number' to a fixed location (and then clear it afterwards). This minimise the period during which a bug could stomp on the hardware although it probably doesn't eliminate it unless it can be run without any interrupts.

I am not a kernel programmer so the above may be implausible/impractical though.


(Log in to post comments)

Magic number safeguard

Posted Oct 21, 2008 8:55 UTC (Tue) by i3839 (guest, #31386) [Link]

Such protection mechanism, a specific sequence of actions that needs to be done before doing anything potentially dangerous should and can be implemented by the hardware, and is already done in e.g. some microcontrollers to protect flash/eprom from accidental writes.

It can't be done in software in the kernel. Or rather, it can, but is useless, because only functions that think they're going to do something dangerous do the checking, while in this case it's a regular cpu instruction that caused the corruption.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds