tmpfs

Chat about Linux in general
Post Reply
looren
Level 2
Level 2
Posts: 55
Joined: Fri Apr 14, 2017 4:03 am

tmpfs

Post by looren » Tue Aug 21, 2018 5:58 am

Hi

I'm wondering regarding creating a tmpfs drive, if anyone has a clue here..
If I were to make a 1mb ram-drive, with a 1mb file, and remove it, is it possible by any means to recover it?
If that is the case, if I overwrite the whole area with 1mb new data, would this overwrite the same parts of ram as the old data was stored in or is the allocation of space dynamic?

gm10
Level 12
Level 12
Posts: 4089
Joined: Thu Jun 21, 2018 5:11 pm

Re: tmpfs

Post by gm10 » Tue Aug 21, 2018 6:09 am

Depends what kind of means you are envisaging. See https://en.wikipedia.org/wiki/Cold_boot_attack

tmpfs has no fixed location in ram. It can even get swapped to disk (ramfs cannot, but don't run out of memory if you use it). Whatever data you copy into the ramdisk may be buffered and cached in addition, plus whatever programs you create or use that data with will create a copy in their part of the memory. The latter can get swapped, too.

looren
Level 2
Level 2
Posts: 55
Joined: Fri Apr 14, 2017 4:03 am

Re: tmpfs

Post by looren » Tue Aug 21, 2018 9:50 am

Thanks for your reply gm10 ! interesting reading,

I was unaware of ramfs, only thought there was tmpfs.
Cold boot attack aside, after reading about ramfs, I think it would be better suited.

Post Reply

Return to “Chat about Linux”