Commit d49f707a authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Sync the complete sign area on smp_sync_sign

parent f3617f9d
......@@ -159,7 +159,7 @@ smp_sync_sign(const struct smp_signctx *ctx)
int i;
/* XXX: round to pages */
i = msync((void*)ctx->ss, ctx->ss->length + SHA256_LEN, MS_SYNC);
i = msync((void*)ctx->ss, ctx->ss->length + SMP_SIGN_SPACE, MS_SYNC);
if (i && 0)
fprintf(stderr, "SyncSign(%p %s) = %d %s\n",
ctx->ss, ctx->id, i, strerror(errno));
......
......@@ -111,6 +111,8 @@ struct smp_sign {
char ident[8];
uint32_t unique;
uint64_t mapped;
/* The length field is the length of the signed data only
* (does not include struct smp_sign) */
uint64_t length; /* NB: Must be last */
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment