[Skiboot] [PATCH 07/12] core/flash.c: Verify and measure resources
Claudio Carvalho
cclaudio at linux.vnet.ibm.com
Thu Aug 11 16:30:15 AEST 2016
This patch make calls to libstb in order to verify and measure resources
before they are returned to the caller.
Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
---
core/flash.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/core/flash.c b/core/flash.c
index 8c4485c..ead7761 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -24,6 +24,7 @@
#include <libflash/libffs.h>
#include <libflash/blocklevel.h>
#include <libflash/ecc.h>
+#include <libstb/stb.h>
struct flash {
struct list_node list;
@@ -586,6 +587,13 @@ static int flash_load_resource(enum resource_id id, uint32_t subid,
*len = size;
status = true;
+ /*
+ * Verify and measure the retrieved PNOR partition as part of the
+ * secure boot and trusted boot requirements
+ */
+ sb_verify(id, subid, buf);
+ tb_measure(id, subid, buf, *len);
+
out_free_ffs:
ffs_close(ffs);
out_unlock:
--
1.9.1
More information about the Skiboot
mailing list