lkml.org 
[lkml]   [2022]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-03-26 23:15    [W:1.297 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site