Re: [PATCH v2 6/8] crypto: x86/ghash - add kernel-doc comments to assembly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 19, 2022 at 12:55:53PM -0600, Robert Elliott wrote:
> +/**
> + * clmul_ghash_mul - Calculate GHASH final multiplication using x86 PCLMULQDQ instructions

Well, it does one multiplication.  It's not necessarily the final one.

> + * @dst:	address of hash value to update (%rdi)
> + * @shash:	address of hash context (%rsi)

This terminology is confusing.  I would call these the accumulator and key,
respectively.

> +/**
> + * clmul_ghash_update - Calculate GHASH using x86 PCLMULQDQ instructions
> + * @dst:	address of hash value to update (%rdi)
> + * @src:	address of data to hash (%rsi)
> + * @srclen:	number of bytes in data buffer (%rdx);
> + *		function does nothing and returns if below 16
> + * @shash:	address of hash context (%rcx)
> + *
> + * This supports 64-bit CPUs.
> + *
> + * Return:	none (but @dst is updated)
> + * Prototype:	asmlinkage clmul_ghash_update(char *dst, const char *src,
> + *					      unsigned int srclen, const u128 *shash);

"function does nothing and returns if below 16" =>
"function processes round_down(srclen, 16) bytes".

- Eric



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux