DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Milan Broz <gmazyland@gmail.com>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] [PATCH] crypt_plain_hash: Remove dead code
Date: Sun, 20 Jan 2019 10:53:31 +0100	[thread overview]
Message-ID: <5868969.IIusGtDOgq@blindfold> (raw)
In-Reply-To: <dfcc8f47-0259-7e74-d75c-2e5c6cdad845@gmail.com>

Milan,

Am Sonntag, 20. Januar 2019, 10:33:46 CET schrieb Milan Broz:
> On 18/01/2019 15:14, Richard Weinberger wrote:
> > Since commit 31a4d552a2d9 ("Support keyfile offset and keyfile size option even for plain volumes.")
> > params.hash is set to NULL when the requested hash function is
> > "plain". Therfore the code to handle the "plain" hasher in
> > crypt_plain_hash() is no longer reachable and can be removed.
> 
> Hi,
> 
> thanks for the patch, but unfortunately it is not the correct fix.
> 
> While cryptsetup set params.hash to NULL, other users can still use "plain" to indicate no hashing
> (I think systemd-cryptsetup is one of them).
> 
> IOW: /lib/* is libcryptsetup API, your code modifies how the libcryptsetup API works now.
> (Despite "plain" hash is legacy code, and I wish it to be removed...)
> 
> You referenced commit that modifies cryptsetup binary, cryptsetup is only one user of libcryptsetup API,
> so the conclusion that the code is no longer used is misleading.
> 
> (My bad that there was no test for it in libcryptsetup api-test, I just added such a test to the git.)

Ahhh, stupid me. I completely forgot that libcryptsetup is supposed to be used by
programs outside of the cryptsetup code base.

Thanks,
//richard

      reply	other threads:[~2019-01-20 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 14:14 [dm-crypt] [PATCH] crypt_plain_hash: Remove dead code Richard Weinberger
2019-01-20  9:33 ` Milan Broz
2019-01-20  9:53   ` Richard Weinberger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5868969.IIusGtDOgq@blindfold \
    --to=richard@nod.at \
    --cc=dm-crypt@saout.de \
    --cc=gmazyland@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox