Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
michaelbeaumont opened this issue Aug 22, 2024 · 1 comment · Fixed by #17
Closed

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

michaelbeaumont opened this issue Aug 22, 2024 · 1 comment · Fixed by #17
Assignees

Comments

@michaelbeaumont
Copy link
Contributor

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:

if _, err := io.ReadFull(d.br, d.b[:headerLen]); err != nil {

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.

michaelbeaumont added a commit to michaelbeaumont/go-smbios that referenced this issue Aug 22, 2024
Linux v6.6.39 stops decoding with EOF in this situation but maintains
the already decoded structures. See /drivers/firmware/dmi_scan.c

Fixes siderolabs#16
michaelbeaumont added a commit to michaelbeaumont/go-smbios that referenced this issue Aug 22, 2024
Linux v6.6.39 stops decoding with EOF in this situation but maintains
the already decoded structures. See /drivers/firmware/dmi_scan.c

Fixes siderolabs#16

Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
@smira
Copy link
Member

smira commented Aug 23, 2024

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

@smira smira self-assigned this Aug 23, 2024
smira added a commit to smira/talos that referenced this issue Aug 23, 2024
See siderolabs/go-smbios#16

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
smira added a commit to smira/talos that referenced this issue Sep 25, 2024
See siderolabs/go-smbios#16

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 5b4b649)
smira added a commit to smira/talos that referenced this issue Sep 25, 2024
See siderolabs/go-smbios#16

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 5b4b649)
smira added a commit to smira/talos that referenced this issue Sep 25, 2024
See siderolabs/go-smbios#16

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 5b4b649)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants