aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadhri Jagan Sridharan <Badhri@google.com>2016-02-08 16:28:43 -0800
committerBadhri Jagan Sridharan <Badhri@google.com>2016-02-24 13:07:44 -0800
commit7901ce3f41363fc5642bdd199955c2d49230dd47 (patch)
tree24490454656e89a33046aa95a276ff524a3a34a2
parentf3e815cee7a35fe04f5aad21a9a181d31ff86e07 (diff)
downloadhikey-linaro-7901ce3f41363fc5642bdd199955c2d49230dd47.tar.gz
ANDROID: dm-android-verity: Rebase on top of 4.1
Following CLs in upstream causes minor changes to dm-android-verity target. 1. keys: change asymmetric keys to use common hash definitions 2. block: Abstract out bvec iterator Rebase dm-android-verity on top of these changes. Bug: 27175947 Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com> Change-Id: Icfdc3e7b3ead5de335a059cade1aca70414db415
-rw-r--r--drivers/md/dm-android-verity.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/dm-android-verity.c b/drivers/md/dm-android-verity.c
index c77c9fa7a962..aeb5045830d9 100644
--- a/drivers/md/dm-android-verity.c
+++ b/drivers/md/dm-android-verity.c
@@ -75,7 +75,7 @@ static int table_extract_mpi_array(struct public_key_signature *pks,
}
static struct public_key_signature *table_make_digest(
- enum pkey_hash_algo hash,
+ enum hash_algo hash,
const void *table,
unsigned long table_len)
{
@@ -88,7 +88,7 @@ static struct public_key_signature *table_make_digest(
/* Allocate the hashing algorithm we're going to need and find out how
* big the hash operational data will be.
*/
- tfm = crypto_alloc_shash(pkey_hash_algo[hash], 0, 0);
+ tfm = crypto_alloc_shash(hash_algo_name[hash], 0, 0);
if (IS_ERR(tfm))
return ERR_CAST(tfm);
@@ -143,7 +143,7 @@ static int read_block_dev(struct bio_read *payload, struct block_device *bdev,
}
bio->bi_bdev = bdev;
- bio->bi_sector = offset;
+ bio->bi_iter.bi_sector = offset;
payload->page_io = kzalloc(sizeof(struct page *) *
payload->number_of_pages, GFP_KERNEL);
@@ -505,7 +505,7 @@ static int verify_verity_signature(char *key_id,
key = key_ref_to_ptr(key_ref);
- pks = table_make_digest(PKEY_HASH_SHA256,
+ pks = table_make_digest(HASH_ALGO_SHA256,
(const void *)metadata->verity_table,
le32_to_cpu(metadata->header->table_length));
@@ -569,7 +569,7 @@ static int android_verity_ctr(struct dm_target *ti, unsigned argc, char **argv)
u32 data_block_size;
unsigned int major, minor,
no_of_args = VERITY_TABLE_ARGS + 2 + VERITY_TABLE_OPT_FEC_ARGS;
- struct fec_header fec;
+ struct fec_header uninitialized_var(fec);
struct fec_ecc_metadata uninitialized_var(ecc);
char buf[FEC_ARG_LENGTH], *buf_ptr;
unsigned long long tmpll;