Skip to content
  • KAMEZAWA Hiroyuki's avatar
    kcore: register vmemmap range · 26562c59
    KAMEZAWA Hiroyuki authored
    
    
    Benjamin Herrenschmidt <benh@kernel.crashing.org> pointed out that vmemmap
    range is not included in KCORE_RAM, KCORE_VMALLOC ....
    
    This adds KCORE_VMEMMAP if SPARSEMEM_VMEMMAP is used.  By this, vmemmap
    can be readable via /proc/kcore
    
    Because it's not vmalloc area, vread/vwrite cannot be used.  But the range
    is static against the memory layout, this patch handles vmemmap area by
    the same scheme with physical memory.
    
    This patch assumes SPARSEMEM_VMEMMAP range is not in VMALLOC range.  It's
    correct now.
    
    [akpm@linux-foundation.org: fix typo]
    Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Jiri Slaby <jirislaby@gmail.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: WANG Cong <xiyou.wangcong@gmail.com>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Randy Dunlap <randy.dunlap@oracle.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    26562c59