Commit c0078b2
committed
DasharoModulePkg/DasharoVariablesLib: fix non-deterministic measurements
This fixes "SecurityPkg: measure Dasharo variables before boot".
gRT->GetNextVariableName() doesn't return variables in any fixed order.
Seems like the order matches order in SMMSTORE. This means that
measuring variables while enumerating them will produce different
results depending on which variables were update last (setting a
variable in SMMSTORE is marking old entry as deleted and appending of a
new one). Sort list of variables that share the same GUID before
measuring any of them to impose a fixed order.
Also fix spacing in several places.
Signed-off-by: Sergii Dmytruk <[email protected]>1 parent 5aa3c86 commit c0078b2
File tree
1 file changed
+86
-4
lines changed- DasharoModulePkg/Library/DasharoVariablesLib
1 file changed
+86
-4
lines changedLines changed: 86 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
341 | 362 | | |
342 | 363 | | |
343 | 364 | | |
| |||
357 | 378 | | |
358 | 379 | | |
359 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
360 | 386 | | |
361 | | - | |
| 387 | + | |
362 | 388 | | |
363 | 389 | | |
364 | 390 | | |
365 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
366 | 400 | | |
367 | 401 | | |
368 | 402 | | |
| |||
373 | 407 | | |
374 | 408 | | |
375 | 409 | | |
376 | | - | |
| 410 | + | |
377 | 411 | | |
378 | 412 | | |
379 | 413 | | |
| |||
390 | 424 | | |
391 | 425 | | |
392 | 426 | | |
393 | | - | |
394 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
395 | 451 | | |
396 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
397 | 478 | | |
| 479 | + | |
398 | 480 | | |
399 | 481 | | |
400 | 482 | | |
| |||
0 commit comments