On Fri, Dec 2, 2022 at 7:00 PM Mike Pattrick <[email protected]> wrote: > > >>>> Did you consider madvise()? > > >>>> > > >>>> MADV_DONTDUMP (since Linux 3.4) > > >>>> Exclude from a core dump those pages in the range > > >>>> specified by addr and length. This is useful in applications that > > >>>> have large areas of memory that are known not to be useful in a core > > >>>> dump. The effect of MADV_DONT‐ > > >>>> DUMP takes precedence over the bit mask that is set via > > >>>> the /proc/[pid]/coredump_filter file (see core(5)). > > >>>> > > >>>> MADV_DODUMP (since Linux 3.4) > > >>>> Undo the effect of an earlier MADV_DONTDUMP. > > >>> > > I guess, while DONTDUMP calls are mainly harmless, the explicit DODUMP > > will override whatever user had in their global configuration. Meaning > > every DPDK application with vhost ports will start dumping some of the > > guest pages with no actual ability to turn that off. > > I initially thought it would work that way, but the DODUMP flag just > disables the DONTDUMP flag. > > https://github.com/torvalds/linux/blob/master/mm/madvise.c#L1055 > https://github.com/torvalds/linux/blob/master/fs/coredump.c#L1033 >
Glad to read that the manual tells the same story than the kernel code :-). -- David Marchand _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
