fix: fwdb: ignore MCEdb versions where an official Intel version exists (fixes #430)

master
Stéphane Lesimple 8 months ago
parent a6c943d38f
commit b68ebe67f2
  1. 47
      spectre-meltdown-checker.sh

@ -964,6 +964,9 @@ update_fwdb()
{
echo "# Spectre & Meltdown Checker";
echo "# %%% MCEDB v$dbversion";
# ensure the official Intel DB always has precedence over mcedb, even if mcedb has seen a more recent fw
sqlite3 "$mcedb_tmp" "DELETE FROM Intel WHERE origin!='intel' AND cpuid IN (SELECT cpuid FROM Intel WHERE origin='intel' GROUP BY cpuid ORDER BY cpuid ASC);"
# we'll use the more recent fw for Intel and AMD
sqlite3 "$mcedb_tmp" "SELECT '# I,0x'||t1.cpuid||',0x'||MAX(t1.version)||','||t1.yyyymmdd FROM Intel AS t1 LEFT OUTER JOIN Intel AS t2 ON t2.cpuid=t1.cpuid AND t2.yyyymmdd > t1.yyyymmdd WHERE t2.yyyymmdd IS NULL GROUP BY t1.cpuid ORDER BY t1.cpuid ASC;" | grep -v '^# .,0x00000000,';
sqlite3 "$mcedb_tmp" "SELECT '# A,0x'||t1.cpuid||',0x'||MAX(t1.version)||','||t1.yyyymmdd FROM AMD AS t1 LEFT OUTER JOIN AMD AS t2 ON t2.cpuid=t1.cpuid AND t2.yyyymmdd > t1.yyyymmdd WHERE t2.yyyymmdd IS NULL GROUP BY t1.cpuid ORDER BY t1.cpuid ASC;" | grep -v '^# .,0x00000000,';
} > "$mcedb_cache"
@ -5847,8 +5850,8 @@ exit 0 # ok
# I,0x00000633,0x00000036,19980923
# I,0x00000634,0x00000037,19980923
# I,0x00000650,0x00000045,19990525
# I,0x00000651,0x00000042,19990525
# I,0x00000652,0x0000002D,19990518
# I,0x00000651,0x00000040,19990525
# I,0x00000652,0x0000002C,19990517
# I,0x00000653,0x00000010,19990628
# I,0x00000660,0x0000000A,19990505
# I,0x00000665,0x00000003,19990505
@ -5859,8 +5862,8 @@ exit 0 # ok
# I,0x00000672,0x00000038,19990922
# I,0x00000673,0x0000002E,19990910
# I,0x00000680,0x00000017,19990610
# I,0x00000681,0x00000014,19991209
# I,0x00000683,0x00000014,20010206
# I,0x00000681,0x00000011,19990921
# I,0x00000683,0x00000008,19991015
# I,0x00000686,0x00000008,20000505
# I,0x0000068A,0x00000005,20001207
# I,0x00000690,0x00000004,20000206
@ -5883,8 +5886,8 @@ exit 0 # ok
# I,0x000006E0,0x00000008,20050215
# I,0x000006E1,0x0000000C,20050413
# I,0x000006E4,0x00000026,20050816
# I,0x000006E8,0x0000003C,20060208
# I,0x000006EC,0x0000005B,20070208
# I,0x000006E8,0x00000039,20051115
# I,0x000006EC,0x00000059,20060912
# I,0x000006F0,0x00000005,20050818
# I,0x000006F1,0x00000012,20051129
# I,0x000006F2,0x0000005D,20101002
@ -5894,7 +5897,7 @@ exit 0 # ok
# I,0x000006F7,0x0000006B,20101002
# I,0x000006F9,0x00000084,20061012
# I,0x000006FA,0x00000095,20101002
# I,0x000006FB,0x000000C1,20111004
# I,0x000006FB,0x000000BC,20101003
# I,0x000006FD,0x000000A4,20101002
# I,0x00000F00,0xFFFF0001,20000130
# I,0x00000F01,0xFFFF0007,20000404
@ -5908,7 +5911,7 @@ exit 0 # ok
# I,0x00000F09,0x00000008,20010104
# I,0x00000F0A,0x00000015,20020821
# I,0x00000F11,0x0000000A,20030729
# I,0x00000F12,0x0000002F,20030502
# I,0x00000F12,0x0000002E,20030502
# I,0x00000F13,0x00000005,20030508
# I,0x00000F20,0x00000001,20010423
# I,0x00000F21,0x00000003,20010529
@ -5941,23 +5944,23 @@ exit 0 # ok
# I,0x00000F62,0x0000000F,20051215
# I,0x00000F63,0x00000005,20051010
# I,0x00000F64,0x00000004,20051223
# I,0x00000F65,0x0000000B,20070510
# I,0x00000F65,0x00000008,20060426
# I,0x00000F66,0x0000001B,20060310
# I,0x00000F68,0x00000009,20060714
# I,0x00001632,0x00000002,19980610
# I,0x00010650,0x00000002,20060513
# I,0x00010660,0x00000004,20060612
# I,0x00010661,0x00000045,20101004
# I,0x00010661,0x00000044,20101004
# I,0x00010670,0x00000005,20070209
# I,0x00010671,0x00000106,20070329
# I,0x00010674,0x84050100,20070726
# I,0x00010676,0x00000612,20150802
# I,0x00010677,0x0000070D,20150802
# I,0x0001067A,0x00000A0E,20150729
# I,0x00010676,0x0000060F,20100929
# I,0x00010677,0x0000070A,20100929
# I,0x0001067A,0x00000A0B,20100928
# I,0x000106A0,0xFFFF001A,20071128
# I,0x000106A1,0xFFFF000B,20080220
# I,0x000106A2,0xFFFF0019,20080714
# I,0x000106A4,0x00000013,20150630
# I,0x000106A4,0x00000012,20130621
# I,0x000106A5,0x0000001D,20180511
# I,0x000106C0,0x00000007,20070824
# I,0x000106C1,0x00000109,20071203
@ -5965,7 +5968,7 @@ exit 0 # ok
# I,0x000106C9,0x00000007,20090213
# I,0x000106CA,0x00000107,20090825
# I,0x000106D0,0x00000005,20071204
# I,0x000106D1,0x0000002A,20150803
# I,0x000106D1,0x00000029,20100930
# I,0x000106E0,0xFFFF0022,20090116
# I,0x000106E1,0xFFFF000D,20090206
# I,0x000106E2,0xFFFF0011,20090924
@ -6017,7 +6020,7 @@ exit 0 # ok
# I,0x00030672,0x0000022E,20140401
# I,0x00030673,0x83290100,20190916
# I,0x00030678,0x00000838,20190422
# I,0x00030679,0x0000090D,20190710
# I,0x00030679,0x0000090C,20190423
# I,0x000306A0,0x00000007,20110407
# I,0x000306A2,0x0000000C,20110725
# I,0x000306A4,0x00000007,20110908
@ -6070,7 +6073,7 @@ exit 0 # ok
# I,0x00050652,0x80000037,20170502
# I,0x00050653,0x0100015C,20210526
# I,0x00050654,0x02006C0A,20210616
# I,0x00050655,0x03000012,20190412
# I,0x00050655,0x03000010,20181116
# I,0x00050656,0x0400320A,20210813
# I,0x00050657,0x0500320A,20210813
# I,0x0005065A,0x86002302,20210416
@ -6086,12 +6089,12 @@ exit 0 # ok
# I,0x000506C2,0x00000014,20180511
# I,0x000506C8,0x90011010,20160323
# I,0x000506C9,0x00000046,20210510
# I,0x000506CA,0x00000022,20210622
# I,0x000506CA,0x00000024,20210510
# I,0x000506D1,0x00000102,20150605
# I,0x000506E0,0x00000018,20141119
# I,0x000506E1,0x0000002A,20150602
# I,0x000506E2,0x0000002E,20150815
# I,0x000506E3,0x000000F0,20211112
# I,0x000506E3,0x000000EC,20210429
# I,0x000506E8,0x00000034,20160710
# I,0x000506F0,0x00000010,20160607
# I,0x000506F1,0x00000036,20210510
@ -6102,7 +6105,7 @@ exit 0 # ok
# I,0x000606A0,0x80000031,20200308
# I,0x000606A4,0x0B000280,20200817
# I,0x000606A5,0x0C0002F0,20210308
# I,0x000606A6,0x0D000332,20211217
# I,0x000606A6,0x0D000331,20211203
# I,0x000606E0,0x0000000B,20161104
# I,0x000606E1,0x00000108,20190423
# I,0x000706A0,0x00000026,20170712
@ -6120,7 +6123,7 @@ exit 0 # ok
# I,0x000806A0,0x00000010,20190507
# I,0x000806A1,0x0000002D,20210902
# I,0x000806C0,0x00000068,20200402
# I,0x000806C1,0x0000009C,20211026
# I,0x000806C1,0x0000009A,20210806
# I,0x000806C2,0x00000022,20210716
# I,0x000806D0,0x00000050,20201217
# I,0x000806D1,0x0000003C,20210716
@ -6141,7 +6144,7 @@ exit 0 # ok
# I,0x000906A3,0x0000041B,20220308
# I,0x000906A4,0x0000041B,20220308
# I,0x000906C0,0x2400001F,20210809
# I,0x000906E9,0x000000F0,20211112
# I,0x000906E9,0x000000EC,20210429
# I,0x000906EA,0x000000EC,20210428
# I,0x000906EB,0x000000EC,20210428
# I,0x000906EC,0x000000EC,20210428

Loading…
Cancel
Save