summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorAnshuman Khandual <khandual@linux.vnet.ibm.com>2017-12-04 11:19:22 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-21 01:12:21 +1100
commit5b2b80714796073ec9e196c7aeec59b7489fe676 (patch)
treede4059bac5d83c4e9788c05c3ec941244e98182e /arch/powerpc/mm
parent3350eb2ea127978319ced883523d828046af4045 (diff)
downloadlinux-5b2b80714796073ec9e196c7aeec59b7489fe676.tar.gz
linux-5b2b80714796073ec9e196c7aeec59b7489fe676.tar.bz2
linux-5b2b80714796073ec9e196c7aeec59b7489fe676.zip
powerpc/mm: Invalidate subpage_prot() system call on radix platforms
Radix enabled platforms don't support subpage_prot() system calls. But at present the system call goes through without an error and fails later on while validating expected subpage accesses. Lets not allow the system call on powerpc radix platforms to begin with to prevent this confusion in user space. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/subpage-prot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/subpage-prot.c
index 781532d7bc4d..f14a07c2fb90 100644
--- a/arch/powerpc/mm/subpage-prot.c
+++ b/arch/powerpc/mm/subpage-prot.c
@@ -195,6 +195,9 @@ long sys_subpage_prot(unsigned long addr, unsigned long len, u32 __user *map)
unsigned long next, limit;
int err;
+ if (radix_enabled())
+ return -ENOENT;
+
/* Check parameters */
if ((addr & ~PAGE_MASK) || (len & ~PAGE_MASK) ||
addr >= mm->task_size || len >= mm->task_size ||