diff for duplicates of <20171027182303.GD10611@google.com> diff --git a/a/1.txt b/N1/1.txt index eaaa036..a954a72 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -110,9 +110,9 @@ Reviewed-by: Michael Halcrow <mhalcrow@google.com> > + skcipher_request_set_crypt(req, &src_sg, &dst_sg, derived_keysize, > NULL); > - res = crypto_skcipher_encrypt(req); -> - if (res = -EINPROGRESS || res = -EBUSY) { +> - if (res == -EINPROGRESS || res == -EBUSY) { > + err = crypto_skcipher_encrypt(req); -> + if (err = -EINPROGRESS || err = -EBUSY) { +> + if (err == -EINPROGRESS || err == -EBUSY) { > wait_for_completion(&ecr.completion); > - res = ecr.res; > + err = ecr.res; @@ -247,7 +247,7 @@ validation we should do on the key, if we're going to do any at all. > + key = find_and_lock_process_key(FSCRYPT_KEY_DESC_PREFIX, > + ctx->master_key_descriptor, > + derived_keysize, &payload); -> + if (key = ERR_PTR(-ENOKEY) && inode->i_sb->s_cop->key_prefix) { +> + if (key == ERR_PTR(-ENOKEY) && inode->i_sb->s_cop->key_prefix) { > + key = find_and_lock_process_key(inode->i_sb->s_cop->key_prefix, > + ctx->master_key_descriptor, > + derived_keysize, &payload); @@ -304,7 +304,7 @@ validation we should do on the key, if we're going to do any at all. > - inode->i_sb->s_cop->key_prefix, > - keysize); > - if (res2) { -> - if (res2 = -ENOKEY) +> - if (res2 == -ENOKEY) > - res = -ENOKEY; > - goto out; > - } @@ -331,7 +331,7 @@ validation we should do on the key, if we're going to do any at all. > goto out; > > if (S_ISREG(inode->i_mode) && -> crypt_info->ci_data_mode = FSCRYPT_MODE_AES_128_CBC) { +> crypt_info->ci_data_mode == FSCRYPT_MODE_AES_128_CBC) { > - res = init_essiv_generator(crypt_info, raw_key, keysize); > + res = init_essiv_generator(crypt_info, derived_key, > + derived_keysize); @@ -339,7 +339,7 @@ validation we should do on the key, if we're going to do any at all. > pr_debug("%s: error %d (inode %lu) allocating essiv tfm\n", > __func__, res, inode->i_ino); > @@ -361,7 +374,7 @@ int fscrypt_get_encryption_info(struct inode *inode) -> if (res = -ENOKEY) +> if (res == -ENOKEY) > res = 0; > put_crypt_info(crypt_info); > - kzfree(raw_key); diff --git a/a/content_digest b/N1/content_digest index 2f836d2..c27d05a 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,7 +2,7 @@ "ref\020171023214058.128121-5-ebiggers3@gmail.com\0" "From\0Michael Halcrow <mhalcrow@google.com>\0" "Subject\0Re: [RFC PATCH 04/25] fscrypt: refactor finding and deriving key\0" - "Date\0Fri, 27 Oct 2017 18:23:03 +0000\0" + "Date\0Fri, 27 Oct 2017 11:23:03 -0700\0" "To\0Eric Biggers <ebiggers3@gmail.com>\0" "Cc\0linux-fscrypt@vger.kernel.org" linux-fsdevel@vger.kernel.org @@ -132,9 +132,9 @@ "> +\tskcipher_request_set_crypt(req, &src_sg, &dst_sg, derived_keysize,\n" "> \t\t\t\t NULL);\n" "> -\tres = crypto_skcipher_encrypt(req);\n" - "> -\tif (res = -EINPROGRESS || res = -EBUSY) {\n" + "> -\tif (res == -EINPROGRESS || res == -EBUSY) {\n" "> +\terr = crypto_skcipher_encrypt(req);\n" - "> +\tif (err = -EINPROGRESS || err = -EBUSY) {\n" + "> +\tif (err == -EINPROGRESS || err == -EBUSY) {\n" "> \t\twait_for_completion(&ecr.completion);\n" "> -\t\tres = ecr.res;\n" "> +\t\terr = ecr.res;\n" @@ -269,7 +269,7 @@ "> +\tkey = find_and_lock_process_key(FSCRYPT_KEY_DESC_PREFIX,\n" "> +\t\t\t\t\tctx->master_key_descriptor,\n" "> +\t\t\t\t\tderived_keysize, &payload);\n" - "> +\tif (key = ERR_PTR(-ENOKEY) && inode->i_sb->s_cop->key_prefix) {\n" + "> +\tif (key == ERR_PTR(-ENOKEY) && inode->i_sb->s_cop->key_prefix) {\n" "> +\t\tkey = find_and_lock_process_key(inode->i_sb->s_cop->key_prefix,\n" "> +\t\t\t\t\t\tctx->master_key_descriptor,\n" "> +\t\t\t\t\t\tderived_keysize, &payload);\n" @@ -326,7 +326,7 @@ "> -\t\t\t\t\t inode->i_sb->s_cop->key_prefix,\n" "> -\t\t\t\t\t keysize);\n" "> -\t\tif (res2) {\n" - "> -\t\t\tif (res2 = -ENOKEY)\n" + "> -\t\t\tif (res2 == -ENOKEY)\n" "> -\t\t\t\tres = -ENOKEY;\n" "> -\t\t\tgoto out;\n" "> -\t\t}\n" @@ -353,7 +353,7 @@ "> \t\tgoto out;\n" "> \n" "> \tif (S_ISREG(inode->i_mode) &&\n" - "> \t crypt_info->ci_data_mode = FSCRYPT_MODE_AES_128_CBC) {\n" + "> \t crypt_info->ci_data_mode == FSCRYPT_MODE_AES_128_CBC) {\n" "> -\t\tres = init_essiv_generator(crypt_info, raw_key, keysize);\n" "> +\t\tres = init_essiv_generator(crypt_info, derived_key,\n" "> +\t\t\t\t\t derived_keysize);\n" @@ -361,7 +361,7 @@ "> \t\t\tpr_debug(\"%s: error %d (inode %lu) allocating essiv tfm\\n\",\n" "> \t\t\t\t __func__, res, inode->i_ino);\n" "> @@ -361,7 +374,7 @@ int fscrypt_get_encryption_info(struct inode *inode)\n" - "> \tif (res = -ENOKEY)\n" + "> \tif (res == -ENOKEY)\n" "> \t\tres = 0;\n" "> \tput_crypt_info(crypt_info);\n" "> -\tkzfree(raw_key);\n" @@ -373,4 +373,4 @@ "> 2.15.0.rc0.271.g36b669edcc-goog\n" > -e2d1f91187a2a5dedcae30210b6784c9febd3c98c46499c7cdaf60d8a664aa2b +99565e292affa2294f96e6d70132cbedb84baec242b4b87870018148ba5faae5
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.