lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 24 Oct 2014 07:51:54 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Eric Rost <eric.rost@...abylon.net>
Cc:	gregkh@...uxfoundation.org, jason@...edaemon.net, jake@....net,
	antonysaraev@...il.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] staging: skein: Adds CryptoAPI Support

First of all this patch does too many things at once.  Collapsing files
and deleting them needs to be done in separate patches from adding them.
There is the "one thing per patch" and each one of those is a separate
thing.

On Thu, Oct 23, 2014 at 05:12:10PM -0500, Eric Rost wrote:
> +int skein256_update(struct shash_desc *desc, const u8 *data,
> +			unsigned int len)
> +{
> +	return skein_256_update((struct skein_256_ctx *) shash_desc_ctx(desc),
> +			data, (size_t) len);
> +}

The two line version of this cast was prettier.  Also if you run
checkpatch.pl --strict over this it will hopefully warn about the
space in the middle of the cast and the alignment of data.  Also the
cast to size_t is superflous.

The checkpatch --strict version of this looks like:

int skein256_update(struct shash_desc *desc, const u8 *data,
			unsigned int len)
{
	return skein_256_update((struct skein_256_ctx *)shash_desc_ctx(desc),
				data, len);
}

Eventually, I feel like we would wave skein_256_update() to just take
a shash_desc pointer?  We'd have to shuffle the skein_ctx struct a bit
to make that work.  (I haven't looked at this carefully).

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists