-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Open
Copy link
Description
Summary
Replace the current simple checksum in SmbiosManager with Xorshift64starHasher for detecting direct table modifications.
Background
The current implementation uses a basic checksum to detect if the SMBIOS table was modified directly (bypassing the manager). While this works for most cases, it can miss edge cases where multiple fields change in ways that cancel each other out (e.g., FieldA: 1→0 and FieldB: 0→1 would produce the same checksum).
Proposed Change
Use the existing Xorshift64starHasher from protocol_db.rs:
let mut hasher = Xorshift64starHasher::default();
hasher.write(data);
cksum = hasher.finish() as u32; // truncate and keep bottom 32-bits of hash
Tasks
- Move Xorshift64starHasher to a shared location for general use (e.g., patina::base or a new patina::hash module)
- Update SmbiosManager to use the hasher instead of simple checksum
- Update any tests that verify checksum behavior
Related
This enhancement was identified during PR #1147 (TplMutex ownership refactor).
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Ready