• David Hildenbrand's avatar
    drivers/char: remove /dev/kmem for good · bbcd53c9
    David Hildenbrand authored
    Patch series "drivers/char: remove /dev/kmem for good".
    
    Exploring /dev/kmem and /dev/mem in the context of memory hot(un)plug and
    memory ballooning, I started questioning the existence of /dev/kmem.
    
    Comparing it with the /proc/kcore implementation, it does not seem to be
    able to deal with things like
    
    a) Pages unmapped from the direct mapping (e.g., to be used by secretmem)
      -> kern_addr_valid(). virt_addr_valid() is not sufficient.
    
    b) Special cases like gart aperture memory that is not to be touched
      -> mem_pfn_is_ram()
    
    Unless I am missing something, it's at least broken in some cases and might
    fault/crash the machine.
    
    Looks like its existence has been questioned before in 2005 and 2010 [1],
    after ~11 additional years, it might make sense to revive the discussion.
    
    CONFIG_DEVKMEM is only enabled in a single defconfig (on purpose or by
    mistake?).  All distributions disable it: in Ubuntu it has been disabled
    for more than 10 years, in Debian since 2.6.31, in F...
    bbcd53c9
xip_kc705_defconfig 3.02 KB