3 ms·
Exactly. On top of that, most managed flash (which is equivalent to SSD controllers) will pass all write through a modified cyclic XOR pad in order to keep the
by Kiboneu 7mo ago
Exactly. On top of that, most managed flash (which is equivalent to SSD controllers) will pass all write through a modified cyclic XOR pad in order to keep the /bit/ entropy high. I don’t think the article holds on multiple abstraction layers.
- LorenPechtel 7mo agoWhich is the same reason storing data to a HDD doesn't add weight. You can pack the data tighter if you are writing basically balanced 1s and 0s. Thus you can pack more bytes into a given area by encoding them into patterns with even distributions even though that means you need to write more bits.
- tliltocatl 7mo agoBut SSD erasing must write a constant (either one or zero). So an erased ready-to-write SSD block will have consistently different energy than one written with a random scrambled pattern. Same for SMR HDDs - but not for CMR.
- Kiboneu 7mo agoThe SSD lies :) TRIM is a scam. What happens when you XOR a 0 with a byte in a one time pad? You get the corresponding byte from the pad, right? And the block full of 1s or 0s is exactly a case the scrambler needs to be used. It's not for compression or anything like that, it is used because the cells are packed so tightly that sharp changes in energy gradients over the space will even themselves out by donating electrons to their neighbors (flipping bits). It's kind of like rowhammer. Instead of just a ont-time-pad, a more complicated and often proprietary scrambler is used. But it's towards the same end. It's a deterministic, pseudo-random bit sequence. If you can bypass the controller (read directly from NAND) you will see the true values that it returns, and it will likely be scrambled even if the flash controller reports otherwise. This also allows you to recover the scrambler, since you know that the other side of the XOR operation is 0.
- tliltocatl 7mo agoTrim might be an illusion, but block erase is very real, even through it's not exposed as a device command. What I'm trying to tell, writes are scrambled but erases (not trim which marks a logical block as collectable, but physical erase that makes a physical block writable) aren't as they happen over several megabytes at once with no way to control individual bits.
- Kiboneu 7mo agoOh yes you’re right, I did neglect physical block erase which does happen outside the data path.