Bug 256502 - cpucontrol: fix extended signature matching code
Summary: cpucontrol: fix extended signature matching code
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: amd64 Any
: --- Affects Many People
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-09 15:49 UTC by Dan Nelson
Modified: 2021-06-09 21:00 UTC (History)
1 user (show)

See Also:


Attachments
diff (319 bytes, patch)
2021-06-09 15:49 UTC, Dan Nelson
no flags Details | Diff
diff in git format (491 bytes, patch)
2021-06-09 20:40 UTC, Dan Nelson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Nelson 2021-06-09 15:49:03 UTC
Created attachment 225663 [details]
diff

There's a bug in the code that checks to see if a firmware file matches the running cpu that results in firmware files with an extended signature table always matching.  Luckily the kernel ends up failing the update so no harm is done.  The attached patch makes the code always fail if no match is found, instead of accidentally falling through to the "matched:" label.
Comment 1 Mark Johnston freebsd_committer 2021-06-09 20:16:44 UTC
Looks right to me.  If you attach a full git commit with author, commit message, etc. I'll commit that directly, otherwise I'll commit with Submitted by:.
Comment 2 Dan Nelson 2021-06-09 20:40:14 UTC
Created attachment 225673 [details]
diff in git format

Something like this?  If that doesn't work, you can just do a normal commit with a submitted-by line.
Comment 3 Mark Johnston freebsd_committer 2021-06-09 21:00:38 UTC
(In reply to Dan Nelson from comment #2)
Sorry I didn't clarify, I meant a patch file generated with git format-patch.  This is fine though.