Bug 1518243 - GDB no longer dumps memory regions marked with the VM_DONTDUMP flag
Summary: GDB no longer dumps memory regions marked with the VM_DONTDUMP flag
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gdb
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Jan Kratochvil
QA Contact: Michal Kolar
Vladimír Slávik
Depends On:
Blocks: 1524312
TreeView+ depends on / blocked
Reported: 2017-11-28 13:34 UTC by Sergio Lopez
Modified: 2018-04-10 10:26 UTC (History)
12 users (show)

Fixed In Version: gdb-7.6.1-108.el7
Doc Type: Bug Fix
Doc Text:
*GDB* can again dump memory protected by the "VM_DONTDUMP" flag Previous changes to the GNU Debugger *GDB* made the behavior of the "gcore" command more similar to the behavior of the Linux kernel when dumping process memory to increase data security. Consequently, users of *GDB* could not dump memory protected by the "VM_DONTDUMP" flag. The new "set dump-excluded-mappings" setting has been added to *GDB* to enable dumping of memory with this flag. As a result, users can dump the whole process memory with *GDB* again.
Clone Of:
: 1524312 (view as bug list)
Last Closed: 2018-04-10 10:25:07 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0701 0 None None None 2018-04-10 10:26:20 UTC

Description Sergio Lopez 2017-11-28 13:34:12 UTC
Versions prior to gdb-7.6.1-83.el7, unconditionally included all memory regions when generating a dump file. Starting with this version, by default GDB will both inspect /proc/PID/coredump_filter, and unconditionally ignore memory regions marked with VM_DONTDUMP.

While it's possible requesting to GDB to ignore /proc/PID/coredump_filter by using the 'set use-coredump-filter' command, there's no way to request it to ignore the VM_DONTDUMP flag.

The change that altered the behavior is this one:

commit 38e1562bc360e0b89490b9b6903e1982a2f2f7fe
Author: Jan Kratochvil <jan.kratochvil>
Date:   Fri Nov 27 20:43:41 2015 +0100

    Support for /proc/PID/coredump_filter (Sergio Durigan Junior, RH
BZ 1265351).

    Sergio Durigan Junior, RH BZ 1265351


    - Resolves: rhbz#1265351

I've posted a tentative fix for this upstream:

 - https://sourceware.org/ml/gdb-patches/2017-11/msg00724.html

Comment 10 Michal Kolar 2017-12-12 14:38:23 UTC
Reproduced against gdb-7.6.1-100.el7 and verified against gdb-7.6.1-108.el7.

Comment 17 errata-xmlrpc 2018-04-10 10:25:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.