verity: remove BUG_ON alignment check
The buffer passed to the compute_hash needs to be aligned when dm-bht.c
is used in the kernel. dm-bht.c is also used by the dm-verity user-space
code where you don't need aligned buffers.
Remove the BUG_ON for now. Eventually, re-enable once we've modified
the user-space code to use aligned buffers (or once we stop use
common code).
BUG=none
TEST=Ran unittests.
Change-Id: I854c785bcff6994612c373a783fff6bdc93c2afa
R=ojn@chromium.org,wad@chromium.org
Review URL: http://codereview.chromium.org/6726018
diff --git a/dm-bht.c b/dm-bht.c
index 71e3b04..dd57e12 100644
--- a/dm-bht.c
+++ b/dm-bht.c
@@ -105,7 +105,11 @@
* offset_into_page + length < page_size
* For now just check that block is page-aligned.
*/
- BUG_ON(!IS_ALIGNED((uintptr_t)block, PAGE_SIZE));
+ /*
+ * TODO(msb): Re-enable once user-space code is modified to use
+ * aligned buffers.
+ * BUG_ON(!IS_ALIGNED((uintptr_t)block, PAGE_SIZE));
+ */
sg_init_table(&sg, 1);
sg_set_buf(&sg, block, PAGE_SIZE);