Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jul 2014 03:58:09 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Jesse Gooch <lists@gooch.io>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: geli+trim support
Message-ID:  <20140705105809.GH45513@funkthat.com>
In-Reply-To: <53B750C1.8070706@gooch.io>
References:  <alpine.BSF.2.00.1407020036280.4507@wojtek.tensor.gdynia.pl> <7E2718485A3E405D89E5EAB331E9ED70@multiplay.co.uk> <53B6427D.1010403@gooch.io> <60445.1404461976@critter.freebsd.dk> <53B750C1.8070706@gooch.io>

next in thread | previous in thread | raw e-mail | index | archive | help
Jesse Gooch wrote this message on Fri, Jul 04, 2014 at 18:11 -0700:
> Hi,
> 
> On 04/07/14 01:19 AM, Poul-Henning Kamp wrote:
> > In message <53B6427D.1010403@gooch.io>, Jesse Gooch writes:
> > 
> >> IIRC, TRIM is bad for encryption anyway. You want everything to be
> >> random noise, even the empty sectors. TRIM defeats this.
> > 
> > The problem is that there is nothing you can do.
> > 
> > If you overwrite, your old sector is still unchanged somewhere in flash.
> > 
> > If you TRIM, your old sector is still unchanged somewhere in flash, but
> > if you're lucky for slightly less time.
> 
> Perhaps I misunderstand TRIM, isn't the point of TRIM that it zeroes out
> the sector ahead of time so it doesn't have to re-do it again when it
> stores more data in that sector later?

It is up the the implementation to choose what to do, depending upon
spec.. For SATA, there are three options...  One is non-deterministic
read (meaning each read could return different data), one is deterministic
read where each read returns the same value, but it is random data, and
the third is data set to zero...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140705105809.GH45513>