diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-08 16:12:54 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-08 16:12:54 -0400 |
| commit | 3d4645bf7a76886c70a482a1c6742bac98553f47 (patch) | |
| tree | 54ddf5fcdd46304023592bc6e167dff1ccaaf470 | |
| parent | d0cc617affbf2e31696adf37d153c550c5bef662 (diff) | |
| parent | 0ab0d7ac2090eae30f1c0b01ae981bb7a368f598 (diff) | |
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
| -rw-r--r-- | arch/s390/include/asm/stacktrace.h | 2 | ||||
| -rw-r--r-- | arch/s390/mm/fault.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h index 49634bfbecdd..0ae4bbf7779c 100644 --- a/arch/s390/include/asm/stacktrace.h +++ b/arch/s390/include/asm/stacktrace.h | |||
| @@ -30,7 +30,7 @@ static inline bool on_stack(struct stack_info *info, | |||
| 30 | return false; | 30 | return false; |
| 31 | if (addr + len < addr) | 31 | if (addr + len < addr) |
| 32 | return false; | 32 | return false; |
| 33 | return addr >= info->begin && addr + len < info->end; | 33 | return addr >= info->begin && addr + len <= info->end; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | static inline unsigned long get_stack_pointer(struct task_struct *task, | 36 | static inline unsigned long get_stack_pointer(struct task_struct *task, |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 91ce03fd0c84..df75d574246d 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
| @@ -83,7 +83,6 @@ static inline int notify_page_fault(struct pt_regs *regs) | |||
| 83 | 83 | ||
| 84 | /* | 84 | /* |
| 85 | * Find out which address space caused the exception. | 85 | * Find out which address space caused the exception. |
| 86 | * Access register mode is impossible, ignore space == 3. | ||
| 87 | */ | 86 | */ |
| 88 | static enum fault_type get_fault_type(struct pt_regs *regs) | 87 | static enum fault_type get_fault_type(struct pt_regs *regs) |
| 89 | { | 88 | { |
| @@ -108,6 +107,10 @@ static enum fault_type get_fault_type(struct pt_regs *regs) | |||
| 108 | } | 107 | } |
| 109 | return VDSO_FAULT; | 108 | return VDSO_FAULT; |
| 110 | } | 109 | } |
| 110 | if (trans_exc_code == 1) { | ||
| 111 | /* access register mode, not used in the kernel */ | ||
| 112 | return USER_FAULT; | ||
| 113 | } | ||
| 111 | /* home space exception -> access via kernel ASCE */ | 114 | /* home space exception -> access via kernel ASCE */ |
| 112 | return KERNEL_FAULT; | 115 | return KERNEL_FAULT; |
| 113 | } | 116 | } |
