6 ms·
It's worth point out that there are still plenty of static RAM in modern chips and those obviously don't require refreshing. The CPU cache would be an example,
by simias 8y ago
It's worth point out that there are still plenty of static RAM in modern chips and those obviously don't require refreshing. The CPU cache would be an example, but there are also plenty of internal SRAMs in ASICs and FPGAs everywhere.
The refresh needed by DRAM is also why you can't merely suspend-to-RAM by merely keeping it powered up, the bits will flip. You need a special self-refresh mode that keeps updating every cell.
While implementing suspend-to-RAM on an embedded system I wanted to test that my self-refresh was working correctly, so I decided to test the null hypothesis: I'd suspend my ROM code without enabling auto-refresh, wait a second or so, wake up and smell the ashes. Except... it seemed to work anyway. The data was still here.
It turns out that while the refresh period of DRAM is usually a handful of ms at most, you will still have a relatively low bitflit rate even after several seconds. In hindsight it makes sense: in production you want an error rate of effectively 0% (especially if you don't have ECC) across potentially billions of cells. Most cells can probably hold their value for much, much longer than the refresh period but you need to catch the full bell curve and it needs to keep working across the entire temperature and voltage range for all chips.
- klagermkii 8y agoThat's interesting, makes me want to see the graph of power vs cost for extra error correcting data but with longer refresh cycles on the memory (for that suspend-to-RAM application).
- gleenn 8y agoThis is relevant to the hack you can do when trying to retrieve secrets from ram from a live computer: pull the dimms out, blow some cold air on them and then stick them in another computer that's ready to dump the contents. I've heard its a good attack against full-drive encryption because the keys are sitting in plaintext in RAM. I've also heard it works for up to minutes after the computer has been turned off.
- voxadam 8y agoWhat you're referring to is called a "cold boot attack".
- Scoundreller 8y agoIt would be cool if computers were designed to shutdown and clear RAM if they detected rapid cooling. Ideally this monitoring process would continue during hibernation. I guess there wouldn’t be anything possible if power was completely removed, but at least then an attacker is dealing with only being able to begin cooling after shutdown and cells start being lost. The system should also balk if restarted within a short period of time, but a rapid temperature reduction. This would help prevent non-removal attacks (Eg: rebooting with a minimal OS to pull whatever one could -> great for MACs).
- celeritascelery 8y agoGenerally you pull the ram before you cool it, so this wouldn’t do much.
- jiveturkey 8y agoi was about to poo poo this idea but yeah, for non-removal this would be good
- BeeOnRope 8y agoCold boot attack usually refers to reading the DIMMs from the machine they are installed in, by rebooting it. The GP described a slightly different thing: physically removing the RAM modules and dumping their contents with a different host.
- deleted 8y ago[deleted]
- nigwil_ 8y agoThere is progress towards encrypting memory, although there remains limitations, complexity and performance penalty challenges: https://lwn.net/Articles/752683/ https://lwn.net/Articles/752683/
- seppel 8y agoGaming consoles have encrypted RAM for more than a decade.
- delroth 8y agoYou say "gaming consoles", but really I think I've only seen it in the Xbox 360. Was it deployed anywhere else that I missed?
- dcow 8y agoDidn’t the Wii do something similar? Also it’s not just “gaming consoles”: https://www.cl.cam.ac.uk/~rja14/tamper.html https://www.cl.cam.ac.uk/~rja14/tamper.html
- dfox 8y agoWii does not do RAM encryption (which is somewhat understandable given the fact that the RAM is mostly embedded 1T-SRAM that is not directly accessible anyway). As far as I know the only two systems that use cryptographically meaningful memory encryption are Xbox 360 and zArchitecture mainframes. Various secure crypto processors usually have some support for external "encrypted" SRAM, but as this typically involves microcontroller platforms and byte/word-wide accesses to said memory the implementation in the best case boils down to CTR mode (usually of some secret semi-proprietary algorithm of questionable cryptographic qualities) without IV or any authentication.
- dijit 8y agoPS4 and XB One both have "secret" memory areas which I think are encrypted. We use these features to store small amounts of very sensitive data, key material for example.
- dboreham 8y agoI have a few war stories about this from back in the day when I worked in hardware design: we made a chip that was supposed to have embedded SRAM but the cell design vs process was a bit off and it turned out to leak charge slowly, making it a DRAM. No problem : we modified the software to hit every row every so often which in effect implemented refresh. Also the converse problem: if you have a bug in your hardware that results in refresh being disabled it can be hard to detect because as noted above cells typically have a retention time on the order of 10's of seconds. Add in the effect of programs running, which causes accesses that as a side effect refresh the row targeted, and it can take a long time before you realize there is no refresh. The symptoms can be subtle and confusing, because for the most part memory _is_ being refreshed, just not in the way you expect.
- jacquesm 8y agoI think you have just finally solved a problem with a piece of hardware that I was asked to work on decades ago. Never could figure out exactly what caused the problem but reading this I suspect you are correct in that that particular system had a broken refresh design. It worked most of the time and then would crash in the weirdest ways, and it did contain 64K of dynamic RAM, I never thought to check the refresh circuitry. I was tasked with debugging the software end of things, and you know the proverb about programmers faced with a hardware problem. Extra silly of me because I really should have started with checking the hardware first, the assumption that the problem was software related clearly may not have been a valid one. The refresh circuitry was provided by a video chip and this is most likely where things went wrong, either in the configuration or in the actual wiring. Thank you!
- grawprog 8y agoOh wow. Thank you. I've been wondering all week why the CNC machines at my work store their data and info on battery powered SRAM after getting a warning that i'll lose everything if I don't change said battery in a couple weeks. I always assumed everything was written to disk and loaded into memory on startup but apparently not. Everything critical to the machine running is stored on this SRAM. It actually makes a lot of sense now why the manufacturers did it this way. I was really confused why in this day and age I have to change an SRAM battery stashed somewhere deep in the computer inside the control panel.
- simias 8y agoThat's also how saves worked on some old consoles like the Game Boy. No flash, you have a SRAM with a battery, when the battery runs out you lose your save.
- tjoff 8y agoThat can't be right, I thought. Because it didn't match up with my childhood memories. But, it seems the cartridge itself (and not the gameboy which I incorrectly assumed from your post) has a battery which according to internet[1] lasts about 15 years. https://www.reddit.com/r/Gameboy/comments/4w8xjf/guide_how_to_backup_your_game_save_files/ https://www.reddit.com/r/Gameboy/comments/4w8xjf/guide_how_t...
- MBCook 8y agoRight. The SRAM was also on the cartridge. Nothing was saved to the GameBoy itself.
- grawprog 8y agoYa I knew that. I learned that the hard way after my snes games started erasing the save data when I powered off the system. My nes was fairly dead by that point so i missed those. Then I learned my n64 games would be next.... :( I just couldn't figure why fairly modern CNC machines used the same technology as old video game cartridges.