siderolabs / go-smbios

Mozilla Public License 2.0
14 stars 9 forks source link

EOF in `next` should return the already parsed, valid structures #16

Closed michaelbeaumont closed 2 months ago

michaelbeaumont commented 2 months ago

Due to changes in the latest LTS and thus in v1.7.6 the DMI sysfs file will EOF where previously it would continue on and be decoded without error. This currently leads to errors, for example at:

https://github.com/siderolabs/go-smbios/blob/c5267640be317efd9cbbe936ab78b2a49c757edf/smbios/internal/github.com/digitalocean/go-smbios/smbios/decoder.go#L134

which with Talos manifests as:

controller failed {"component": "controller-runtime", "controller": "hardware.SystemInfoController", "error": "failed to decode structures: next error: error reading header: EOF"}

which can lead to errors decrypting partitions encrypted in v1.7.5.

I think we can do what Linux does in this case and be lenient and just return the structures we've already parsed instead of nil here.

smira commented 2 months ago

So my understanding is that DMI file which was previously not present would be present as Linux is more tolerant?