[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#569683: linux-image-2.6.26-2-686: /proc/pid/maps is empty for all processes



Package: linux-2.6
Version: 2.6.26-21
Severity: normal
Tags: patch

/proc/pid/maps is empty for all processes, only /proc/self/maps works.

The following patch helped me to fix the problem:
--- linux-2.6-2.6.26/fs/proc/base.c     2008-07-13 16:51:29.000000000 -0500
+++ linux/fs/proc/base.c        2009-12-26 02:14:58.000000000 -0600
@@ -251,7 +251,8 @@
        task_lock(task);
        if (task->mm != mm)
                goto out;
-       if (task->mm != current->mm && __ptrace_may_attach(task) < 0)
+       if (task->mm != current->mm && ((mm->flags & MMF_IN_EXEC) ||
+                                       __ptrace_may_attach(task) < 0))
                goto out;
        task_unlock(task);
        return mm;

I'm writing this report from modified kernel, which contains this
patch, and I test like 'cat /proc/1/maps' works now.

-- Package-specific info:
** Kernel log: boot messages should be attached


-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26cust1
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages linux-image-2.6.26-2-686 depends on:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
ii  initramfs-tools [linux-initra 0.92o      tools for generating an initramfs
ii  module-init-tools             3.4-1      tools for managing Linux kernel mo

Versions of packages linux-image-2.6.26-2-686 recommends:
ii  libc6-i686                  2.7-18lenny2 GNU C Library: Shared libraries [i

Versions of packages linux-image-2.6.26-2-686 suggests:
ii  grub                       0.97-47lenny2 GRand Unified Bootloader (Legacy v
pn  linux-doc-2.6.26           <none>        (no description available)

Versions of packages linux-image-2.6.26-2-686 is related to:
pn  firmware-bnx2                 <none>     (no description available)
pn  firmware-bnx2x                <none>     (no description available)
pn  firmware-ipw2x00              <none>     (no description available)
pn  firmware-ivtv                 <none>     (no description available)
pn  firmware-iwlwifi              <none>     (no description available)
pn  firmware-linux                <none>     (no description available)
pn  firmware-linux-nonfree        <none>     (no description available)
pn  firmware-qlogic               <none>     (no description available)
pn  firmware-ralink               <none>     (no description available)

-- debconf information:
  linux-image-2.6.26-2-686/postinst/bootloader-error-2.6.26-2-686:
  shared/kernel-image/really-run-bootloader: true
  linux-image-2.6.26-2-686/postinst/old-dir-initrd-link-2.6.26-2-686: true
  linux-image-2.6.26-2-686/preinst/initrd-2.6.26-2-686:
  linux-image-2.6.26-2-686/preinst/overwriting-modules-2.6.26-2-686: true
  linux-image-2.6.26-2-686/postinst/bootloader-test-error-2.6.26-2-686:
  linux-image-2.6.26-2-686/preinst/lilo-has-ramdisk:
  linux-image-2.6.26-2-686/postinst/depmod-error-2.6.26-2-686: false
  linux-image-2.6.26-2-686/prerm/would-invalidate-boot-loader-2.6.26-2-686: true
  linux-image-2.6.26-2-686/postinst/kimage-is-a-directory:
  linux-image-2.6.26-2-686/postinst/old-initrd-link-2.6.26-2-686: true
  linux-image-2.6.26-2-686/preinst/bootloader-initrd-2.6.26-2-686: true
  linux-image-2.6.26-2-686/preinst/abort-overwrite-2.6.26-2-686:
  linux-image-2.6.26-2-686/preinst/abort-install-2.6.26-2-686:
  linux-image-2.6.26-2-686/preinst/elilo-initrd-2.6.26-2-686: true
  linux-image-2.6.26-2-686/postinst/depmod-error-initrd-2.6.26-2-686: false
  linux-image-2.6.26-2-686/postinst/create-kimage-link-2.6.26-2-686: true
  linux-image-2.6.26-2-686/preinst/lilo-initrd-2.6.26-2-686: true
  linux-image-2.6.26-2-686/prerm/removing-running-kernel-2.6.26-2-686: true
  linux-image-2.6.26-2-686/preinst/failed-to-move-modules-2.6.26-2-686:
  linux-image-2.6.26-2-686/postinst/old-system-map-link-2.6.26-2-686: true



Reply to: