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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zk9P3ITcqc-9EhZp@tuebingen.mpg.de>
Date: Thu, 23 May 2024 16:17:00 +0200
From: Andre Noll <maan@...bingen.mpg.de>
To: Ahmad Fatoum <a.fatoum@...gutronix.de>
Cc: Dan Williams <dan.j.williams@...el.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	"David S. Miller" <davem@...emloft.net>,
	Jonathan Corbet <corbet@....net>,
	Maciej Sosnowski <maciej.sosnowski@...el.com>,
	Andre Noll <maan@...temlinux.org>, linux-crypto@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel@...gutronix.de
Subject: Re: [PATCH] docs: crypto: async-tx-api: fix broken code example

On Thu, May 23, 15:18, Ahmad Fatoum wrote
> The code example fails to compile:
> 
>   1) ddr_conv is defined twice, once as a VLA, which have been phased out

       addr_conv
> 
>   2) submit is not a pointer, but is still dereferenced with ->

3) The first call to async_xor() lacked the trailing semicolon.

> Fix these issues and while at it, make the functions static as users
> are unlikely to export them.

No objections, but please don't consider me authoritative. Two nits
below, FWIW.

> --- a/Documentation/crypto/async-tx-api.rst
> +++ b/Documentation/crypto/async-tx-api.rst
> @@ -150,38 +150,38 @@ of an operation.
>  Perform a xor->copy->xor operation where each operation depends on the
>  result from the previous operation::

Maybe add

#include <linux/async_tx.h>

>  
> -    void callback(void *param)
> +    static void callback(void *param)
>      {
>  	    struct completion *cmp = param;
>  
>  	    complete(cmp);
>      }

This could be simplified to

static void callback(void *param)
{
	complete(param);
}

Best
Andre
-- 
Max Planck Institute for Biology
Tel: (+49) 7071 601 829
Max-Planck-Ring 5, 72076 Tübingen, Germany
http://people.tuebingen.mpg.de/maan/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ