[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6FP0uQpRhH+IToC@sol.localdomain>
Date: Mon, 19 Dec 2022 22:01:54 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: Robert Elliott <elliott@....com>
Cc: herbert@...dor.apana.org.au, davem@...emloft.net, corbet@....net,
linux-crypto@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 6/8] crypto: x86/ghash - add kernel-doc comments to
assembly
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
Powered by blists - more mailing lists