alistair23-linux/fs/proc
Michael Holzheu 5c2ff95e41 numa: fix /proc/<pid>/numa_maps for hugetlbfs on s390
When working with hugetlbfs ptes (which are actually pmds) is not valid to
directly use pte functions like pte_present() because the hardware bit
layout of pmds and ptes can be different.  This is the case on s390.
Therefore we have to convert the hugetlbfs ptes first into a valid pte
encoding with huge_ptep_get().

Currently the /proc/<pid>/numa_maps code uses hugetlbfs ptes without
huge_ptep_get().  On s390 this leads to the following two problems:

1) The pte_present() function returns false (instead of true) for
   PROT_NONE hugetlb ptes. Therefore PROT_NONE vmas are missing
   completely in the "numa_maps" output.

2) The pte_dirty() function always returns false for all hugetlb ptes.
   Therefore these pages are reported as "mapped=xxx" instead of
   "dirty=xxx".

Therefore use huge_ptep_get() to correctly convert the hugetlb ptes.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: <stable@vger.kernel.org>	[4.3+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-02-03 08:28:43 -08:00
..
array.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-01-20 17:09:18 -08:00
base.c proc read mm's {arg,env}_{start,end} with mmap semaphore taken. 2016-01-20 17:09:18 -08:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
fd.c proc: add a reschedule point in proc_readfd_common() 2016-01-09 02:56:10 -05:00
fd.h
generic.c proc: change proc_subdir_lock to a rwlock 2015-09-10 13:29:01 -07:00
inode.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
internal.h proc: Allow creating permanently empty directories that serve as mount points 2015-07-01 10:36:41 -05:00
interrupts.c
Kconfig fs, proc: add help for CONFIG_PROC_CHILDREN 2015-07-17 16:39:52 -07:00
kcore.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
kmsg.c
loadavg.c
Makefile
meminfo.c proc: meminfo: estimate available memory more conservatively 2016-01-14 16:00:49 -08:00
namespaces.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-01-20 17:09:18 -08:00
nommu.c vfs: add seq_file_path() helper 2015-06-23 18:01:07 -04:00
page.c mm: differentiate page_mapped() from page_mapcount() for compound pages 2016-01-15 17:56:32 -08:00
proc_net.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
proc_sysctl.c fs: Drop unlikely before IS_ERR(_OR_NULL) 2015-09-29 15:13:58 +02:00
proc_tty.c
root.c vfs: Commit to never having exectuables on proc and sysfs. 2015-07-10 10:39:25 -05:00
self.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
softirqs.c
stat.c
task_mmu.c numa: fix /proc/<pid>/numa_maps for hugetlbfs on s390 2016-02-03 08:28:43 -08:00
task_nommu.c vfs: add seq_file_path() helper 2015-06-23 18:01:07 -04:00
thread_self.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
uptime.c
version.c
vmcore.c vmcore: fix PT_NOTE n_namesz, n_descsz overflow issue 2015-02-17 14:34:52 -08:00