Re: [PATCH] crypt_plain_hash: Remove dead code
Richard Weinberger <richard-/[email protected]>
| Newsgroups | gmane.linux.kernel.device-mapper.dm-crypt |
|---|---|
| Message-ID | <5868969.IIusGtDOgq@blindfold> |
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
_______________________________________________
dm-crypt mailing list
[email protected]
https://www.saout.de/mailman/listinfo/dm-crypt