LWN.net Logo

Magic number safeguard

Magic number safeguard

Posted Oct 21, 2008 8:55 UTC (Tue) by i3839 (guest, #31386)
In reply to: Probable e1000e corruption culprit found (and 2.6.27.1 released) by Cato
Parent article: Probable e1000e corruption culprit found (and 2.6.27.1 released)

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.


(Log in to post comments)

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