Revert "pagemap: do not leak physical addresses to non-privileged userspace"
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 7 Jun 2015 00:18:58 +0000 (03:18 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 7 Jun 2015 00:18:58 +0000 (03:18 +0300)
This reverts commit 1ffc3cd9a36b504c20ce98fe5eeb5463f389e1ac.

Don't need it on pandora - even if rowhammer worked, pandora is almost
never a multiuser system, and cache invalidate is a privileged instruction
already on ARM.

pagemap may also be useful for use c64_tools and such.

fs/proc/task_mmu.c

index ff29db9..bc02b6b 100644 (file)
@@ -1089,19 +1089,9 @@ out:
        return ret;
 }
 
        return ret;
 }
 
-static int pagemap_open(struct inode *inode, struct file *file)
-{
-       /* do not disclose physical addresses to unprivileged
-          userspace (closes a rowhammer attack vector) */
-       if (!capable(CAP_SYS_ADMIN))
-               return -EPERM;
-       return 0;
-}
-
 const struct file_operations proc_pagemap_operations = {
        .llseek         = mem_lseek, /* borrow this */
        .read           = pagemap_read,
 const struct file_operations proc_pagemap_operations = {
        .llseek         = mem_lseek, /* borrow this */
        .read           = pagemap_read,
-       .open           = pagemap_open,
 };
 #endif /* CONFIG_PROC_PAGE_MONITOR */
 
 };
 #endif /* CONFIG_PROC_PAGE_MONITOR */