Re:Memory Deduplication: The Curse that Keeps on Giving [video]
by eternalban on Sunday January 08, 2017 @09:49AM
(#13349862)
> conceptually the problem also applies to containers.
Yep. c.f. BC's talk @ 34:21 "To improve storage efficiency"
Regarding the attacks and how they relate to containers. It's true that two of the attacks were targeting KVM/KSM i.e. VMs. But one attack was entirely inside a process and conceptually the problem also applies to containers.
https://openvz.org/Comparison
I haven't yet looked at different container implementations but the row 'Page sharing' suggests that there might be some form of memory deduplication.
You could probably use KSM under Linux across containers by registering all memory to KSM through madvise() and MADV_MERGEABLE (http://man7.org/linux/man-pages/man2/madvise.2.html).
https://openvz.org/KSM_(kernel_same-page_merging)