Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1518243 - GDB no longer dumps memory regions marked with the VM_DONTDUMP flag
GDB no longer dumps memory regions marked with the VM_DONTDUMP flag
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gdb (Show other bugs)
7.4
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Jan Kratochvil
Michal Kolar
Vladimír Slávik
: Regression, ZStream
Depends On:
Blocks: 1524312
  Show dependency treegraph
 
Reported: 2017-11-28 08:34 EST by Sergio Lopez
Modified: 2018-04-10 06:26 EDT (History)
12 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 1524312 (view as bug list)
Environment:
Last Closed: 2018-04-10 06:25:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0701 None None None 2018-04-10 06:26 EDT

  None (edit)
Description Sergio Lopez 2017-11-28 08:34:12 EST
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@redhat.com>
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

    7.6.1-83.el7

    - 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 09:38:23 EST
Reproduced against gdb-7.6.1-100.el7 and verified against gdb-7.6.1-108.el7.
Comment 17 errata-xmlrpc 2018-04-10 06:25:07 EDT
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.

https://access.redhat.com/errata/RHBA-2018:0701

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