Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky:
"Another two bug fixes:

- ptrace partial write information leak

- a guest page hinting regression introduced with v4.6"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/mm: Fix cmma unused transfer from pgste into pte
s390/ptrace: Preserve previous registers for short regset write

+12 -3
+8
arch/s390/kernel/ptrace.c
··· 963 963 if (target == current) 964 964 save_fpu_regs(); 965 965 966 + if (MACHINE_HAS_VX) 967 + convert_vx_to_fp(fprs, target->thread.fpu.vxrs); 968 + else 969 + memcpy(&fprs, target->thread.fpu.fprs, sizeof(fprs)); 970 + 966 971 /* If setting FPC, must validate it first. */ 967 972 if (count > 0 && pos < offsetof(s390_fp_regs, fprs)) { 968 973 u32 ufpc[2] = { target->thread.fpu.fpc, 0 }; ··· 1071 1066 return -ENODEV; 1072 1067 if (target == current) 1073 1068 save_fpu_regs(); 1069 + 1070 + for (i = 0; i < __NUM_VXRS_LOW; i++) 1071 + vxrs[i] = *((__u64 *)(target->thread.fpu.vxrs + i) + 1); 1074 1072 1075 1073 rc = user_regset_copyin(&pos, &count, &kbuf, &ubuf, vxrs, 0, -1); 1076 1074 if (rc == 0)
+4 -3
arch/s390/mm/pgtable.c
··· 202 202 return pgste; 203 203 } 204 204 205 - static inline void ptep_xchg_commit(struct mm_struct *mm, 205 + static inline pte_t ptep_xchg_commit(struct mm_struct *mm, 206 206 unsigned long addr, pte_t *ptep, 207 207 pgste_t pgste, pte_t old, pte_t new) 208 208 { ··· 220 220 } else { 221 221 *ptep = new; 222 222 } 223 + return old; 223 224 } 224 225 225 226 pte_t ptep_xchg_direct(struct mm_struct *mm, unsigned long addr, ··· 232 231 preempt_disable(); 233 232 pgste = ptep_xchg_start(mm, addr, ptep); 234 233 old = ptep_flush_direct(mm, addr, ptep); 235 - ptep_xchg_commit(mm, addr, ptep, pgste, old, new); 234 + old = ptep_xchg_commit(mm, addr, ptep, pgste, old, new); 236 235 preempt_enable(); 237 236 return old; 238 237 } ··· 247 246 preempt_disable(); 248 247 pgste = ptep_xchg_start(mm, addr, ptep); 249 248 old = ptep_flush_lazy(mm, addr, ptep); 250 - ptep_xchg_commit(mm, addr, ptep, pgste, old, new); 249 + old = ptep_xchg_commit(mm, addr, ptep, pgste, old, new); 251 250 preempt_enable(); 252 251 return old; 253 252 }