Skip to content

Commit

Permalink
measure buffer that is used (initrd) GH #9
Browse files Browse the repository at this point in the history
  • Loading branch information
neusdan committed Jan 1, 2016
1 parent 422617f commit 7690021
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions grub-core/loader/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,6 @@ grub_initrd_close (struct grub_linux_initrd_context *initrd_ctx)
return;
for (i = 0; i < initrd_ctx->nfiles; i++)
{

/* Begin TCG Extension */
grub_TPM_measure_file( initrd_ctx->components[i].file->name, TPM_LOADED_FILES_PCR );
/* End TCG Extension */

grub_free (initrd_ctx->components[i].newc_name);
grub_file_close (initrd_ctx->components[i].file);
}
Expand Down Expand Up @@ -297,6 +292,10 @@ grub_initrd_load (struct grub_linux_initrd_context *initrd_ctx,
grub_initrd_close (initrd_ctx);
return grub_errno;
}
/* Begin TCG Extension */
grub_TPM_measure_buffer( ptr, cursize, TPM_LOADED_FILES_PCR );
/* End TCG Extension */

ptr += cursize;
}
if (newc)
Expand Down

0 comments on commit 7690021

Please sign in to comment.