From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Sun, 20 Jan 2019 11:02:12 +0100 (CET) From: Richard Weinberger Date: Sun, 20 Jan 2019 10:53:31 +0100 Message-ID: <5868969.IIusGtDOgq@blindfold> In-Reply-To: References: <20190118141451.12000-1-richard@nod.at> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dm-crypt] [PATCH] crypt_plain_hash: Remove dead code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Milan Broz Cc: dm-crypt@saout.de 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