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

Side by Side Diff: dm-bht.h

Issue 6695038: verity: do all hashing in dm-bht.c (Closed) Base URL: http://git.chromium.org/git/dm-verity.git@master
Patch Set: Fix per review. Created 9 years, 9 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
« no previous file with comments | « no previous file | dm-bht.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 The Chromium OS Authors <chromium-os-dev@chromium.org> 2 * Copyright (C) 2010 The Chromium OS Authors <chromium-os-dev@chromium.org>
3 * 3 *
4 * Device-Mapper block hash tree interface. 4 * Device-Mapper block hash tree interface.
5 * See Documentation/device-mapper/dm-bht.txt for details. 5 * See Documentation/device-mapper/dm-bht.txt for details.
6 * 6 *
7 * This file is released under the GPLv2. 7 * This file is released under the GPLv2.
8 */ 8 */
9 #ifndef __LINUX_DM_BHT_H 9 #ifndef __LINUX_DM_BHT_H
10 #define __LINUX_DM_BHT_H 10 #define __LINUX_DM_BHT_H
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void dm_bht_set_read_cb(struct dm_bht *bht, dm_bht_callback read_cb); 128 void dm_bht_set_read_cb(struct dm_bht *bht, dm_bht_callback read_cb);
129 void dm_bht_set_write_cb(struct dm_bht *bht, dm_bht_callback write_cb); 129 void dm_bht_set_write_cb(struct dm_bht *bht, dm_bht_callback write_cb);
130 void dm_bht_set_verify_mode(struct dm_bht *bht, int verify_mode); 130 void dm_bht_set_verify_mode(struct dm_bht *bht, int verify_mode);
131 int dm_bht_set_root_hexdigest(struct dm_bht *bht, const u8 *hexdigest); 131 int dm_bht_set_root_hexdigest(struct dm_bht *bht, const u8 *hexdigest);
132 int dm_bht_root_hexdigest(struct dm_bht *bht, u8 *hexdigest, int available); 132 int dm_bht_root_hexdigest(struct dm_bht *bht, u8 *hexdigest, int available);
133 133
134 /* Functions for loading in data from disk for verification */ 134 /* Functions for loading in data from disk for verification */
135 int dm_bht_populate(struct dm_bht *bht, void *read_cb_ctx, 135 int dm_bht_populate(struct dm_bht *bht, void *read_cb_ctx,
136 unsigned int block_index); 136 unsigned int block_index);
137 int dm_bht_verify_block(struct dm_bht *bht, unsigned int block_index, 137 int dm_bht_verify_block(struct dm_bht *bht, unsigned int block_index,
138 » » » u8 *digest, unsigned int digest_len); 138 » » » const void *buf);
139 139
140 /* Functions for creating struct dm_bhts on disk. A newly created dm_bht 140 /* Functions for creating struct dm_bhts on disk. A newly created dm_bht
141 * should not be directly used for verification. (It should be repopulated.) 141 * should not be directly used for verification. (It should be repopulated.)
142 * In addition, these functions aren't meant to be called in parallel. 142 * In addition, these functions aren't meant to be called in parallel.
143 */ 143 */
144 int dm_bht_compute(struct dm_bht *bht, void *read_cb_ctx); 144 int dm_bht_compute(struct dm_bht *bht, void *read_cb_ctx);
145 int dm_bht_sync(struct dm_bht *bht, void *write_cb_ctx); 145 int dm_bht_sync(struct dm_bht *bht, void *write_cb_ctx);
146 int dm_bht_store_block(struct dm_bht *bht, unsigned int block_index, 146 int dm_bht_store_block(struct dm_bht *bht, unsigned int block_index,
147 u8 *block_data); 147 u8 *block_data);
148 int dm_bht_zeroread_callback(void *ctx, sector_t start, u8 *dst, sector_t count, 148 int dm_bht_zeroread_callback(void *ctx, sector_t start, u8 *dst, sector_t count,
149 struct dm_bht_entry *entry); 149 struct dm_bht_entry *entry);
150 void dm_bht_read_completed(struct dm_bht_entry *entry, int status); 150 void dm_bht_read_completed(struct dm_bht_entry *entry, int status);
151 void dm_bht_write_completed(struct dm_bht_entry *entry, int status); 151 void dm_bht_write_completed(struct dm_bht_entry *entry, int status);
152 #endif /* __LINUX_DM_BHT_H */ 152 #endif /* __LINUX_DM_BHT_H */
OLDNEW
« no previous file with comments | « no previous file | dm-bht.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698