diff options
| author | Ingo Molnar <[email protected]> | 2017-04-03 14:36:32 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2017-04-03 14:36:32 +0000 |
| commit | 7f75540ff2ca84dbac26cf9deeb620cbf5646f5e (patch) | |
| tree | 1eb54748074d3a91f3dd70fb5d4b23bf713f0bd5 /arch/parisc/mm/fault.c | |
| parent | x86/mm/numa: Remove numa_nodemask_from_meminfo() (diff) | |
| parent | Linux 4.11-rc5 (diff) | |
| download | kernel-7f75540ff2ca84dbac26cf9deeb620cbf5646f5e.tar.gz kernel-7f75540ff2ca84dbac26cf9deeb620cbf5646f5e.zip | |
Merge tag 'v4.11-rc5' into x86/mm, to refresh the branch
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'arch/parisc/mm/fault.c')
| -rw-r--r-- | arch/parisc/mm/fault.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index deab89a8915a..32ec22146141 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c @@ -150,6 +150,23 @@ int fixup_exception(struct pt_regs *regs) d->fault_space = regs->isr; d->fault_addr = regs->ior; + /* + * Fix up get_user() and put_user(). + * ASM_EXCEPTIONTABLE_ENTRY_EFAULT() sets the least-significant + * bit in the relative address of the fixup routine to indicate + * that %r8 should be loaded with -EFAULT to report a userspace + * access error. + */ + if (fix->fixup & 1) { + regs->gr[8] = -EFAULT; + + /* zero target register for get_user() */ + if (parisc_acctyp(0, regs->iir) == VM_READ) { + int treg = regs->iir & 0x1f; + regs->gr[treg] = 0; + } + } + regs->iaoq[0] = (unsigned long)&fix->fixup + fix->fixup; regs->iaoq[0] &= ~3; /* |
