s390 patches for the 3.16-rc7
Subsystems (4)
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus
to receive the following updates:
A couple of last minute bug fixes for 3.16, including a fix for ptrace to close a hole which allowed a user space program to write to the kernel address space.
David Hildenbrand (1):
s390: require mvcos facility, not tod clock steering facility
Ingo Tuchscherer (1):
s390/zcrypt: improve device probing for zcrypt adapter cards
Martin Schwidefsky (3):
s390/3270: correct size detection with the read-partition command s390/ptrace: fix PSW mask check
s390: fix restore of invalid floating-point-control
Yijing Wang (1):
s390/MSI: Use standard mask and unmask funtions
arch/s390/include/asm/switch_to.h | 4 +-- arch/s390/kernel/head.S | 6 ++--- arch/s390/kernel/ptrace.c | 12 +++++++-- arch/s390/pci/pci.c | 49 +++++-------------------------------- drivers/s390/char/raw3270.c | 1 - drivers/s390/crypto/ap_bus.c | 9 +++++-- 6 files changed, 28 insertions(+), 53 deletions(-)
arch/s390/include/asm/switch_to.h +2 -2
@@ -51,8 +51,8 @@ static inline int restore_fp_ctl(u32 *fpc)return 0 ; asmvolatile ( -"0: lfpc %1\n" -" la %0,0\n" +" lfpc %1\n" +"0: la %0,0\n" "1:\n" EX_TABLE(0b,1b) : "=d" (rc) : "Q" (*fpc), "0" (-EINVAL));
arch/s390/kernel/head.S +3 -3
@@ -437,11 +437,11 @@ ENTRY(startup_kdump) #if defined(CONFIG_64BIT) #if defined(CONFIG_MARCH_ZEC12) - .long 3, 0xc100efea, 0xf46ce800, 0x00400000 + .long 3, 0xc100eff2, 0xf46ce800, 0x00400000 #elif defined(CONFIG_MARCH_Z196) - .long 2, 0xc100efea, 0xf46c0000 + .long 2, 0xc100eff2, 0xf46c0000 #elif defined(CONFIG_MARCH_Z10) - .long 2, 0xc100efea, 0xf0680000 + .long 2, 0xc100eff2, 0xf0680000 #elif defined(CONFIG_MARCH_Z9_109) .long 1, 0xc100efc2 #elif defined(CONFIG_MARCH_Z990)
arch/s390/kernel/ptrace.c +10 -2
@@ -334,9 +334,14 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)unsigned long mask =PSW_MASK_USER ; mask |=is_ri_task (child) ?PSW_MASK_RI :0 ; -if ((data & ~mask) !=PSW_USER_BITS ) +if ((data ^PSW_USER_BITS ) & ~mask) +/* Invalid psw mask. */ +return -EINVAL ; +if ((data &PSW_MASK_ASC ) ==PSW_ASC_HOME ) +/* Invalid address-space-control bits */ return -EINVAL ;if ((data &PSW_MASK_EA ) && !(data &PSW_MASK_BA )) +/* Invalid addressing mode bits */ return -EINVAL ; } *(addr_t *)((addr_t ) &task_pt_regs (child)->psw + addr) = data;
@@ -672,9 +677,12 @@ static int __poke_user_compat(struct task_struct *child, mask |=is_ri_task (child) ?PSW32_MASK_RI :0 ;/* Build a 64 bit psw mask from 31 bit mask. */ -if ((tmp & ~mask) !=PSW32_USER_BITS ) +if ((tmp ^PSW32_USER_BITS ) & ~mask)/* Invalid psw mask. */ return -EINVAL ; +if ((data &PSW32_MASK_ASC ) ==PSW32_ASC_HOME ) +/* Invalid address-space-control bits */ +return -EINVAL ; regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER ) | (regs->psw.mask &PSW_MASK_BA ) | (__u64)(tmp & mask) <<32 ;
arch/s390/pci/pci.c +6 -43
69 lines not on this page · raw message
drivers/s390/char/raw3270.c +0 -1
@@ -633,7 +633,6 @@ raw3270_reset_device_cb(struct raw3270_request *rq, void *data) }else raw3270_writesf_readpart (rp);memset (&rp->init_reset,0 ,sizeof (rp->init_reset)); -memset (&rp->init_data,0 ,sizeof (rp->init_data)); } static int
drivers/s390/crypto/ap_bus.c +7 -2
@@ -901,10 +901,15 @@ static int ap_device_probe(struct device *dev)int rc; ap_dev->drv = ap_drv; + +spin_lock_bh (&ap_device_list_lock); +list_add (&ap_dev->list, &ap_device_list); +spin_unlock_bh (&ap_device_list_lock); + rc = ap_drv->probe ? ap_drv->probe (ap_dev) : -ENODEV ; -if (!rc) { +if (rc) {spin_lock_bh (&ap_device_list_lock); -list_add (&ap_dev->list, &ap_device_list); +list_del_init (&ap_dev->list);spin_unlock_bh (&ap_device_list_lock); }return rc;