4 ms·
If you have data you don't want written to a core dump, then MAP_CONCEAL will literally only help you if that memory is in an mmap'd region. If it's in regular
by Lt_Riza_Hawkeye 7y ago
If you have data you don't want written to a core dump, then MAP_CONCEAL will literally only help you if that memory is in an mmap'd region. If it's in regular old virtual memory, you're fucked.
So if you're going to add a flag to something to let users conceal a region of memory from a core dump, add it to madvise, adding it to mmap is just adding arbitrary restrictions on the programmer.
Linux got it right with MADV_DONTDUMP
- quotemstr 7y agoAll memory is mmaped, especially on OpenBSD, which deprecated basically-mmap-with-a-mustache brk. There's no such thing as "regular old virtual memory".
- davidcuddeback 7y agoThere’s also malloc_conceal() and calloc_conceal(), as discussed in the article.