diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-22 00:06:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-22 00:06:51 -0400 |
commit | 8b53b57576292b92b27769f9e213df19b6e57786 (patch) | |
tree | cd851ce4fa71b2653f120d7f11a9c6cbcf311b19 /crypto/tcrypt.c | |
parent | ab7e79243746e2a9c5f00243e60108189c44c9eb (diff) | |
parent | 38cc1c3df77c1bb739a4766788eb9fa49f16ffdf (diff) |
Merge branch 'x86/urgent' into x86/pat
Conflicts:
arch/x86/mm/pageattr.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r-- | crypto/tcrypt.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 59821a22d752..66368022e0bf 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -481,21 +481,31 @@ next_one: | |||
481 | 481 | ||
482 | for (k = 0, temp = 0; k < template[i].np; k++) { | 482 | for (k = 0, temp = 0; k < template[i].np; k++) { |
483 | printk(KERN_INFO "page %u\n", k); | 483 | printk(KERN_INFO "page %u\n", k); |
484 | q = &axbuf[IDX[k]]; | 484 | q = &xbuf[IDX[k]]; |
485 | hexdump(q, template[i].tap[k]); | 485 | |
486 | n = template[i].tap[k]; | ||
487 | if (k == template[i].np - 1) | ||
488 | n += enc ? authsize : -authsize; | ||
489 | hexdump(q, n); | ||
486 | printk(KERN_INFO "%s\n", | 490 | printk(KERN_INFO "%s\n", |
487 | memcmp(q, template[i].result + temp, | 491 | memcmp(q, template[i].result + temp, n) ? |
488 | template[i].tap[k] - | ||
489 | (k < template[i].np - 1 || enc ? | ||
490 | 0 : authsize)) ? | ||
491 | "fail" : "pass"); | 492 | "fail" : "pass"); |
492 | 493 | ||
493 | for (n = 0; q[template[i].tap[k] + n]; n++) | 494 | q += n; |
494 | ; | 495 | if (k == template[i].np - 1 && !enc) { |
496 | if (memcmp(q, template[i].input + | ||
497 | temp + n, authsize)) | ||
498 | n = authsize; | ||
499 | else | ||
500 | n = 0; | ||
501 | } else { | ||
502 | for (n = 0; q[n]; n++) | ||
503 | ; | ||
504 | } | ||
495 | if (n) { | 505 | if (n) { |
496 | printk("Result buffer corruption %u " | 506 | printk("Result buffer corruption %u " |
497 | "bytes:\n", n); | 507 | "bytes:\n", n); |
498 | hexdump(&q[template[i].tap[k]], n); | 508 | hexdump(q, n); |
499 | } | 509 | } |
500 | 510 | ||
501 | temp += template[i].tap[k]; | 511 | temp += template[i].tap[k]; |