Commit 3d4645bf authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 's390-5.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Heiko Carstens:

 - fix stack unwinder: the stack unwinder rework has on off-by-one bug
   which prevents following stack backchains over more than one context
   (e.g. irq -> process).

 - fix address space detection in exception handler: if user space
   switches to access register mode, which is not supported anymore, the
   exception handler may resolve to the wrong address space.

* tag 's390-5.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/unwind: correct stack switching during unwind
  s390/mm: fix address space detection in exception handling
parents d0cc617a 0ab0d7ac
......@@ -30,7 +30,7 @@ static inline bool on_stack(struct stack_info *info,
return false;
if (addr + len < addr)
return false;
return addr >= info->begin && addr + len < info->end;
return addr >= info->begin && addr + len <= info->end;
}
static inline unsigned long get_stack_pointer(struct task_struct *task,
......
......@@ -83,7 +83,6 @@ static inline int notify_page_fault(struct pt_regs *regs)
/*
* Find out which address space caused the exception.
* Access register mode is impossible, ignore space == 3.
*/
static enum fault_type get_fault_type(struct pt_regs *regs)
{
......@@ -108,6 +107,10 @@ static enum fault_type get_fault_type(struct pt_regs *regs)
}
return VDSO_FAULT;
}
if (trans_exc_code == 1) {
/* access register mode, not used in the kernel */
return USER_FAULT;
}
/* home space exception -> access via kernel ASCE */
return KERNEL_FAULT;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment