diff -r -u8 linux-2.6.24.2/fs/Kconfig linux-2.6.24.2-patched/fs/Kconfig
--- linux-2.6.24.2/fs/Kconfig   2008-02-11 06:51:11.000000000 +0100
+++ linux-2.6.24.2-patched/fs/Kconfig   2008-02-12 13:37:10.000000000 +0100
@@ -941,16 +941,46 @@

 config PROC_VMCORE
         bool "/proc/vmcore support (EXPERIMENTAL)"
         depends on PROC_FS && EXPERIMENTAL && CRASH_DUMP
        default y
         help
         Exports the dump image of crashed kernel in ELF format.

+choice
+       prompt "Restrict access to /proc/<pid>-dirs"
+       default PROC_PIDDIRS_UNRESTRICTED
+config PROC_PIDDIRS_UNRESTRICTED
+       bool "no restriction"
+       depends on PROC_FS
+       help
+         Don't restrict access to /proc/<pid>-dirs, i.e. leave mode at 555
+         respectively r-xr-xr-x . This is the traditional mode of operation.
+
+         If unsure, say Y.
+config PROC_PIDDIRS_RESTRICT_TO_UG
+       bool "restrict to user and group
+       depends on PROC_FS
+       help
+         Restrict access to /proc/<pid>-dirs to user and group, i.e. set mode
+         to 550 respectively r-xr-x--- .
+
+         If unsure, say N.
+
+config PROC_PIDDIRS_RESTRICT_TO_U
+       bool "restrict to user
+       depends on PROC_FS
+       help
+         Restrict access to /proc/<pid>-dirs to user only, i.e. set mode to
+         500 respectively r-x------ .
+
+         If unsure, say N.
+endchoice
+
 config PROC_SYSCTL
        bool "Sysctl support (/proc/sys)" if EMBEDDED
        depends on PROC_FS
        select SYSCTL
        default y
        ---help---
          The sysctl interface provides a means of dynamically changing
          certain kernel parameters and variables on the fly without requiring
Only in linux-2.6.24.2-patched/fs: Kconfig.orig
diff -r -u8 linux-2.6.24.2/fs/proc/base.c linux-2.6.24.2-patched/fs/proc/base.c
--- linux-2.6.24.2/fs/proc/base.c       2008-02-11 06:51:11.000000000 +0100
+++ linux-2.6.24.2-patched/fs/proc/base.c       2008-02-12 14:14:46.000000000 +0100
@@ -2373,17 +2373,24 @@
 {
        struct dentry *error = ERR_PTR(-ENOENT);
        struct inode *inode;

        inode = proc_pid_make_inode(dir->i_sb, task);
        if (!inode)
                goto out;

-       inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO;
+       #if defined CONFIG_PROC_PIDDIRS_UNRESTRICTED
+               inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO;
+       #elif defined CONFIG_PROC_PIDDIRS_RESTRICT_TO_UG
+               inode->i_mode = S_IFDIR|S_IRUSR|S_IRGRP|S_IXUSR|S_IXGRP;
+       #elif defined CONFIG_PROC_PIDDIRS_RESTRICT_TO_U
+               inode->i_mode = S_IFDIR|S_IRUSR|S_IXUSR;
+       #endif
+
        inode->i_op = &proc_tgid_base_inode_operations;
        inode->i_fop = &proc_tgid_base_operations;
        inode->i_flags|=S_IMMUTABLE;
        inode->i_nlink = 5;
 #ifdef CONFIG_SECURITY
        inode->i_nlink += 1;
 #endif
