Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jun 2017 15:51:26 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        Allan Jude <allanjude@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r316311 - in head: lib/libstand sys/boot/geli sys/boot/i386/gptboot sys/boot/i386/loader sys/boot/i386/zfsboot
Message-ID:  <85ee6ae1-f934-caf6-a219-3d9901f3d277@selasky.org>
In-Reply-To: <201703310004.v2V04W3A043449@repo.freebsd.org>
References:  <201703310004.v2V04W3A043449@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 03/31/17 02:04, Allan Jude wrote:
> Author: allanjude
> Date: Fri Mar 31 00:04:32 2017
> New Revision: 316311
> URL: https://svnweb.freebsd.org/changeset/base/316311
> 


> 
> Modified: head/sys/boot/i386/zfsboot/zfsboot.c
> ==============================================================================
> --- head/sys/boot/i386/zfsboot/zfsboot.c	Thu Mar 30 23:49:57 2017	(r316310)
> +++ head/sys/boot/i386/zfsboot/zfsboot.c	Fri Mar 31 00:04:32 2017	(r316311)
> @@ -926,7 +926,7 @@ load(void)
>       zfsargs.primary_pool = primary_spa->spa_guid;
>   #ifdef LOADER_GELI_SUPPORT
>       bcopy(gelipw, zfsargs.gelipw, sizeof(zfsargs.gelipw));
> -    bzero(gelipw, sizeof(gelipw));
> +    explicit_bzero(gelipw, sizeof(gelipw));
>   #else
>       zfsargs.gelipw[0] = '\0';
>   #endif
> 

Hi Allan,

For ARM platforms you'll need to do a write memory barrier before the 
explicit_bzero() returns, else the memory can be recovered by 
invalidating the memory area by the next thread which is allocating this 
memory ???

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?85ee6ae1-f934-caf6-a219-3d9901f3d277>