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]
Date:   Mon, 26 Nov 2018 01:37:24 -1000
From:   Joey Pabalinas <joeypabalinas@...il.com>
To:     David CARLIER <devnexen@...il.com>
Cc:     linux-kernel@...r.kernel.org, alexander.shishkin@...ux.intel.com,
        gregkh@...uxfoundation.org, andriy.shevchenko@...ux.intel.com,
        aryabinin@...tuozzo.com, Joey Pabalinas <joeypabalinas@...il.com>
Subject: Re: [PATCH] Little memset_explicit optimisation

On Sat, Nov 24, 2018 at 12:35:43PM +0000, David CARLIER wrote:
> Using the return value of memset for save/load sake.
> 
> Signed-off-by: David Carlier <devnexen@...il.com>
> ---
>  lib/string.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/string.c b/lib/string.c
> index 38e4ca08e757..92da04a0213b 100644
> --- a/lib/string.c
> +++ b/lib/string.c
> @@ -720,7 +720,7 @@ EXPORT_SYMBOL(memset);
>   */
>  void memzero_explicit(void *s, size_t count)
>  {
> -       memset(s, 0, count);
> +       s = memset(s, 0, count);
>         barrier_data(s);
>  }
>  EXPORT_SYMBOL(memzero_explicit);

Could you elaborate on the optimization that this patch performs?

-- 
Cheers,
Joey Pabalinas

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ