Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Side by Side Diff: drivers/md/dm-verity.c

Issue 6835032: CHROMIUM: verity: don't call page_address on unmapped highmem pages (Closed) Base URL: http://git.chromium.org/git/kernel-next.git@chromeos-2.6.37
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Originally based on dm-crypt.c, 2 * Originally based on dm-crypt.c,
3 * Copyright (C) 2003 Christophe Saout <christophe@saout.de> 3 * Copyright (C) 2003 Christophe Saout <christophe@saout.de>
4 * Copyright (C) 2004 Clemens Fruhwirth <clemens@endorphin.org> 4 * Copyright (C) 2004 Clemens Fruhwirth <clemens@endorphin.org>
5 * Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved. 5 * Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved.
6 * Copyright (C) 2010 The Chromium OS Authors <chromium-os-dev@chromium.org> 6 * Copyright (C) 2010 The Chromium OS Authors <chromium-os-dev@chromium.org>
7 * All Rights Reserved. 7 * All Rights Reserved.
8 * 8 *
9 * This file is released under the GPL. 9 * This file is released under the GPL.
10 * 10 *
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 for (idx = bio->bi_idx; idx < bio->bi_vcnt; idx++) { 671 for (idx = bio->bi_idx; idx < bio->bi_vcnt; idx++) {
672 struct bio_vec *bv = bio_iovec_idx(bio, idx); 672 struct bio_vec *bv = bio_iovec_idx(bio, idx);
673 673
674 VERITY_BUG_ON(bv->bv_offset % VERITY_BLOCK_SIZE); 674 VERITY_BUG_ON(bv->bv_offset % VERITY_BLOCK_SIZE);
675 VERITY_BUG_ON(bv->bv_len % VERITY_BLOCK_SIZE); 675 VERITY_BUG_ON(bv->bv_len % VERITY_BLOCK_SIZE);
676 676
677 DMDEBUG("Updating hash for block %u", block); 677 DMDEBUG("Updating hash for block %u", block);
678 678
679 /* TODO(msb) handle case where multiple blocks fit in a page */ 679 /* TODO(msb) handle case where multiple blocks fit in a page */
680 r = dm_bht_verify_block(&vc->bht, block, 680 r = dm_bht_verify_block(&vc->bht, block,
681 » » » » » page_address(bv->bv_page)); 681 » » » » » bv->bv_page, bv->bv_offset);
682 /* dm_bht functions aren't expected to return errno friendly 682 /* dm_bht functions aren't expected to return errno friendly
683 * values. They are converted here for uniformity. 683 * values. They are converted here for uniformity.
684 */ 684 */
685 if (r > 0) { 685 if (r > 0) {
686 DMERR("Pending data for block %u seen at verify", 686 DMERR("Pending data for block %u seen at verify",
687 block); 687 block);
688 r = -EBUSY; 688 r = -EBUSY;
689 goto bad_state; 689 goto bad_state;
690 } 690 }
691 if (r < 0) { 691 if (r < 0) {
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 dm_unregister_target(&verity_target); 1374 dm_unregister_target(&verity_target);
1375 kmem_cache_destroy(_verity_io_pool); 1375 kmem_cache_destroy(_verity_io_pool);
1376 } 1376 }
1377 1377
1378 module_init(dm_verity_init); 1378 module_init(dm_verity_init);
1379 module_exit(dm_verity_exit); 1379 module_exit(dm_verity_exit);
1380 1380
1381 MODULE_AUTHOR("The Chromium OS Authors <chromium-os-dev@chromium.org>"); 1381 MODULE_AUTHOR("The Chromium OS Authors <chromium-os-dev@chromium.org>");
1382 MODULE_DESCRIPTION(DM_NAME " target for transparent disk integrity checking"); 1382 MODULE_DESCRIPTION(DM_NAME " target for transparent disk integrity checking");
1383 MODULE_LICENSE("GPL"); 1383 MODULE_LICENSE("GPL");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698