Messages in this thread | | | Subject | Re: [PATCH 2.2] i386/dmi_scan updates | From | Jean Delvare <> | Date | Sat, 5 Oct 2002 22:19:06 CEST |
| |
>> - Stop skipping DMI entries when type is less than those of the >> previous entry. I could see no reason for doing this.
> Fixes crashes on certain vendors hardware. It shouldnt be > needed, however in the real world it proves to be a > rather essential heuristic. Dmidecode doesnt do it > because in userspace I dont mind spewing crap to show a > user a problem.
This check has been removed in 2.4 though. I think it was needed when we were trusting the structure count (see version 1.1 of dmidecode) instead of also verifying we weren't running of the table. Now that this check is done, I don't see why we would need the heuristic anymore.
(...)
>> - Remove senseless tests in dump (debug) code.
> These are also not senseless. Not everyone seems to use > the proper null string, sometimes you get spaces too
I don't see how the check would protect us against anything. It only looks if the first char is a null byte or a white space. This is not very helpful, since on one hand such strings may be valid, and on the other hand invalid strings may pass the test.
Also note that the white spaces check has been removed from 2.4.
> The technical changes look right, and in theory all of it > does. In practice I'd rather see a patch that kept the > rule of thumb about order and the ' ' check
A better way IMHO would be to "secure" the dmi_string function. If we can ensure it will always return a safe (that is, null terminated) string, we are done. Agreed?
Jean Delvare
___________________________________ Webmail Nerim, http://www.nerim.net/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |