Revert "pagemap: do not leak physical addresses to non-privileged userspace"
[pandora-kernel.git] / fs / proc / task_mmu.c
index ff29db9..bc02b6b 100644 (file)
@@ -1089,19 +1089,9 @@ out:
        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,
-       .open           = pagemap_open,
 };
 #endif /* CONFIG_PROC_PAGE_MONITOR */