4.17.2-stable review
Subsystems (4)
Greg Kroah-Hartman
maintainercover 4.17.2-stable review
This is the start of the stable review cycle for the 4.17.2 release. There are 45 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Jun 16 13:21:05 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.17.2-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.17.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.17.2-rc1
Bin Liu <[email protected]>
crypto: omap-sham - fix memleak
Michael Ellerman <[email protected]>
crypto: vmx - Remove overly verbose printk from AES XTS init
Michael Ellerman <[email protected]>
crypto: vmx - Remove overly verbose printk from AES init routines
Jan Glauber <[email protected]>
crypto: cavium - Limit result reading attempts
Jan Glauber <[email protected]>
crypto: cavium - Fix fallout from CONFIG_VMAP_STACK
Horia Geantă <[email protected]>
crypto: caam - fix size of RSA prime factor q
Horia Geantă <[email protected]>
crypto: caam/qi - fix IV DMA mapping and updating
Horia Geantă <[email protected]>
crypto: caam - fix IV DMA mapping and updating
Horia Geantă <[email protected]>
crypto: caam - fix DMA mapping dir for generated IV
Horia Geantă <[email protected]>
crypto: caam - strip input zeros from RSA input buffer
Johannes Wienke <[email protected]>
Input: elan_i2c - add ELAN0612 (Lenovo v330 14IKB) ACPI ID
Ethan Lee <[email protected]>
Input: goodix - add new ACPI id for GPD Win 2 touch screen
Gilad Ben-Yossef <[email protected]>
crypto: ccree - correct host regs offset
Dave Martin <[email protected]>
tty: pl011: Avoid spuriously stuck-off interrupts
Sean Wang <[email protected]>
arm64: defconfig: Enable CONFIG_PINCTRL_MT7622 by default
Stephen Hemminger <[email protected]>
doc: fix sysfs ABI documentation
Gil Kupfer <[email protected]>
vmw_balloon: fixing double free when batching mode is off
Tony Lindgren <[email protected]>
serial: 8250: omap: Fix idling of clocks for unused uarts
Marek Szyprowski <[email protected]>
serial: samsung: fix maxburst parameter for DMA transactions
Sebastian Andrzej Siewior <[email protected]>
tty/serial: atmel: use port->name as name in request_irq()
Geert Uytterhoeven <[email protected]>
serial: sh-sci: Stop using printk format %pCr
Yoshihiro Shimoda <[email protected]>
usb: gadget: udc: renesas_usb3: disable the controller's irqs for reconnecting
Yoshihiro Shimoda <[email protected]>
usb: gadget: udc: renesas_usb3: should fail if devm_phy_get() returns error
Yoshihiro Shimoda <[email protected]>
usb: gadget: udc: renesas_usb3: should call devm_phy_get() before add udc
Yoshihiro Shimoda <[email protected]>
usb: gadget: udc: renesas_usb3: should call pm_runtime_enable() before add udc
Yoshihiro Shimoda <[email protected]>
usb: gadget: udc: renesas_usb3: should remove debugfs
Yoshihiro Shimoda <[email protected]>
usb: gadget: udc: renesas_usb3: fix double phy_put()
Yoshihiro Shimoda <[email protected]>
usb: gadget: function: printer: avoid wrong list handling in printer_write()
Heikki Krogerus <[email protected]>
usb: typec: wcove: Remove dependency on HW FSM
Ruslan Bilovol <[email protected]>
usb: core: message: remove extra endianness conversion in usb_set_isoch_delay
Manu Gautam <[email protected]>
phy: qcom-qusb2: Fix crash if nvmem cell not specified
Ethan Lee <[email protected]>
Input: xpad - add GPD Win 2 Controller USB IDs
Alexander Kappner <[email protected]>
usb-storage: Add compatibility quirk flags for G-Technologies G-Drive
Alexander Kappner <[email protected]>
usb-storage: Add support for FL_ALWAYS_SYNC flag in the UAS driver
Gustavo A. R. Silva <[email protected]>
usbip: vhci_sysfs: fix potential Spectre v1
Greg Kroah-Hartman <[email protected]>
NFC: pn533: don't send USB data off of the stack
Laura Abbott <[email protected]>
staging: android: ion: Switch to pr_warn_once in ion_buffer_destroy
Paolo Bonzini <[email protected]>
kvm: x86: use correct privilege level for sgdt/sidt/fxsave/fxrstor access
Paolo Bonzini <[email protected]>
KVM: x86: pass kvm_vcpu to kvm_read_guest_virt and kvm_write_guest_virt_system
Felix Wilhelm <[email protected]>
kvm: nVMX: Enforce cpl=0 for VMX instructions
Michael S. Tsirkin <[email protected]>
kvm: fix typo in flag name
Paolo Bonzini <[email protected]>
KVM: x86: introduce linear_{read,write}_system
Wanpeng Li <[email protected]>
KVM: X86: Fix reserved bits check for MOV to CR3
Bart Van Assche <[email protected]>
blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers
Atul Gupta <[email protected]>
crypto: chelsio - request to HW should wrap
-------------
Diffstat:
Documentation/ABI/stable/sysfs-bus-vmbus | 40 +++--- Makefile | 4 +- arch/arm64/configs/defconfig | 1 + arch/x86/include/asm/kvm_emulate.h | 6 +- arch/x86/kvm/emulate.c | 76 +++++----- arch/x86/kvm/vmx.c | 38 +++-- arch/x86/kvm/x86.c | 61 +++++--- arch/x86/kvm/x86.h | 4 +- block/blk-zoned.c | 8 +- drivers/crypto/caam/caamalg.c | 231 ++++++++++++++----------------- drivers/crypto/caam/caamalg_qi.c | 227 +++++++++++++++--------------- drivers/crypto/caam/caampkc.c | 62 ++++++++- drivers/crypto/caam/caampkc.h | 8 ++ drivers/crypto/cavium/zip/common.h | 21 +++ drivers/crypto/cavium/zip/zip_crypto.c | 22 +-- drivers/crypto/cavium/zip/zip_deflate.c | 4 +- drivers/crypto/cavium/zip/zip_inflate.c | 4 +- drivers/crypto/ccree/cc_debugfs.c | 7 +- drivers/crypto/ccree/cc_driver.c | 8 +- drivers/crypto/ccree/cc_driver.h | 2 + drivers/crypto/ccree/cc_host_regs.h | 6 +- drivers/crypto/chelsio/chcr_ipsec.c | 35 +++-- drivers/crypto/omap-sham.c | 2 +- drivers/crypto/vmx/aes.c | 2 - drivers/crypto/vmx/aes_cbc.c | 3 - drivers/crypto/vmx/aes_ctr.c | 2 - drivers/crypto/vmx/aes_xts.c | 2 - drivers/crypto/vmx/ghash.c | 2 - drivers/input/joystick/xpad.c | 2 + drivers/input/mouse/elan_i2c_core.c | 1 + drivers/input/touchscreen/goodix.c | 1 + drivers/misc/vmw_balloon.c | 23 +-- drivers/nfc/pn533/usb.c | 42 ++++-- drivers/phy/qualcomm/phy-qcom-qusb2.c | 4 + drivers/staging/android/ion/ion.c | 5 +- drivers/tty/serial/8250/8250_omap.c | 16 ++- drivers/tty/serial/amba-pl011.c | 16 +++ drivers/tty/serial/atmel_serial.c | 5 +- drivers/tty/serial/samsung.c | 7 +- drivers/tty/serial/sh-sci.c | 4 +- drivers/usb/core/message.c | 2 +- drivers/usb/gadget/function/f_printer.c | 6 +- drivers/usb/gadget/udc/renesas_usb3.c | 37 +++-- drivers/usb/storage/uas.c | 6 + drivers/usb/storage/unusual_devs.h | 9 ++ drivers/usb/storage/unusual_uas.h | 9 ++ drivers/usb/typec/typec_wcove.c | 30 +++- drivers/usb/usbip/vhci_sysfs.c | 24 ++-- include/uapi/linux/kvm.h | 4 +- tools/include/uapi/linux/kvm.h | 4 +- 50 files changed, 685 insertions(+), 460 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/45 crypto: chelsio - request to HW should wrap
4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Atul Gupta <[email protected]>
commit 4c826fed675dfffd8485c5477b616d61d1ec9e9a upstream.
-Tx request and data is copied to HW Q in 64B desc, check for end of queue and adjust the current position to start from beginning before passing the additional request info. -key context copy should check key length only
-Few reverse christmas tree correction
--- drivers/crypto/chelsio/chcr_ipsec.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-)
drivers/crypto/chelsio/chcr_ipsec.c +17 -18
@@ -346,18 +346,23 @@ inline void *copy_cpltx_pktxt(struct sk_struct net_device *dev, void *pos) { + struct cpl_tx_pkt_core *cpl; +struct sge_eth_txq *q;struct adapter *adap;struct port_info *pi; -struct sge_eth_txq *q; -struct cpl_tx_pkt_core *cpl; -u64 cntrl =0 ;u32 ctrl0, qidx; +u64 cntrl =0 ; +int left; pi =netdev_priv (dev); adap = pi->adapter; qidx = skb->queue_mapping; q = &adap->sge.ethtxq[qidx + pi->first_qset]; + left = (void *)q->q.stat - pos; +if (!left) + pos = q->q.desc; + cpl = (struct cpl_tx_pkt_core *)pos; cntrl =TXPKT_L4CSUM_DIS_F |TXPKT_IPCSUM_DIS_F ;
@@ -382,18 +387,17 @@ inline void *copy_key_cpltx_pktxt(structvoid *pos, struct ipsec_sa_entry *sa_entry) { - struct adapter *adap; -struct port_info *pi; -struct sge_eth_txq *q; -unsigned int len, qidx; struct _key_ctx *key_ctx;int left, eoq, key_len; +struct sge_eth_txq *q; +struct adapter *adap; +struct port_info *pi; +unsigned int qidx; pi =netdev_priv (dev); adap = pi->adapter; qidx = skb->queue_mapping; q = &adap->sge.ethtxq[qidx + pi->first_qset]; - len = sa_entry->enckey_len +sizeof (struct cpl_tx_pkt_core ); key_len = sa_entry->kctx_len;/* end of queue, reset pos to start of queue */
@@ -411,19 +415,14 @@ inline void *copy_key_cpltx_pktxt(struct pos +=sizeof (struct _key_ctx ); left -=sizeof (struct _key_ctx ); -if (likely (len <= left)) { +if (likely (key_len <= left)) {memcpy (key_ctx->key, sa_entry->key, key_len); pos += key_len; }else { -if (key_len <= left) { -memcpy (pos, sa_entry->key, key_len); - pos += key_len; - }else { -memcpy (pos, sa_entry->key, left); -memcpy (q->q.desc, sa_entry->key + left, - key_len - left); - pos = (u8 *)q->q.desc + (key_len - left); - } +memcpy (pos, sa_entry->key, left); +memcpy (q->q.desc, sa_entry->key + left, + key_len - left); + pos = (u8 *)q->q.desc + (key_len - left); }/* Copy CPL TX PKT XT */ pos =copy_cpltx_pktxt (skb, dev, pos);
Greg Kroah-Hartman
maintainerPATCH 2/45 blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
commit 327ea4adcfa37194739f1ec7c70568944d292281 upstream.
Avoid that complaints similar to the following appear in the kernel log if the number of zones is sufficiently large:
fio: page allocation failure: order:9, mode:0x140c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null)
Call Trace: dump_stack+0x63/0x88 warn_alloc+0xf5/0x190 __alloc_pages_slowpath+0x8f0/0xb0d __alloc_pages_nodemask+0x242/0x260 alloc_pages_current+0x6a/0xb0 kmalloc_order+0x18/0x50 kmalloc_order_trace+0x26/0xb0 __kmalloc+0x20e/0x220 blkdev_report_zones_ioctl+0xa5/0x1a0 blkdev_ioctl+0x1ba/0x930 block_ioctl+0x41/0x50 do_vfs_ioctl+0xaa/0x610 SyS_ioctl+0x79/0x90 do_syscall_64+0x79/0x1b0 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
--- block/blk-zoned.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
block/blk-zoned.c +6 -2
@@ -328,7 +328,11 @@ int blkdev_report_zones_ioctl(struct bloif (!rep.nr_zones)return -EINVAL ; - zones =kcalloc (rep.nr_zones,sizeof (struct blk_zone ),GFP_KERNEL ); +if (rep.nr_zones >INT_MAX /sizeof (struct blk_zone )) +return -ERANGE ; + + zones =kvmalloc (rep.nr_zones *sizeof (struct blk_zone ), +GFP_KERNEL | __GFP_ZERO);if (!zones)return -ENOMEM ;
@@ -350,7 +354,7 @@ int blkdev_report_zones_ioctl(struct blo } out: -kfree (zones); +kvfree (zones);return ret; }
Greg Kroah-Hartman
maintainerPATCH 4/45 KVM: x86: introduce linear_{read,write}_system
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paolo Bonzini <[email protected]>
commit 79367a65743975e5cac8d24d08eccc7fdae832b0 upstream.
Wrap the common invocation of ctxt->ops->read_std and ctxt->ops->write_std, so as to have a smaller patch when the functions grow another argument.
--- arch/x86/kvm/emulate.c | 64 ++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-)
arch/x86/kvm/emulate.c +32 -32
@@ -812,6 +812,19 @@ static inline int jmp_rel(struct x86_emureturn assign_eip_near (ctxt, ctxt->_eip + rel); } +static int linear_read_system (struct x86_emulate_ctxt *ctxt,ulong linear, +void *data,unsigned size) +{ +return ctxt->ops->read_std (ctxt, linear, data, size, &ctxt->exception); +} + +static int linear_write_system (struct x86_emulate_ctxt *ctxt, +ulong linear,void *data, +unsigned int size) +{ +return ctxt->ops->write_std (ctxt, linear, data, size, &ctxt->exception); +} + static int segmented_read_std(struct x86_emulate_ctxt *ctxt, struct segmented_address addr, void *data,
@@ -1496,8 +1509,7 @@ static int read_interrupt_descriptor(strreturn emulate_gp (ctxt, index <<3 |0x2 ); addr = dt.address + index *8 ; -return ctxt->ops->read_std (ctxt, addr, desc,sizeof *desc, - &ctxt->exception); +return linear_read_system (ctxt, addr, desc,sizeof *desc); } static void get_descriptor_table_ptr(struct x86_emulate_ctxt *ctxt,
@@ -1560,8 +1572,7 @@ static int read_segment_descriptor(strucif (rc !=X86EMUL_CONTINUE )return rc; -return ctxt->ops->read_std (ctxt, *desc_addr_p, desc,sizeof (*desc), - &ctxt->exception); +return linear_read_system (ctxt, *desc_addr_p, desc,sizeof (*desc)); }/* allowed just for 8 bytes segments */
@@ -1575,8 +1586,7 @@ static int write_segment_descriptor(struif (rc !=X86EMUL_CONTINUE )return rc; -return ctxt->ops->write_std (ctxt, addr, desc,sizeof *desc, - &ctxt->exception); +return linear_write_system (ctxt, addr, desc,sizeof *desc); } static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
@@ -1737,8 +1747,7 @@ static int __load_segment_descriptor(strreturn ret; } }else if (ctxt->mode ==X86EMUL_MODE_PROT64 ) { - ret = ctxt->ops->read_std (ctxt, desc_addr+8 , &base3, -sizeof (base3), &ctxt->exception); + ret =linear_read_system (ctxt, desc_addr+8 , &base3,sizeof (base3));if (ret !=X86EMUL_CONTINUE )return ret; if (emul_is_noncanonical_address(get_desc_base(&seg_desc) |
@@ -2051,11 +2060,11 @@ static int __emulate_int_real(struct x86 eip_addr = dt.address + (irq <<2 ); cs_addr = dt.address + (irq <<2 ) +2 ; - rc = ops->read_std (ctxt, cs_addr, &cs,2 , &ctxt->exception); + rc =linear_read_system (ctxt, cs_addr, &cs,2 );if (rc !=X86EMUL_CONTINUE )return rc; - rc = ops->read_std (ctxt, eip_addr, &eip,2 , &ctxt->exception); + rc =linear_read_system (ctxt, eip_addr, &eip,2 );if (rc !=X86EMUL_CONTINUE )return rc;
@@ -3053,35 +3062,30 @@ static int task_switch_16(struct x86_emu u16 tss_selector, u16 old_tss_sel, ulong old_tss_base, struct desc_struct *new_desc) { - const struct x86_emulate_ops *ops = ctxt->ops; struct tss_segment_16 tss_seg;int ret;u32 new_tss_base =get_desc_base (new_desc); - ret = ops->read_std (ctxt, old_tss_base, &tss_seg,sizeof tss_seg, - &ctxt->exception); + ret =linear_read_system (ctxt, old_tss_base, &tss_seg,sizeof tss_seg);if (ret !=X86EMUL_CONTINUE )return ret;save_state_to_tss16 (ctxt, &tss_seg); - ret = ops->write_std (ctxt, old_tss_base, &tss_seg,sizeof tss_seg, - &ctxt->exception); + ret =linear_write_system (ctxt, old_tss_base, &tss_seg,sizeof tss_seg);if (ret !=X86EMUL_CONTINUE )return ret; - ret = ops->read_std (ctxt, new_tss_base, &tss_seg,sizeof tss_seg, - &ctxt->exception); + ret =linear_read_system (ctxt, new_tss_base, &tss_seg,sizeof tss_seg);if (ret !=X86EMUL_CONTINUE )return ret;if (old_tss_sel !=0xffff ) { tss_seg.prev_task_link = old_tss_sel; - ret = ops->write_std (ctxt, new_tss_base, - &tss_seg.prev_task_link, -sizeof tss_seg.prev_task_link, - &ctxt->exception); + ret =linear_write_system (ctxt, new_tss_base, + &tss_seg.prev_task_link, +sizeof tss_seg.prev_task_link);if (ret !=X86EMUL_CONTINUE )return ret; }
@@ -3197,38 +3201,34 @@ static int task_switch_32(struct x86_emu u16 tss_selector, u16 old_tss_sel, ulong old_tss_base, struct desc_struct *new_desc) { - const struct x86_emulate_ops *ops = ctxt->ops; struct tss_segment_32 tss_seg;int ret;u32 new_tss_base =get_desc_base (new_desc);u32 eip_offset = offsetof(struct tss_segment_32 , eip);u32 ldt_sel_offset = offsetof(struct tss_segment_32 , ldt_selector); - ret = ops->read_std (ctxt, old_tss_base, &tss_seg,sizeof tss_seg, - &ctxt->exception); + ret =linear_read_system (ctxt, old_tss_base, &tss_seg,sizeof tss_seg);if (ret !=X86EMUL_CONTINUE )return ret;save_state_to_tss32 (ctxt, &tss_seg);/* Only GP registers and segment selectors are saved */ - ret = ops->write_std (ctxt, old_tss_base + eip_offset, &tss_seg.eip, - ldt_sel_offset - eip_offset, &ctxt->exception); + ret =linear_write_system (ctxt, old_tss_base + eip_offset, &tss_seg.eip, + ldt_sel_offset - eip_offset);if (ret !=X86EMUL_CONTINUE )return ret; - ret = ops->read_std (ctxt, new_tss_base, &tss_seg,sizeof tss_seg, - &ctxt->exception); + ret =linear_read_system (ctxt, new_tss_base, &tss_seg,sizeof tss_seg);if (ret !=X86EMUL_CONTINUE )return ret;if (old_tss_sel !=0xffff ) { tss_seg.prev_task_link = old_tss_sel; - ret = ops->write_std (ctxt, new_tss_base, - &tss_seg.prev_task_link, -sizeof tss_seg.prev_task_link, - &ctxt->exception); + ret =linear_write_system (ctxt, new_tss_base, + &tss_seg.prev_task_link, +sizeof tss_seg.prev_task_link);if (ret !=X86EMUL_CONTINUE )return ret; }
Greg Kroah-Hartman
maintainerPATCH 5/45 kvm: fix typo in flag name
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael S. Tsirkin <[email protected]>
commit 766d3571d8e50d3a73b77043dc632226f9e6b389 upstream.
KVM_X86_DISABLE_EXITS_HTL really refers to exit on halt. Obviously a typo: should be named KVM_X86_DISABLE_EXITS_HLT.
--- arch/x86/kvm/x86.c | 4 ++-- include/uapi/linux/kvm.h | 4 ++-- tools/include/uapi/linux/kvm.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
arch/x86/kvm/x86.c +2 -2
@@ -2894,7 +2894,7 @@ int kvm_vm_ioctl_check_extension(struct r =KVM_CLOCK_TSC_STABLE ;break ;case KVM_CAP_X86_DISABLE_EXITS : - r |=KVM_X86_DISABLE_EXITS_HTL |KVM_X86_DISABLE_EXITS_PAUSE ; + r |=KVM_X86_DISABLE_EXITS_HLT |KVM_X86_DISABLE_EXITS_PAUSE ;if (kvm_can_mwait_in_guest ()) r |=KVM_X86_DISABLE_EXITS_MWAIT ;break ;
@@ -4248,7 +4248,7 @@ split_irqchip_unlock:if ((cap->args[0 ] &KVM_X86_DISABLE_EXITS_MWAIT ) &&kvm_can_mwait_in_guest ()) kvm->arch.mwait_in_guest = true; -if (cap->args[0 ] &KVM_X86_DISABLE_EXITS_HTL ) +if (cap->args[0 ] &KVM_X86_DISABLE_EXITS_HLT ) kvm->arch.hlt_in_guest = true;if (cap->args[0 ] &KVM_X86_DISABLE_EXITS_PAUSE ) kvm->arch.pause_in_guest = true;
include/uapi/linux/kvm.h +2 -2
@@ -677,10 +677,10 @@ struct kvm_ioeventfd { };#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) -#define KVM_X86_DISABLE_EXITS_HTL (1 << 1) +#define KVM_X86_DISABLE_EXITS_HLT (1 << 1)#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ - KVM_X86_DISABLE_EXITS_HTL | \ + KVM_X86_DISABLE_EXITS_HLT | \ KVM_X86_DISABLE_EXITS_PAUSE)/* for KVM_ENABLE_CAP */
tools/include/uapi/linux/kvm.h +2 -2
@@ -677,10 +677,10 @@ struct kvm_ioeventfd { };#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) -#define KVM_X86_DISABLE_EXITS_HTL (1 << 1) +#define KVM_X86_DISABLE_EXITS_HLT (1 << 1)#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ - KVM_X86_DISABLE_EXITS_HTL | \ + KVM_X86_DISABLE_EXITS_HLT | \ KVM_X86_DISABLE_EXITS_PAUSE)/* for KVM_ENABLE_CAP */
Greg Kroah-Hartman
maintainerPATCH 6/45 kvm: nVMX: Enforce cpl=0 for VMX instructions
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Wilhelm <[email protected]>
commit 727ba748e110b4de50d142edca9d6a9b7e6111d8 upstream.
VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software.
--- arch/x86/kvm/vmx.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
arch/x86/kvm/vmx.c +13 -2
@@ -7670,6 +7670,12 @@ static int handle_vmon(struct kvm_vcpu *return 1 ; } +/* CPL=0 must be checked manually. */ +if (vmx_get_cpl (vcpu)) { +kvm_queue_exception (vcpu,UD_VECTOR ); +return 1 ; + } +if (vmx->nested.vmxon) {nested_vmx_failValid (vcpu,VMXERR_VMXON_IN_VMX_ROOT_OPERATION );return kvm_skip_emulated_instruction (vcpu);
@@ -7729,6 +7735,11 @@ static int handle_vmon(struct kvm_vcpu **/ static int nested_vmx_check_permission (struct kvm_vcpu *vcpu) { +if (vmx_get_cpl (vcpu)) { +kvm_queue_exception (vcpu,UD_VECTOR ); +return 0 ; + } +if (!to_vmx (vcpu)->nested.vmxon) {kvm_queue_exception (vcpu,UD_VECTOR );return 0 ;
@@ -8029,7 +8040,7 @@ static int handle_vmread(struct kvm_vcpuif (get_vmx_mem_address (vcpu, exit_qualification, vmx_instruction_info, true, &gva))return 1 ; -/* _system ok, as hardware has verified cpl=0 */ +/* _system ok, nested_vmx_check_permission has verified cpl=0 */ kvm_write_guest_virt_system (&vcpu->arch.emulate_ctxt, gva, &field_value, (is_long_mode (vcpu) ?8 :4 ),NULL ); }
@@ -8189,7 +8200,7 @@ static int handle_vmptrst(struct kvm_vcpif (get_vmx_mem_address (vcpu, exit_qualification, vmx_instruction_info, true, &vmcs_gva))return 1 ; -/* ok to use *_system, as hardware has verified cpl=0 */ +/* *_system ok, nested_vmx_check_permission has verified cpl=0 */ if (kvm_write_guest_virt_system (&vcpu->arch.emulate_ctxt, vmcs_gva, (void *)&to_vmx (vcpu)->nested.current_vmptr,sizeof (u64), &e)) {
Greg Kroah-Hartman
maintainerPATCH 7/45 KVM: x86: pass kvm_vcpu to kvm_read_guest_virt and kvm_write_guest_virt_system
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paolo Bonzini <[email protected]>
commit ce14e868a54edeb2e30cb7a7b104a2fc4b9d76ca upstream.
Int the next patch the emulator's .read_std and .write_std callbacks will grow another argument, which is not needed in kvm_read_guest_virt and kvm_write_guest_virt_system's callers. Since we have to make separate functions, let's give the currently existing names a nicer interface, too.
--- arch/x86/kvm/vmx.c | 23 ++++++++++------------- arch/x86/kvm/x86.c | 39 ++++++++++++++++++++++++++------------- arch/x86/kvm/x86.h | 4 ++-- 3 files changed, 38 insertions(+), 28 deletions(-)
arch/x86/kvm/vmx.c +10 -13
@@ -7588,8 +7588,7 @@ static int nested_vmx_get_vmptr(struct k vmcs_read32(VMX_INSTRUCTION_INFO), false, &gva))return 1 ; -if (kvm_read_guest_virt (&vcpu->arch.emulate_ctxt, gva, vmpointer, -sizeof (*vmpointer), &e)) { +if (kvm_read_guest_virt (vcpu, gva, vmpointer,sizeof (*vmpointer), &e)) {kvm_inject_page_fault (vcpu, &e);return 1 ; }
@@ -8041,8 +8040,8 @@ static int handle_vmread(struct kvm_vcpu vmx_instruction_info, true, &gva))return 1 ;/* _system ok, nested_vmx_check_permission has verified cpl=0 */ -kvm_write_guest_virt_system (&vcpu->arch.emulate_ctxt, gva, - &field_value, (is_long_mode (vcpu) ?8 :4 ),NULL ); +kvm_write_guest_virt_system (vcpu, gva, &field_value, + (is_long_mode (vcpu) ?8 :4 ),NULL ); }nested_vmx_succeed (vcpu);
@@ -8080,8 +8079,8 @@ static int handle_vmwrite(struct kvm_vcpif (get_vmx_mem_address (vcpu, exit_qualification, vmx_instruction_info, false, &gva))return 1 ; -if (kvm_read_guest_virt (&vcpu->arch.emulate_ctxt, gva, - &field_value, (is_64_bit_mode (vcpu) ?8 :4 ), &e)) { +if (kvm_read_guest_virt (vcpu, gva, &field_value, + (is_64_bit_mode (vcpu) ?8 :4 ), &e)) {kvm_inject_page_fault (vcpu, &e);return 1 ; }
@@ -8201,9 +8200,9 @@ static int handle_vmptrst(struct kvm_vcp vmx_instruction_info, true, &vmcs_gva))return 1 ;/* *_system ok, nested_vmx_check_permission has verified cpl=0 */ -if (kvm_write_guest_virt_system (&vcpu->arch.emulate_ctxt, vmcs_gva, - (void *)&to_vmx (vcpu)->nested.current_vmptr, -sizeof (u64), &e)) { +if (kvm_write_guest_virt_system (vcpu, vmcs_gva, + (void *)&to_vmx (vcpu)->nested.current_vmptr, +sizeof (u64), &e)) {kvm_inject_page_fault (vcpu, &e);return 1 ; }
@@ -8250,8 +8249,7 @@ static int handle_invept(struct kvm_vcpuif (get_vmx_mem_address (vcpu,vmcs_readl (EXIT_QUALIFICATION ), vmx_instruction_info, false, &gva))return 1 ; -if (kvm_read_guest_virt (&vcpu->arch.emulate_ctxt, gva, &operand, -sizeof (operand), &e)) { +if (kvm_read_guest_virt (vcpu, gva, &operand,sizeof (operand), &e)) {kvm_inject_page_fault (vcpu, &e);return 1 ; }
@@ -8315,8 +8313,7 @@ static int handle_invvpid(struct kvm_vcpif (get_vmx_mem_address (vcpu,vmcs_readl (EXIT_QUALIFICATION ), vmx_instruction_info, false, &gva))return 1 ; -if (kvm_read_guest_virt (&vcpu->arch.emulate_ctxt, gva, &operand, -sizeof (operand), &e)) { +if (kvm_read_guest_virt (vcpu, gva, &operand,sizeof (operand), &e)) {kvm_inject_page_fault (vcpu, &e);return 1 ; }
arch/x86/kvm/x86.c +26 -13
@@ -4787,11 +4787,10 @@ static int kvm_fetch_guest_virt(struct xreturn X86EMUL_CONTINUE ; } -int kvm_read_guest_virt (struct x86_emulate_ctxt *ctxt, +int kvm_read_guest_virt (struct kvm_vcpu *vcpu,gva_t addr,void *val,unsigned int bytes,struct x86_exception *exception) { -struct kvm_vcpu *vcpu =emul_to_vcpu (ctxt);u32 access = (kvm_x86_ops->get_cpl (vcpu) ==3 ) ?PFERR_USER_MASK :0 ; return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access,
@@ -4799,9 +4798,9 @@ int kvm_read_guest_virt(struct x86_emula }EXPORT_SYMBOL_GPL (kvm_read_guest_virt); -static int kvm_read_guest_virt_system (struct x86_emulate_ctxt *ctxt, -gva_t addr,void *val,unsigned int bytes, -struct x86_exception *exception) +static int emulator_read_std (struct x86_emulate_ctxt *ctxt, +gva_t addr,void *val,unsigned int bytes, +struct x86_exception *exception) {struct kvm_vcpu *vcpu =emul_to_vcpu (ctxt);return kvm_read_guest_virt_helper (addr, val, bytes, vcpu,0 , exception);
@@ -4816,18 +4815,16 @@ static int kvm_read_guest_phys_system(streturn r <0 ?X86EMUL_IO_NEEDED :X86EMUL_CONTINUE ; } -int kvm_write_guest_virt_system (struct x86_emulate_ctxt *ctxt, -gva_t addr,void *val, -unsigned int bytes, -struct x86_exception *exception) +static int kvm_write_guest_virt_helper (gva_t addr,void *val,unsigned int bytes, +struct kvm_vcpu *vcpu,u32 access, +struct x86_exception *exception) { -struct kvm_vcpu *vcpu =emul_to_vcpu (ctxt);void *data = val;int r =X86EMUL_CONTINUE ;while (bytes) {gpa_t gpa = vcpu->arch.walk_mmu->gva_to_gpa (vcpu, addr, -PFERR_WRITE_MASK , + access, exception);unsigned offset = addr & (PAGE_SIZE -1 );unsigned towrite =min (bytes, (unsigned )PAGE_SIZE - offset);
@@ -4848,6 +4845,22 @@ int kvm_write_guest_virt_system(struct x out:return r; } + +static int emulator_write_std (struct x86_emulate_ctxt *ctxt,gva_t addr,void *val, +unsigned int bytes,struct x86_exception *exception) +{ +struct kvm_vcpu *vcpu =emul_to_vcpu (ctxt); + +return kvm_write_guest_virt_helper (addr, val, bytes, vcpu, +PFERR_WRITE_MASK , exception); +} + +int kvm_write_guest_virt_system (struct kvm_vcpu *vcpu,gva_t addr,void *val, +unsigned int bytes,struct x86_exception *exception) +{ +return kvm_write_guest_virt_helper (addr, val, bytes, vcpu, +PFERR_WRITE_MASK , exception); +}EXPORT_SYMBOL_GPL (kvm_write_guest_virt_system);int handle_ud (struct kvm_vcpu *vcpu)
@@ -5600,8 +5613,8 @@ static int emulator_pre_leave_smm(structstatic const struct x86_emulate_ops emulate_ops = { .read_gpr = emulator_read_gpr, .write_gpr = emulator_write_gpr, - .read_std = kvm_read_guest_virt_system, - .write_std = kvm_write_guest_virt_system, + .read_std = emulator_read_std, + .write_std = emulator_write_std, .read_phys = kvm_read_guest_phys_system, .fetch = kvm_fetch_guest_virt, .read_emulated = emulator_read_emulated,
arch/x86/kvm/x86.h +2 -2
@@ -247,11 +247,11 @@ int kvm_inject_realmode_interrupt(structvoid kvm_write_tsc (struct kvm_vcpu *vcpu,struct msr_data *msr);u64 get_kvmclock_ns (struct kvm *kvm); -int kvm_read_guest_virt (struct x86_emulate_ctxt *ctxt, +int kvm_read_guest_virt (struct kvm_vcpu *vcpu,gva_t addr,void *val,unsigned int bytes,struct x86_exception *exception); -int kvm_write_guest_virt_system (struct x86_emulate_ctxt *ctxt, +int kvm_write_guest_virt_system (struct kvm_vcpu *vcpu,gva_t addr,void *val,unsigned int bytes,struct x86_exception *exception);
Greg Kroah-Hartman
maintainerPATCH 8/45 kvm: x86: use correct privilege level for sgdt/sidt/fxsave/fxrstor access
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paolo Bonzini <[email protected]>
commit 3c9fa24ca7c9c47605672916491f79e8ccacb9e6 upstream.
The functions that were used in the emulation of fxrstor, fxsave, sgdt and sidt were originally meant for task switching, and as such they did not check privilege levels. This is very bad when the same functions are used in the emulation of unprivileged instructions. This is CVE-2018-10853.
The obvious fix is to add a new argument to ops->read_std and ops->write_std, which decides whether the access is a "system" access or should use the processor's CPL.
--- arch/x86/include/asm/kvm_emulate.h | 6 ++++-- arch/x86/kvm/emulate.c | 12 ++++++------ arch/x86/kvm/x86.c | 22 ++++++++++++++++------ 3 files changed, 26 insertions(+), 14 deletions(-)
arch/x86/include/asm/kvm_emulate.h +4 -2
@@ -107,11 +107,12 @@ struct x86_emulate_ops {* @addr: [IN ] Linear address from which to read. * @val: [OUT] Value read from memory, zero-extended to 'u_long'. * @bytes: [IN ] Number of bytes to read from memory. +* @system:[IN ] Whether the access is forced to be at CPL0. */ int (*read_std)(struct x86_emulate_ctxt *ctxt,unsigned long addr,void *val,unsigned int bytes, -struct x86_exception *fault); +struct x86_exception *fault,bool system);/* * read_phys: Read bytes of standard (non-emulated/special) memory.
@@ -129,10 +130,11 @@ struct x86_emulate_ops {* @addr: [IN ] Linear address to which to write. * @val: [OUT] Value write to memory, zero-extended to 'u_long'. * @bytes: [IN ] Number of bytes to write to memory. +* @system:[IN ] Whether the access is forced to be at CPL0. */ int (*write_std)(struct x86_emulate_ctxt *ctxt,unsigned long addr,void *val,unsigned int bytes, -struct x86_exception *fault); +struct x86_exception *fault,bool system);/* * fetch: Read bytes of standard (non-emulated/special) memory. * Used for instruction fetch.
arch/x86/kvm/emulate.c +6 -6
@@ -815,14 +815,14 @@ static inline int jmp_rel(struct x86_emustatic int linear_read_system (struct x86_emulate_ctxt *ctxt,ulong linear,void *data,unsigned size) { -return ctxt->ops->read_std (ctxt, linear, data, size, &ctxt->exception); +return ctxt->ops->read_std (ctxt, linear, data, size, &ctxt->exception, true); }static int linear_write_system (struct x86_emulate_ctxt *ctxt,ulong linear,void *data,unsigned int size) { -return ctxt->ops->write_std (ctxt, linear, data, size, &ctxt->exception); +return ctxt->ops->write_std (ctxt, linear, data, size, &ctxt->exception, true); } static int segmented_read_std(struct x86_emulate_ctxt *ctxt,
@@ -836,7 +836,7 @@ static int segmented_read_std(struct x86 rc =linearize (ctxt, addr, size, false, &linear);if (rc !=X86EMUL_CONTINUE )return rc; -return ctxt->ops->read_std (ctxt, linear, data, size, &ctxt->exception); +return ctxt->ops->read_std (ctxt, linear, data, size, &ctxt->exception, false); } static int segmented_write_std(struct x86_emulate_ctxt *ctxt,
@@ -850,7 +850,7 @@ static int segmented_write_std(struct x8 rc =linearize (ctxt, addr, size, true, &linear);if (rc !=X86EMUL_CONTINUE )return rc; -return ctxt->ops->write_std (ctxt, linear, data, size, &ctxt->exception); +return ctxt->ops->write_std (ctxt, linear, data, size, &ctxt->exception, false); }/*
@@ -2928,12 +2928,12 @@ static bool emulator_io_port_access_allo#ifdef CONFIG_X86_64 base |= ((u64 )base3) <<32 ;#endif - r = ops->read_std (ctxt, base +102 , &io_bitmap_ptr,2 ,NULL ); + r = ops->read_std (ctxt, base +102 , &io_bitmap_ptr,2 ,NULL , true);if (r !=X86EMUL_CONTINUE )return false;if (io_bitmap_ptr + port/8 >desc_limit_scaled (&tr_seg))return false; - r = ops->read_std (ctxt, base + io_bitmap_ptr + port/8 , &perm,2 ,NULL ); + r = ops->read_std (ctxt, base + io_bitmap_ptr + port/8 , &perm,2 ,NULL , true);if (r !=X86EMUL_CONTINUE )return false;if ((perm >> bit_idx) & mask)
arch/x86/kvm/x86.c +16 -6
@@ -4800,10 +4800,15 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_virt);static int emulator_read_std (struct x86_emulate_ctxt *ctxt,gva_t addr,void *val,unsigned int bytes, -struct x86_exception *exception) +struct x86_exception *exception,bool system) {struct kvm_vcpu *vcpu =emul_to_vcpu (ctxt); -return kvm_read_guest_virt_helper (addr, val, bytes, vcpu,0 , exception); +u32 access =0 ; + +if (!system && kvm_x86_ops->get_cpl (vcpu) ==3 ) + access |=PFERR_USER_MASK ; + +return kvm_read_guest_virt_helper (addr, val, bytes, vcpu, access, exception); } static int kvm_read_guest_phys_system(struct x86_emulate_ctxt *ctxt,
@@ -4847,12 +4852,17 @@ out: }static int emulator_write_std (struct x86_emulate_ctxt *ctxt,gva_t addr,void *val, -unsigned int bytes,struct x86_exception *exception) +unsigned int bytes,struct x86_exception *exception, +bool system) {struct kvm_vcpu *vcpu =emul_to_vcpu (ctxt); +u32 access =PFERR_WRITE_MASK ; + +if (!system && kvm_x86_ops->get_cpl (vcpu) ==3 ) + access |=PFERR_USER_MASK ;return kvm_write_guest_virt_helper (addr, val, bytes, vcpu, -PFERR_WRITE_MASK , exception); + access, exception); } int kvm_write_guest_virt_system(struct kvm_vcpu *vcpu, gva_t addr, void *val,
@@ -4871,8 +4881,8 @@ int handle_ud(struct kvm_vcpu *vcpu)struct x86_exception e;if (force_emulation_prefix && -kvm_read_guest_virt (&vcpu->arch.emulate_ctxt, -kvm_get_linear_rip (vcpu), sig,sizeof (sig), &e) ==0 && +kvm_read_guest_virt (vcpu,kvm_get_linear_rip (vcpu), + sig,sizeof (sig), &e) ==0 &&memcmp (sig,"\xf\xbkvm" ,sizeof (sig)) ==0 ) {kvm_rip_write (vcpu,kvm_rip_read (vcpu) +sizeof (sig)); emul_type =0 ;
Greg Kroah-Hartman
maintainerPATCH 9/45 staging: android: ion: Switch to pr_warn_once in ion_buffer_destroy
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laura Abbott <[email protected]>
commit 45ad559a29629cb1c64ee636563c69b71524f077 upstream.
Syzbot reported yet another warning with Ion:
WARNING: CPU: 0 PID: 1467 at drivers/staging/android/ion/ion.c:122 ion_buffer_destroy+0xd4/0x190 drivers/staging/android/ion/ion.c:122 Kernel panic - not syncing: panic_on_warn set ...
This is catching that a buffer was freed with an existing kernel mapping still present. This can be easily be triggered from userspace by calling DMA_BUF_SYNC_START without calling DMA_BUF_SYNC_END. Switch to a single pr_warn_once to indicate the error without being disruptive.
--- drivers/staging/android/ion/ion.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/android/ion/ion.c +4 -1
@@ -114,8 +114,11 @@ err2:void ion_buffer_destroy (struct ion_buffer *buffer) { -if (WARN_ON (buffer->kmap_cnt >0 )) +if (buffer->kmap_cnt >0 ) { +pr_warn_once ("%s: buffer still mapped in the kernel\n" , + __func__); buffer->heap->ops->unmap_kernel (buffer->heap, buffer); + } buffer->heap->ops->free (buffer);kfree (buffer); }
Greg Kroah-Hartman
maintainerPATCH 10/45 NFC: pn533: dont send USB data off of the stack
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Greg Kroah-Hartman <[email protected]>
commit dbafc28955fa6779dc23d1607a0fee5e509a278b upstream.
It's amazing that this driver ever worked, but now that x86 doesn't allow USB data to be sent off of the stack, it really does not work at all. Fix this up by properly allocating the data for the small "commands" that get sent to the device off of the stack.
We do this for one command by having a whole urb just for ack messages, as they can be submitted in interrupt context, so we can not use usb_bulk_msg(). But the poweron command can sleep (and does), so use usb_bulk_msg() for that transfer.
--- drivers/nfc/pn533/usb.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-)
drivers/nfc/pn533/usb.c +30 -12
@@ -62,6 +62,9 @@ struct pn533_usb_phy {struct urb *out_urb;struct urb *in_urb; +struct urb *ack_urb; +u8 *ack_buffer; +struct pn533 *priv; };
@@ -150,13 +153,16 @@ static int pn533_usb_send_ack(struct pn5struct pn533_usb_phy *phy = dev->phy;static const u8 ack[6 ] = {0x00 ,0x00 ,0xff ,0x00 ,0xff ,0x00 };/* spec 7.1.1.3: Preamble, SoPC (2), ACK Code (2), Postamble */ -int rc; - phy->out_urb->transfer_buffer = (u8 *)ack; - phy->out_urb->transfer_buffer_length =sizeof (ack); - rc =usb_submit_urb (phy->out_urb, flags); +if (!phy->ack_buffer) { + phy->ack_buffer =kmemdup (ack,sizeof (ack), flags); +if (!phy->ack_buffer) +return -ENOMEM ; + } -return rc; + phy->ack_urb->transfer_buffer = phy->ack_buffer; + phy->ack_urb->transfer_buffer_length =sizeof (ack); +return usb_submit_urb (phy->ack_urb, flags); } static int pn533_usb_send_frame(struct pn533 *dev,
@@ -375,26 +381,31 @@ static int pn533_acr122_poweron_rdr(stru/* Power on th reader (CCID cmd) */ u8 cmd[10 ] = {PN533_ACR122_PC_TO_RDR_ICCPOWERON ,0 ,0 ,0 ,0 ,0 ,0 ,3 ,0 ,0 }; +char *buffer; +int transferred;int rc;void *cntx;struct pn533_acr122_poweron_rdr_arg arg;dev_dbg (&phy->udev->dev,"%s\n" , __func__); + buffer =kmemdup (cmd,sizeof (cmd),GFP_KERNEL ); +if (!buffer) +return -ENOMEM ; +init_completion (&arg.done); cntx = phy->in_urb->context;/* backup context */ phy->in_urb->complete = pn533_acr122_poweron_rdr_resp; phy->in_urb->context = &arg; - phy->out_urb->transfer_buffer = cmd; - phy->out_urb->transfer_buffer_length =sizeof (cmd); -print_hex_dump_debug ("ACR122 TX: " ,DUMP_PREFIX_NONE ,16 ,1 , cmd,sizeof (cmd), false); - rc =usb_submit_urb (phy->out_urb,GFP_KERNEL ); -if (rc) { + rc =usb_bulk_msg (phy->udev, phy->out_urb->pipe, buffer,sizeof (cmd), + &transferred,0 ); +kfree (buffer); +if (rc || (transferred !=sizeof (cmd))) {nfc_err (&phy->udev->dev,"Reader power on cmd error %d\n" , rc);return rc;
@@ -490,8 +501,9 @@ static int pn533_usb_probe(struct usb_in phy->in_urb =usb_alloc_urb (0 ,GFP_KERNEL ); phy->out_urb =usb_alloc_urb (0 ,GFP_KERNEL ); + phy->ack_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!phy->in_urb || !phy->out_urb) +if (!phy->in_urb || !phy->out_urb || !phy->ack_urb) goto error; usb_fill_bulk_urb(phy->in_urb, phy->udev,
@@ -501,7 +513,9 @@ static int pn533_usb_probe(struct usb_inusb_fill_bulk_urb (phy->out_urb, phy->udev,usb_sndbulkpipe (phy->udev, out_endpoint),NULL ,0 , pn533_send_complete, phy); - +usb_fill_bulk_urb (phy->ack_urb, phy->udev, +usb_sndbulkpipe (phy->udev, out_endpoint), +NULL ,0 , pn533_send_complete, phy);switch (id->driver_info) {case PN533_DEVICE_STD :
@@ -554,6 +568,7 @@ static int pn533_usb_probe(struct usb_in error:usb_free_urb (phy->in_urb);usb_free_urb (phy->out_urb); +usb_free_urb (phy->ack_urb);usb_put_dev (phy->udev);kfree (in_buf);
@@ -573,10 +588,13 @@ static void pn533_usb_disconnect(structusb_kill_urb (phy->in_urb);usb_kill_urb (phy->out_urb); +usb_kill_urb (phy->ack_urb);kfree (phy->in_urb->transfer_buffer);usb_free_urb (phy->in_urb);usb_free_urb (phy->out_urb); +usb_free_urb (phy->ack_urb); +kfree (phy->ack_buffer);nfc_info (&interface->dev,"NXP PN533 NFC device disconnected\n" ); }
Greg Kroah-Hartman
maintainerPATCH 11/45 usbip: vhci_sysfs: fix potential Spectre v1
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gustavo A. R. Silva <[email protected]>
commit a0d6ec88090d7b1b008429c44532a388e29bb1bd upstream.
pdev_nr and rhport can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability.
This issue was detected with the help of Smatch:drivers/usb/usbip/vhci_sysfs.c:238 detach_store() warn: potential spectre issue 'vhcis' drivers/usb/usbip/vhci_sysfs.c:328 attach_store() warn: potential spectre issue 'vhcis' drivers/usb/usbip/vhci_sysfs.c:338 attach_store() warn: potential spectre issue 'vhci->vhci_hcd_ss->vdev' drivers/usb/usbip/vhci_sysfs.c:340 attach_store() warn: potential spectre issue 'vhci->vhci_hcd_hs->vdev'
Fix this by sanitizing pdev_nr and rhport before using them to index vhcis and vhci->vhci_hcd_ss->vdev respectively.
Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1].
[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
--- drivers/usb/usbip/vhci_sysfs.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
drivers/usb/usbip/vhci_sysfs.c +16 -8
@@ -10,6 +10,9 @@#include <linux/platform_device.h> #include <linux/slab.h> +/* Hardening for Spectre-v1 */ +#include <linux/nospec.h> +#include "usbip_common.h" #include "vhci.h"
@@ -205,16 +208,20 @@ static int vhci_port_disconnect(struct vreturn 0 ; } -static int valid_port (__u32 pdev_nr,__u32 rhport) +static int valid_port (__u32 *pdev_nr,__u32 *rhport) { -if (pdev_nr >= vhci_num_controllers) { -pr_err ("pdev %u\n" , pdev_nr); +if (*pdev_nr >= vhci_num_controllers) { +pr_err ("pdev %u\n" , *pdev_nr);return 0 ; } -if (rhport >=VHCI_HC_PORTS ) { -pr_err ("rhport %u\n" , rhport); + *pdev_nr =array_index_nospec (*pdev_nr, vhci_num_controllers); + +if (*rhport >=VHCI_HC_PORTS ) { +pr_err ("rhport %u\n" , *rhport);return 0 ; } + *rhport =array_index_nospec (*rhport,VHCI_HC_PORTS ); +return 1 ; }
@@ -232,7 +239,7 @@ static ssize_t detach_store(struct devic pdev_nr =port_to_pdev_nr (port); rhport =port_to_rhport (port); -if (!valid_port (pdev_nr, rhport)) +if (!valid_port (&pdev_nr, &rhport))return -EINVAL ; hcd =platform_get_drvdata (vhcis[pdev_nr].pdev);
@@ -258,7 +265,8 @@ static ssize_t detach_store(struct devic }static DEVICE_ATTR_WO (detach); -static int valid_args (__u32 pdev_nr,__u32 rhport,enum usb_device_speed speed) +static int valid_args (__u32 *pdev_nr,__u32 *rhport, +enum usb_device_speed speed) {if (!valid_port (pdev_nr, rhport)) {return 0 ;
@@ -322,7 +330,7 @@ static ssize_t attach_store(struct devic sockfd, devid, speed);/* check received parameters */ -if (!valid_args (pdev_nr, rhport, speed)) +if (!valid_args (&pdev_nr, &rhport, speed))return -EINVAL ; hcd =platform_get_drvdata (vhcis[pdev_nr].pdev);
Greg Kroah-Hartman
maintainerPATCH 12/45 usb-storage: Add support for FL_ALWAYS_SYNC flag in the UAS driver
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Kappner <[email protected]>
commit 8c4e97ddfe73a0958bb0abf7e6a3bc4cc3e04936 upstream.
The ALWAYS_SYNC flag is currently honored by the usb-storage driver but not UAS and is required to work around devices that become unstable upon being queried for cache. This code is taken straight from:drivers/usb/storage/scsiglue.c:284
--- drivers/usb/storage/uas.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/usb/storage/uas.c +6 -0
@@ -836,6 +836,12 @@ static int uas_slave_configure(struct scif (devinfo->flags &US_FL_BROKEN_FUA ) sdev->broken_fua =1 ; +/* UAS also needs to support FL_ALWAYS_SYNC */ +if (devinfo->flags &US_FL_ALWAYS_SYNC ) { + sdev->skip_ms_page_3f =1 ; + sdev->skip_ms_page_8 =1 ; + sdev->wce_default_on =1 ; + }scsi_change_queue_depth (sdev, devinfo->qdepth -2 );return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 13/45 usb-storage: Add compatibility quirk flags for G-Technologies G-Drive
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Kappner <[email protected]>
commit ca7d9515d0e6825351ce106066cea1f60e40b1c8 upstream.
The "G-Drive" (sold by G-Technology) external USB 3.0 drive
hangs on write access under UAS and usb-storage:
[ 136.079121] sd 15:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 136.079144] sd 15:0:0:0: [sdi] tag#0 Sense Key : Illegal Request [current] [ 136.079152] sd 15:0:0:0: [sdi] tag#0 Add. Sense: Invalid field in cdb [ 136.079176] sd 15:0:0:0: [sdi] tag#0 CDB: Write(16) 8a 08 00 00 00 00 00 00 00 00 00 00 00 08 00 00 [ 136.079180] print_req_error: critical target error, dev sdi, sector 0 [ 136.079183] Buffer I/O error on dev sdi, logical block 0, lost sync page write [ 136.173148] EXT4-fs (sdi): mounted filesystem with ordered data mode. Opts: (null) [ 140.583998] sd 15:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 140.584010] sd 15:0:0:0: [sdi] tag#0 Sense Key : Illegal Request [current] [ 140.584016] sd 15:0:0:0: [sdi] tag#0 Add. Sense: Invalid field in cdb [ 140.584022] sd 15:0:0:0: [sdi] tag#0 CDB: Write(16) 8a 08 00 00 00 00 e8 c4 00 18 00 00 00 08 00 00 [ 140.584025] print_req_error: critical target error, dev sdi, sector 3905159192 [ 140.584044] print_req_error: critical target error, dev sdi, sector 3905159192 [ 140.584052] Aborting journal on device sdi-8.
The proposed patch adds compatibility quirks. Because the drive requires two quirks (one to work with UAS, and another to work with usb-storage), adding this under unusual_devs.h and not just unusual_uas.h so kernels compiled without UAS receive the quirk. With the patch, the drive works reliably on UAS and usb- storage.
(tested on NEC Corporation uPD720200 USB 3.0 host controller).
--- drivers/usb/storage/unusual_devs.h | 9 +++++++++ drivers/usb/storage/unusual_uas.h | 9 +++++++++ 2 files changed, 18 insertions(+)
drivers/usb/storage/unusual_devs.h +9 -0
@@ -2321,6 +2321,15 @@ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x "Micro Mini 1GB", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), +/* "G-DRIVE" external HDD hangs on write without these. +* Patch submitted by Alexander Kappner <[email protected]> +*/ +UNUSUAL_DEV (0x4971 ,0x8024 ,0x0000 ,0x9999 , +"SimpleTech" , +"External HDD" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_ALWAYS_SYNC), +/* * Nick Bowler <[email protected]> * SCSI stack spams (otherwise harmless) error messages.
drivers/usb/storage/unusual_uas.h +9 -0
@@ -107,3 +107,12 @@ UNUSUAL_DEV(0x4971, 0x8017, 0x0000, 0x99 "External HDD", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_OPCODES), + +/* "G-DRIVE" external HDD hangs on write without these. +* Patch submitted by Alexander Kappner <[email protected]> +*/ +UNUSUAL_DEV (0x4971 ,0x8024 ,0x0000 ,0x9999 , +"SimpleTech" , +"External HDD" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_ALWAYS_SYNC),
Greg Kroah-Hartman
maintainerPATCH 14/45 Input: xpad - add GPD Win 2 Controller USB IDs
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ethan Lee <[email protected]>
commit c1ba08390a8bb13c927e699330896adc15b78205 upstream.
GPD Win 2 Website: http://www.gpd.hk/gpdwin2.asp
Tested on a unit from the first production run sent to Indiegogo backers
--- drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/input/joystick/xpad.c +2 -0
@@ -123,6 +123,7 @@ static const struct xpad_device {u8 mapping;u8 xtype; } xpad_device[] = { + { 0x0079, 0x18d4, "GPD Win 2 Controller", 0, XTYPE_XBOX360 }, { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX }, { 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX }, { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
@@ -409,6 +410,7 @@ static const signed short xpad_abs_triggstatic const struct usb_device_id xpad_table[] = { {USB_INTERFACE_INFO ('X' ,'B' ,0 ) },/* X-Box USB-IF not approved class */ +XPAD_XBOX360_VENDOR (0x0079 ),/* GPD Win 2 Controller */ XPAD_XBOX360_VENDOR (0x044f ),/* Thrustmaster X-Box 360 controllers */ XPAD_XBOX360_VENDOR (0x045e ),/* Microsoft X-Box 360 controllers */ XPAD_XBOXONE_VENDOR (0x045e ),/* Microsoft X-Box One controllers */
Greg Kroah-Hartman
maintainerPATCH 15/45 phy: qcom-qusb2: Fix crash if nvmem cell not specified
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manu Gautam <[email protected]>
commit 0b4555e776ba0712c6fafb98b226b21fd05d2427 upstream.
Driver currently crashes due to NULL pointer deference while updating PHY tune register if nvmem cell is NULL. Since, fused value for Tune1/2 register is optional, we'd rather bail out.
--- drivers/phy/qualcomm/phy-qcom-qusb2.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/phy/qualcomm/phy-qcom-qusb2.c +4 -0
@@ -315,6 +315,10 @@ static void qusb2_phy_set_tune2_param(stconst struct qusb2_phy_cfg *cfg = qphy->cfg;u8 *val; +/* efuse register is optional */ +if (!qphy->cell) +return ; +/* * Read efuse register having TUNE2/1 parameter's high nibble. * If efuse register shows value as 0x0, or if we fail to find
Greg Kroah-Hartman
maintainerPATCH 16/45 usb: core: message: remove extra endianness conversion in usb_set_isoch_delay
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ruslan Bilovol <[email protected]>
commit 48b73d0fa11aa8613d51f7be61d2fa7f0ab05fd3 upstream.
No need to do extra endianness conversion inusb_set_isoch_delay because it is already done
in usb_control_msg()
--- drivers/usb/core/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/core/message.c +1 -1
@@ -940,7 +940,7 @@ int usb_set_isoch_delay(struct usb_devicreturn usb_control_msg (dev,usb_sndctrlpipe (dev,0 ),USB_REQ_SET_ISOCH_DELAY ,USB_DIR_OUT |USB_TYPE_STANDARD |USB_RECIP_DEVICE , -cpu_to_le16 (dev->hub_delay),0 ,NULL ,0 , + dev->hub_delay,0 ,NULL ,0 ,USB_CTRL_SET_TIMEOUT ); }
Greg Kroah-Hartman
maintainerPATCH 17/45 usb: typec: wcove: Remove dependency on HW FSM
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heikki Krogerus <[email protected]>
commit 05826ff135ee083d28c006fbde6e810f17437166 upstream.
The USB Type-C PHY in Intel WhiskeyCove PMIC has build-in USB Type-C state machine which we were relying on to configure the CC lines correctly. This patch removes that dependency and configures the CC line according to commands from the port manager (tcpm.c) in wcove_set_cc().
This fixes an issue where USB devices attached to the USB Type-C port do not get enumerated. When acting as source/host, the HW FSM sometimes fails to configure the PHY correctly.
--- drivers/usb/typec/typec_wcove.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-)
drivers/usb/typec/typec_wcove.c +28 -2
@@ -202,6 +202,10 @@ static int wcove_init(struct tcpc_dev *tstruct wcove_typec *wcove =tcpc_to_wcove (tcpc);int ret; + ret =regmap_write (wcove->regmap,USBC_CONTROL1 ,0 ); +if (ret) +return ret; +/* Unmask everything */ ret =regmap_write (wcove->regmap,USBC_IRQMASK1 ,0 );if (ret)
@@ -285,8 +289,30 @@ static int wcove_get_cc(struct tcpc_devstatic int wcove_set_cc (struct tcpc_dev *tcpc,enum typec_cc_status cc) { -/* XXX: Relying on the HW FSM to configure things correctly for now */ -return 0 ; +struct wcove_typec *wcove =tcpc_to_wcove (tcpc); +unsigned int ctrl; + +switch (cc) { +case TYPEC_CC_RD : + ctrl =USBC_CONTROL1_MODE_SNK ; +break ; +case TYPEC_CC_RP_DEF : + ctrl =USBC_CONTROL1_CURSRC_UA_80 |USBC_CONTROL1_MODE_SRC ; +break ; +case TYPEC_CC_RP_1_5 : + ctrl =USBC_CONTROL1_CURSRC_UA_180 |USBC_CONTROL1_MODE_SRC ; +break ; +case TYPEC_CC_RP_3_0 : + ctrl =USBC_CONTROL1_CURSRC_UA_330 |USBC_CONTROL1_MODE_SRC ; +break ; +case TYPEC_CC_OPEN : + ctrl =0 ; +break ; +default : +return -EINVAL ; + } + +return regmap_write (wcove->regmap,USBC_CONTROL1 , ctrl); }static int wcove_set_polarity (struct tcpc_dev *tcpc,enum typec_cc_polarity pol)
Greg Kroah-Hartman
maintainerPATCH 18/45 usb: gadget: function: printer: avoid wrong list handling in printer_write()
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yoshihiro Shimoda <[email protected]>
commit 4a014a7339f441b0851ce012f469c0fadac61c81 upstream.
When printer_write() calls usb_ep_queue(), a udc driver (e.g. renesas_usbhs driver) may call usb_gadget_giveback_request() in the udc .queue ops immediately. Then, printer_write() calls list_add(&req->list, &dev->tx_reqs_active) wrongly. After that, if we do unbind the printer driver, WARN_ON() happens in printer_func_unbind() because the list entry is not removed.
So, this patch moves list_add(&req->list, &dev->tx_reqs_active) calling before usb_ep_queue().
--- drivers/usb/gadget/function/f_printer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/gadget/function/f_printer.c +3 -3
@@ -631,19 +631,19 @@ printer_write(struct file *fd, const chareturn -EAGAIN ; } +list_add (&req->list, &dev->tx_reqs_active); +/* here, we unlock, and only unlock, to avoid deadlock. */ spin_unlock (&dev->lock); value =usb_ep_queue (dev->in_ep, req,GFP_ATOMIC );spin_lock (&dev->lock);if (value) { +list_del (&req->list);list_add (&req->list, &dev->tx_reqs);spin_unlock_irqrestore (&dev->lock, flags);mutex_unlock (&dev->lock_printer_io);return -EAGAIN ; } - -list_add (&req->list, &dev->tx_reqs_active); - }spin_unlock_irqrestore (&dev->lock, flags);
Greg Kroah-Hartman
maintainerPATCH 19/45 usb: gadget: udc: renesas_usb3: fix double phy_put()
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yoshihiro Shimoda <[email protected]>
commit 8223b2f89ca63e203dcb54148e30d94979f17b0b upstream.
This patch fixes an issue that this driver cause double phy_put() calling. This driver must not call phy_put() in the remove because the driver calls devm_phy_get() in the probe.
--- drivers/usb/gadget/udc/renesas_usb3.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/gadget/udc/renesas_usb3.c +0 -2
@@ -2408,8 +2408,6 @@ static int renesas_usb3_remove(struct plrenesas_usb3_dma_free_prd (usb3, &pdev->dev);__renesas_usb3_ep_free_request (usb3->ep0_req); -if (usb3->phy) -phy_put (usb3->phy);pm_runtime_disable (&pdev->dev);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 20/45 usb: gadget: udc: renesas_usb3: should remove debugfs
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yoshihiro Shimoda <[email protected]>
commit 1990cf7c21ea185cec98c6d45a82c04481261e35 upstream.
This patch fixes an issue that this driver doesn't remove its debugfs.
--- drivers/usb/gadget/udc/renesas_usb3.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/usb/gadget/udc/renesas_usb3.c +7 -1
@@ -333,6 +333,7 @@ struct renesas_usb3 {struct extcon_dev *extcon;struct work_struct extcon_work;struct phy *phy; +struct dentry *dentry;struct renesas_usb3_ep *usb3_ep;int num_usb3_eps;
@@ -2393,8 +2394,12 @@ static void renesas_usb3_debugfs_init(st file =debugfs_create_file ("b_device" ,0644 , root, usb3, &renesas_usb3_b_device_fops); -if (!file) +if (!file) {dev_info (dev,"%s: Can't create debugfs mode\n" , __func__); +debugfs_remove_recursive (root); + }else { + usb3->dentry = root; + } }/*------- platform_driver ------------------------------------------------*/
@@ -2402,6 +2407,7 @@ static int renesas_usb3_remove(struct pl {struct renesas_usb3 *usb3 =platform_get_drvdata (pdev); +debugfs_remove_recursive (usb3->dentry);device_remove_file (&pdev->dev, &dev_attr_role);usb_del_gadget_udc (&usb3->gadget);
Greg Kroah-Hartman
maintainerPATCH 21/45 usb: gadget: udc: renesas_usb3: should call pm_runtime_enable() before add udc
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yoshihiro Shimoda <[email protected]>
commit d998844016b24a8d71b9aa5eae7e51d70f2de438 upstream.
This patch fixes an issue that this driver causes panic if a gadget driver is already loaded because usb_add_gadget_udc() might call renesas_usb3_start() via .udc_start, and then pm_runtime_get_sync() in renesas_usb3_start() doesn't work correctly.
Note that the usb3_to_dev() macro should not be called at this timing because the macro uses the gadget structure.
--- drivers/usb/gadget/udc/renesas_usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/renesas_usb3.c +1 -1
@@ -2632,6 +2632,7 @@ static int renesas_usb3_probe(struct plaif (ret <0 ) goto err_alloc_prd; +pm_runtime_enable (&pdev->dev); ret =usb_add_gadget_udc (&pdev->dev, &usb3->gadget);if (ret <0 ) goto err_add_udc;
@@ -2653,7 +2654,6 @@ static int renesas_usb3_probe(struct plarenesas_usb3_debugfs_init (usb3, &pdev->dev);dev_info (&pdev->dev,"probed%s\n" , usb3->phy ?" with phy" :"" ); -pm_runtime_enable (usb3_to_dev (usb3));return 0 ;
Greg Kroah-Hartman
maintainerPATCH 22/45 usb: gadget: udc: renesas_usb3: should call devm_phy_get() before add udc
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yoshihiro Shimoda <[email protected]>
commit 003bc1dee216b1fb8e02040a95672bea0f1fe797 upstream.
This patch fixes an issue that this driver cannot call phy_init() if a gadget driver is alreadly loaded because usb_add_gadget_udc() might call renesas_usb3_start() via .udc_start.
This patch also revises the typo (s/an optional/optional/).
--- drivers/usb/gadget/udc/renesas_usb3.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/usb/gadget/udc/renesas_usb3.c +8 -8
@@ -2632,6 +2632,14 @@ static int renesas_usb3_probe(struct plaif (ret <0 ) goto err_alloc_prd; +/* +* This is optional. So, if this driver cannot get a phy, +* this driver will not handle a phy anymore. +*/ + usb3->phy =devm_phy_get (&pdev->dev,"usb" ); +if (IS_ERR (usb3->phy)) + usb3->phy =NULL ; +pm_runtime_enable (&pdev->dev); ret =usb_add_gadget_udc (&pdev->dev, &usb3->gadget);if (ret <0 )
@@ -2641,14 +2649,6 @@ static int renesas_usb3_probe(struct plaif (ret <0 ) goto err_dev_create; -/* -* This is an optional. So, if this driver cannot get a phy, -* this driver will not handle a phy anymore. -*/ - usb3->phy =devm_phy_get (&pdev->dev,"usb" ); -if (IS_ERR (usb3->phy)) - usb3->phy =NULL ; - usb3->workaround_for_vbus = priv->workaround_for_vbus;renesas_usb3_debugfs_init (usb3, &pdev->dev);
Greg Kroah-Hartman
maintainerPATCH 23/45 usb: gadget: udc: renesas_usb3: should fail if devm_phy_get() returns error
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yoshihiro Shimoda <[email protected]>
commit 0259068f63f23a665ded28647f2f9cdb6b20dc72 upstream.
This patch fixes an issue that this driver ignores errors other than the non-existence of the device, f.e. a memory allocation failure in devm_phy_get(). So, this patch replaces devm_phy_get() with devm_phy_optional_get().
--- drivers/usb/gadget/udc/renesas_usb3.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/usb/gadget/udc/renesas_usb3.c +5 -3
@@ -2636,9 +2636,11 @@ static int renesas_usb3_probe(struct pla* This is optional. So, if this driver cannot get a phy, * this driver will not handle a phy anymore. */ - usb3->phy =devm_phy_get (&pdev->dev,"usb" ); -if (IS_ERR (usb3->phy)) - usb3->phy =NULL ; + usb3->phy =devm_phy_optional_get (&pdev->dev,"usb" ); +if (IS_ERR (usb3->phy)) { + ret =PTR_ERR (usb3->phy); + goto err_add_udc; + }pm_runtime_enable (&pdev->dev); ret =usb_add_gadget_udc (&pdev->dev, &usb3->gadget);
Greg Kroah-Hartman
maintainerPATCH 24/45 usb: gadget: udc: renesas_usb3: disable the controllers irqs for reconnecting
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yoshihiro Shimoda <[email protected]>
commit bd6bce004d78b867ba0c6d3712f1c5b50398af9a upstream.
This patch fixes an issue that reconnection is possible to fail because unexpected state handling happens by the irqs. To fix the issue, the driver disables the controller's irqs when disconnected.
--- drivers/usb/gadget/udc/renesas_usb3.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/usb/gadget/udc/renesas_usb3.c +7 -0
@@ -623,6 +623,13 @@ static void usb3_disconnect(struct renesusb3_usb2_pullup (usb3,0 );usb3_clear_bit (usb3,USB30_CON_B3_CONNECT ,USB3_USB30_CON );usb3_reset_epc (usb3); +usb3_disable_irq_1 (usb3,USB_INT_1_B2_RSUM |USB_INT_1_B3_PLLWKUP | +USB_INT_1_B3_LUPSUCS |USB_INT_1_B3_DISABLE | +USB_INT_1_SPEED |USB_INT_1_B3_WRMRST | +USB_INT_1_B3_HOTRST |USB_INT_1_B2_SPND | +USB_INT_1_B2_L1SPND |USB_INT_1_B2_USBRST ); +usb3_clear_bit (usb3,USB_COM_CON_SPD_MODE ,USB3_USB_COM_CON ); +usb3_init_epc_registers (usb3);if (usb3->driver) usb3->driver->disconnect (&usb3->gadget);
Greg Kroah-Hartman
maintainerPATCH 25/45 serial: sh-sci: Stop using printk format %pCr
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
commit d63c16f8e1ab761775275adcf54f4bef7c330295 upstream.
Printk format "%pCr" will be removed soon, as clk_get_rate() must not be called in atomic context.
Replace it by open-coding the operation. This is safe here, as the code runs in task context.
To: Jia-Ju Bai <[email protected]>
To: Jonathan Corbet <[email protected]>
To: Michael Turquette <[email protected]>
To: Stephen Boyd <[email protected]>
To: Zhang Rui <[email protected]>
To: Eduardo Valentin <[email protected]>
To: Eric Anholt <[email protected]>
To: Stefan Wahren <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
--- drivers/tty/serial/sh-sci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/sh-sci.c +2 -2
@@ -2704,8 +2704,8 @@ found:dev_dbg (dev,"failed to get %s (%ld)\n" , clk_names[i],PTR_ERR (clk)); else - dev_dbg(dev, "clk %s is %pC rate %pCr\n", clk_names[i], - clk, clk); + dev_dbg(dev, "clk %s is %pC rate %lu\n", clk_names[i], + clk, clk_get_rate(clk)); sci_port->clks[i] =IS_ERR (clk) ?NULL : clk; }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 26/45 tty/serial: atmel: use port->name as name in request_irq()
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <[email protected]>
commit 9594b5be7ec110ed11acec58fa94f3f293668c85 upstream.
I was puzzled while looking at /proc/interrupts and random things showed up between reboots. This occurred more often but I realised it later. The "correct" output should be:
|38: 11861 atmel-aic5 2 Level ttyS0
but I saw sometimes
|38: 6426 atmel-aic5 2 Level tty1
and accounted it wrongly as correct. This is use after free and the former example randomly got the "old" pointer which pointed to the same content. With SLAB_FREELIST_RANDOM and HARDENED I even got
|38: 7067 atmel-aic5 2 Level E=Started User Manager for UID 0
or other nonsense.
As it turns out the tty, pointer that is accessed in atmel_startup(), is freed() before atmel_shutdown(). It seems to happen quite often that the tty for ttyS0 is allocated and freed while ->shutdown is not invoked. I don't do anything special - just a systemd boot :)
Use dev_name(&pdev->dev) as the IRQ name for request_irq(). This exists as long as the driver is loaded so no use-after-free here.
--- drivers/tty/serial/atmel_serial.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/tty/serial/atmel_serial.c +2 -3
@@ -1757,7 +1757,6 @@ static int atmel_startup(struct uart_por {struct platform_device *pdev =to_platform_device (port->dev);struct atmel_uart_port *atmel_port =to_atmel_uart_port (port); -struct tty_struct *tty = port->state->port.tty;int retval;/*
@@ -1772,8 +1771,8 @@ static int atmel_startup(struct uart_por* Allocate the IRQ */ retval =request_irq (port->irq, atmel_interrupt, -IRQF_SHARED |IRQF_COND_SUSPEND , - tty ? tty->name :"atmel_serial" , port); +IRQF_SHARED |IRQF_COND_SUSPEND , +dev_name (&pdev->dev), port);if (retval) {dev_err (port->dev,"atmel_startup - Can't get irq\n" );return retval;
Greg Kroah-Hartman
maintainerPATCH 27/45 serial: samsung: fix maxburst parameter for DMA transactions
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <[email protected]>
commit aa2f80e752c75e593b3820f42c416ed9458fa73e upstream.
The best granularity of residue that DMA engine can report is in the BURST units, so the serial driver must use MAXBURST = 1 and DMA_SLAVE_BUSWIDTH_1_BYTE if it relies on exact number of bytes transferred by DMA engine.
--- drivers/tty/serial/samsung.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/tty/serial/samsung.c +2 -5
@@ -862,15 +862,12 @@ static int s3c24xx_serial_request_dma(st dma->rx_conf.direction =DMA_DEV_TO_MEM ; dma->rx_conf.src_addr_width =DMA_SLAVE_BUSWIDTH_1_BYTE ; dma->rx_conf.src_addr = p->port.mapbase +S3C2410_URXH ; - dma->rx_conf.src_maxburst =16 ; + dma->rx_conf.src_maxburst =1 ; dma->tx_conf.direction =DMA_MEM_TO_DEV ; dma->tx_conf.dst_addr_width =DMA_SLAVE_BUSWIDTH_1_BYTE ; dma->tx_conf.dst_addr = p->port.mapbase +S3C2410_UTXH ; -if (dma_get_cache_alignment () >=16 ) - dma->tx_conf.dst_maxburst =16 ; -else - dma->tx_conf.dst_maxburst =1 ; + dma->tx_conf.dst_maxburst =1 ; dma->rx_chan =dma_request_chan (p->port.dev,"rx" );
Greg Kroah-Hartman
maintainerPATCH 28/45 serial: 8250: omap: Fix idling of clocks for unused uarts
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tony Lindgren <[email protected]>
commit 13dc04d0e5fdc25c8f713ad23fdce51cf2bf96ba upstream.
I noticed that unused UARTs won't necessarily idle properly always unless at least one byte tx transfer is done first.
After some debugging I narrowed down the problem to the scr register dma configuration bits that need to be set before softreset for the clocks to idle. Unless we do this, the module clkctrl idlest bits may be set to 1 instead of 3 meaning the clock will never idle and is blocking deeper idle states for the whole domain.
This might be related to the configuration done by the bootloader or kexec booting where certain configurations cause the 8250 or the clkctrl clock to jam in a way where setting of the scr bits and reset is needed to clear it. I've tried diffing the 8250 registers for the various modes, but did not see anything specific. So far I've only seen this on omap4 but I'm suspecting this might also happen on the other clkctrl using SoCs considering they already have a quirk enabled for UART_ERRATA_CLOCK_DISABLE.
Let's fix the issue by configuring scr before reset for basic dma even if we don't use it. The scr register will be reset when we do softreset few lines after, and we restore scr on resume. We should do this for all the SoCs with UART_ERRATA_CLOCK_DISABLE quirk flag set since the ones with UART_ERRATA_CLOCK_DISABLE are all based using clkctrl similar to omap4.
Looks like both OMAP_UART_SCR_DMAMODE_1 | OMAP_UART_SCR_DMAMODE_CTL bits are needed for the clkctrl to idle after a softreset.
And we need to add omap4 to also use the UART_ERRATA_CLOCK_DISABLE for the related workaround to be enabled. This same compatible value will also be used for omap5.
--- drivers/tty/serial/8250/8250_omap.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
drivers/tty/serial/8250/8250_omap.c +15 -1
@@ -1110,13 +1110,14 @@ static int omap8250_no_handle_irq(structreturn 0 ; } +static const u8 omap4_habit =UART_ERRATA_CLOCK_DISABLE ;static const u8 am3352_habit =OMAP_DMA_TX_KICK |UART_ERRATA_CLOCK_DISABLE ;static const u8 dra742_habit =UART_ERRATA_CLOCK_DISABLE ;static const struct of_device_id omap8250_dt_ids[] = { { .compatible ="ti,omap2-uart" }, { .compatible ="ti,omap3-uart" }, - { .compatible ="ti,omap4-uart" }, + { .compatible ="ti,omap4-uart" , .data = &omap4_habit, }, { .compatible ="ti,am3352-uart" , .data = &am3352_habit, }, { .compatible ="ti,am4372-uart" , .data = &am3352_habit, }, { .compatible ="ti,dra742-uart" , .data = &dra742_habit, },
@@ -1353,6 +1354,19 @@ static int omap8250_soft_reset(struct deint sysc;int syss; +/* +* At least on omap4, unused uarts may not idle after reset without +* a basic scr dma configuration even with no dma in use. The +* module clkctrl status bits will be 1 instead of 3 blocking idle +* for the whole clockdomain. The softreset below will clear scr, +* and we restore it on resume so this is safe to do on all SoCs +* needing omap8250_soft_reset() quirk. Do it in two writes as +* recommended in the comment for omap8250_update_scr(). +*/ +serial_out (up,UART_OMAP_SCR ,OMAP_UART_SCR_DMAMODE_1 ); +serial_out (up,UART_OMAP_SCR , +OMAP_UART_SCR_DMAMODE_1 |OMAP_UART_SCR_DMAMODE_CTL ); + sysc =serial_in (up,UART_OMAP_SYSC );/* softreset the UART */
Greg Kroah-Hartman
maintainerPATCH 29/45 vmw_balloon: fixing double free when batching mode is off
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gil Kupfer <[email protected]>
commit b23220fe054e92f616b82450fae8cd3ab176cc60 upstream.
The balloon.page field is used for two different purposes if batching is on or off. If batching is on, the field point to the page which is used to communicate with with the hypervisor. If it is off, balloon.page points to the page that is about to be (un)locked.
Unfortunately, this dual-purpose of the field introduced a bug: when the balloon is popped (e.g., when the machine is reset or the balloon driver is explicitly removed), the balloon driver frees, unconditionally, the page that is held in balloon.page. As a result, if batching is disabled, this leads to double freeing the last page that is sent to the hypervisor.
The following error occurs during rmmod when kernel checkers are on, and the balloon is not empty:
[ 42.307653] ------------[ cut here ]------------ [ 42.307657] Kernel BUG at ffffffffba1e4b28 [verbose debug info unavailable] [ 42.307720] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC [ 42.312512] Modules linked in: vmw_vsock_vmci_transport vsock ppdev joydev vmw_balloon(-) input_leds serio_raw vmw_vmci parport_pc shpchp parport i2c_piix4 nfit mac_hid autofs4 vmwgfx drm_kms_helper hid_generic syscopyarea sysfillrect usbhid sysimgblt fb_sys_fops hid ttm mptspi scsi_transport_spi ahci mptscsih drm psmouse vmxnet3 libahci mptbase pata_acpi [ 42.312766] CPU: 10 PID: 1527 Comm: rmmod Not tainted 4.12.0+ #5 [ 42.312803] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 09/30/2016 [ 42.313042] task: ffff9bf9680f8000 task.stack: ffffbfefc1638000 [ 42.313290] RIP: 0010:__free_pages+0x38/0x40 [ 42.313510] RSP: 0018:ffffbfefc163be98 EFLAGS: 00010246 [ 42.313731] RAX: 000000000000003e RBX: ffffffffc02b9720 RCX: 0000000000000006 [ 42.313972] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9bf97e08e0a0 [ 42.314201] RBP: ffffbfefc163be98 R08: 0000000000000000 R09: 0000000000000000 [ 42.314435] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffc02b97e4 [ 42.314505] R13: ffffffffc02b9748 R14: ffffffffc02b9728 R15: 0000000000000200 [ 42.314550] FS: 00007f3af5fec700(0000) GS:ffff9bf97e080000(0000) knlGS:0000000000000000 [ 42.314599] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 42.314635] CR2: 00007f44f6f4ab24 CR3: 00000003a7d12000 CR4: 00000000000006e0 [ 42.314864] Call Trace: [ 42.315774] vmballoon_pop+0x102/0x130 [vmw_balloon] [ 42.315816] vmballoon_exit+0x42/0xd64 [vmw_balloon] [ 42.315853] SyS_delete_module+0x1e2/0x250 [ 42.315891] entry_SYSCALL_64_fastpath+0x23/0xc2 [ 42.315924] RIP: 0033:0x7f3af5b0e8e7 [ 42.315949] RSP: 002b:00007fffe6ce0148 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 42.315996] RAX: ffffffffffffffda RBX: 000055be676401e0 RCX: 00007f3af5b0e8e7 [ 42.316951] RDX: 000000000000000a RSI: 0000000000000800 RDI: 000055be67640248 [ 42.317887] RBP: 0000000000000003 R08: 0000000000000000 R09: 1999999999999999 [ 42.318845] R10: 0000000000000883 R11: 0000000000000206 R12: 00007fffe6cdf130 [ 42.319755] R13: 0000000000000000 R14: 0000000000000000 R15: 000055be676401e0 [ 42.320606] Code: c0 74 1c f0 ff 4f 1c 74 02 5d c3 85 f6 74 07 e8 0f d8 ff ff 5d c3 31 f6 e8 c6 fb ff ff 5d c3 48 c7 c6 c8 0f c5 ba e8 58 be 02 00 <0f> 0b 66 0f 1f 44 00 00 66 66 66 66 90 48 85 ff 75 01 c3 55 48 [ 42.323462] RIP: __free_pages+0x38/0x40 RSP: ffffbfefc163be98 [ 42.325735] ---[ end trace 872e008e33f81508 ]---
To solve the bug, we eliminate the dual purpose of balloon.page.
--- drivers/misc/vmw_balloon.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-)
drivers/misc/vmw_balloon.c +7 -16
@@ -576,15 +576,9 @@ static void vmballoon_pop(struct vmballo } } -if (b->batch_page) { -vunmap (b->batch_page); - b->batch_page =NULL ; - } - -if (b->page) { -__free_page (b->page); - b->page =NULL ; - } +/* Clearing the batch_page unconditionally has no adverse effect */ +free_page ((unsigned long )b->batch_page); + b->batch_page =NULL ; }/*
@@ -991,16 +985,13 @@ static const struct vmballoon_ops vmballstatic bool vmballoon_init_batching (struct vmballoon *b) { - b->page =alloc_page (VMW_PAGE_ALLOC_NOSLEEP ); -if (!b->page) -return false; +struct page *page; - b->batch_page =vmap (&b->page,1 ,VM_MAP ,PAGE_KERNEL ); -if (!b->batch_page) { -__free_page (b->page); + page =alloc_page (GFP_KERNEL | __GFP_ZERO); +if (!page)return false; - } + b->batch_page =page_address (page);return true; }
Greg Kroah-Hartman
maintainerPATCH 30/45 doc: fix sysfs ABI documentation
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Hemminger <[email protected]>
commit f59acbc5e0f7f90452efd4c3318d5e5ec042c3e0 upstream.
In 4.9 kernel, the sysfs files for Hyper-V VMBus changed name but the documentation files were not updated. The current sysfs file names are /sys/bus/vmbus/devices/<UUID>/...
See commit 9a56e5d6a0ba ("Drivers: hv: make VMBus bus ids persistent") and commit f6b2db084b65 ("vmbus: make sysfs names consistent with PCI")
--- Documentation/ABI/stable/sysfs-bus-vmbus | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-)
Documentation/ABI/stable/sysfs-bus-vmbus +20 -20
@@ -1,25 +1,25 @@ -What: /sys/bus/vmbus/devices/vmbus_*/id +What: /sys/bus/vmbus/devices/<UUID>/id Date: Jul 2009 KernelVersion: 2.6.31 Contact: K. Y. Srinivasan <[email protected]> Description: The VMBus child_relid of the device's primary channel Users: tools/hv/lsvmbus -What: /sys/bus/vmbus/devices/vmbus_*/class_id +What: /sys/bus/vmbus/devices/<UUID>/class_id Date: Jul 2009 KernelVersion: 2.6.31 Contact: K. Y. Srinivasan <[email protected]> Description: The VMBus interface type GUID of the device Users: tools/hv/lsvmbus -What: /sys/bus/vmbus/devices/vmbus_*/device_id +What: /sys/bus/vmbus/devices/<UUID>/device_id Date: Jul 2009 KernelVersion: 2.6.31 Contact: K. Y. Srinivasan <[email protected]> Description: The VMBus interface instance GUID of the device Users: tools/hv/lsvmbus -What: /sys/bus/vmbus/devices/vmbus_*/channel_vp_mapping +What: /sys/bus/vmbus/devices/<UUID>/channel_vp_mapping Date: Jul 2015 KernelVersion: 4.2.0 Contact: K. Y. Srinivasan <[email protected]>
@@ -28,112 +28,112 @@ Description: The mapping of which primar Format: <channel's child_relid:the bound cpu's number> Users: tools/hv/lsvmbus -What: /sys/bus/vmbus/devices/vmbus_*/device +What: /sys/bus/vmbus/devices/<UUID>/device Date: Dec. 2015 KernelVersion: 4.5 Contact: K. Y. Srinivasan <[email protected]> Description: The 16 bit device ID of the device Users: tools/hv/lsvmbus and user level RDMA libraries -What: /sys/bus/vmbus/devices/vmbus_*/vendor +What: /sys/bus/vmbus/devices/<UUID>/vendor Date: Dec. 2015 KernelVersion: 4.5 Contact: K. Y. Srinivasan <[email protected]> Description: The 16 bit vendor ID of the device Users: tools/hv/lsvmbus and user level RDMA libraries -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN +What: /sys/bus/vmbus/devices/<UUID>/channels/<N> Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: Directory for per-channel information NN is the VMBUS relid associtated with the channel. -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/cpu +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/cpu Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: VCPU (sub)channel is affinitized to Users: tools/hv/lsvmbus and other debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/cpu +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/cpu Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: VCPU (sub)channel is affinitized to Users: tools/hv/lsvmbus and other debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/in_mask +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/in_mask Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: Host to guest channel interrupt mask Users: Debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/latency +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/latency Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: Channel signaling latency Users: Debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/out_mask +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/out_mask Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: Guest to host channel interrupt mask Users: Debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/pending +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/pending Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: Channel interrupt pending state Users: Debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/read_avail +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/read_avail Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: Bytes available to read Users: Debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/write_avail +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/write_avail Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: Bytes available to write Users: Debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/events +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/events Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: Number of times we have signaled the host Users: Debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/interrupts +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/interrupts Date: September. 2017 KernelVersion: 4.14 Contact: Stephen Hemminger <[email protected]> Description: Number of times we have taken an interrupt (incoming) Users: Debugging tools -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/subchannel_id +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/subchannel_id Date: January. 2018 KernelVersion: 4.16 Contact: Stephen Hemminger <[email protected]> Description: Subchannel ID associated with VMBUS channel Users: Debugging tools and userspace drivers -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/monitor_id +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/monitor_id Date: January. 2018 KernelVersion: 4.16 Contact: Stephen Hemminger <[email protected]> Description: Monitor bit associated with channel Users: Debugging tools and userspace drivers -What: /sys/bus/vmbus/devices/vmbus_*/channels/NN/ring +What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/ring Date: January. 2018 KernelVersion: 4.16 Contact: Stephen Hemminger <[email protected]>
Greg Kroah-Hartman
maintainerPATCH 31/45 arm64: defconfig: Enable CONFIG_PINCTRL_MT7622 by default
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Wang <[email protected]>
commit 1e31927aa64545ee97a2a41db9984c9931afc50a upstream.
Recently kernelCI reported the board mt7622-rfb1 has a fail test with
kernel: ERROR: did not start booting whose details could be seen at [1].
The cause is that UART0 can't output anything when it's missing a proper pin setup with current DTS, so the essential driver is always getting enabled to fix up the issue.
[1] https://kernelci.org/boot/id/5ad7d62759b51461bfb1f829/
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -320,6 +320,7 @@ CONFIG_PINCTRL_MAX77620=y CONFIG_PINCTRL_MSM8916=y CONFIG_PINCTRL_MSM8994=y CONFIG_PINCTRL_MSM8996=y +CONFIG_PINCTRL_MT7622=y CONFIG_PINCTRL_QDF2XXX=y CONFIG_PINCTRL_QCOM_SPMI_PMIC=y CONFIG_GPIO_DWAPB=y
Greg Kroah-Hartman
maintainerPATCH 32/45 tty: pl011: Avoid spuriously stuck-off interrupts
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Martin <[email protected]>
commit 4a7e625ce50412a7711efa0f2ef0b96ce3826759 upstream.
Commit 9b96fbacda34 ("serial: PL011: clear pending interrupts") clears the RX and receive timeout interrupts on pl011 startup, to avoid a screaming-interrupt scenario that can occur when the firmware or bootloader leaves these interrupts asserted.
This has been noted as an issue when running Linux on qemu [1].
Unfortunately, the above fix seems to lead to potential misbehaviour if the RX FIFO interrupt is asserted _non_ spuriously on driver startup, if the RX FIFO is also already full to the trigger level.
Clearing the RX FIFO interrupt does not change the FIFO fill level. In this scenario, because the interrupt is now clear and because the FIFO is already full to the trigger level, no new assertion of the RX FIFO interrupt can occur unless the FIFO is drained back below the trigger level. This never occurs because the pl011 driver is waiting for an RX FIFO interrupt to tell it that there is something to read, and does not read the FIFO at all until that interrupt occurs.
Thus, simply clearing "spurious" interrupts on startup may be misguided, since there is no way to be sure that the interrupts are truly spurious, and things can go wrong if they are not.
This patch instead clears the interrupt condition by draining the RX FIFO during UART startup, after clearing any potentially spurious interrupt. This should ensure that an interrupt will definitely be asserted if the RX FIFO subsequently becomes sufficiently full.
The drain is done at the point of enabling interrupts only. This means that it will occur any time the UART is newly opened through the tty layer. It will not apply to polled-mode use of the UART by
kgdboc: since that scenario cannot use interrupts by design, this should not matter. kgdboc will interact badly with "normal" use of the UART in any case: this patch makes no attempt to paper over such issues.
This patch does not attempt to address the case where the RX FIFO fills faster than it can be drained: that is a pathological hardware design problem that is beyond the scope of the driver to work around. As a failsafe, the number of poll iterations for draining the FIFO is limited to twice the FIFO size. This will ensure that the kernel at least boots even if it is impossible to drain the FIFO for some reason.
[1] [Qemu-devel] [Qemu-arm] [PATCH] pl011: do not put into fifo before enabled the interruption
https://lists.gnu.org/archive/html/qemu-devel/2018-01/msg06446.html
--- drivers/tty/serial/amba-pl011.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/tty/serial/amba-pl011.c +16 -0
@@ -1727,10 +1727,26 @@ static int pl011_allocate_irq(struct uar*/ static void pl011_enable_interrupts (struct uart_amba_port *uap) { +unsigned int i; +spin_lock_irq (&uap->port.lock);/* Clear out any spuriously appearing RX interrupts */ pl011_write (UART011_RTIS |UART011_RXIS , uap,REG_ICR ); + +/* +* RXIS is asserted only when the RX FIFO transitions from below +* to above the trigger threshold. If the RX FIFO is already +* full to the threshold this can't happen and RXIS will now be +* stuck off. Drain the RX FIFO explicitly to fix this: +*/ +for (i =0 ; i < uap->fifosize *2 ; ++i) { +if (pl011_read (uap,REG_FR ) & UART01x_FR_RXFE) +break ; + +pl011_read (uap,REG_DR ); + } + uap->im =UART011_RTIM ;if (!pl011_dma_rx_running (uap)) uap->im |=UART011_RXIM ;
Greg Kroah-Hartman
maintainerPATCH 33/45 crypto: ccree - correct host regs offset
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gilad Ben-Yossef <[email protected]>
commit 281a58c8326ca62ca6341f9d2cc2eb08044670e8 upstream.
The product signature and HW revision register have different offset on the older HW revisions.
This fixes the problem of the driver failing sanity check on silicon despite working on the FPGA emulation systems.
--- drivers/crypto/ccree/cc_debugfs.c | 7 +++++-- drivers/crypto/ccree/cc_driver.c | 8 ++++++-- drivers/crypto/ccree/cc_driver.h | 2 ++ drivers/crypto/ccree/cc_host_regs.h | 6 ++++-- 4 files changed, 17 insertions(+), 6 deletions(-)
drivers/crypto/ccree/cc_debugfs.c +5 -2
@@ -26,7 +26,8 @@ struct cc_debugfs_ctx {static struct dentry *cc_debugfs_dir;static struct debugfs_reg32 debug_regs[] = { -CC_DEBUG_REG (HOST_SIGNATURE ), + { .name ="SIGNATURE" },/* Must be 0th */ + { .name ="VERSION" },/* Must be 1st */ CC_DEBUG_REG (HOST_IRR ),CC_DEBUG_REG (HOST_POWER_DOWN_EN ),CC_DEBUG_REG (AXIM_MON_ERR ),
@@ -34,7 +35,6 @@ static struct debugfs_reg32 debug_regs[]CC_DEBUG_REG (HOST_IMR ),CC_DEBUG_REG (AXIM_CFG ),CC_DEBUG_REG (AXIM_CACHE_PARAMS ), -CC_DEBUG_REG (HOST_VERSION ),CC_DEBUG_REG (GPR_HOST ), CC_DEBUG_REG(AXIM_MON_COMP), };
@@ -58,6 +58,9 @@ int cc_debugfs_init(struct cc_drvdata *dstruct debugfs_regset32 *regset;struct dentry *file; + debug_regs[0 ].offset = drvdata->sig_offset; + debug_regs[1 ].offset = drvdata->ver_offset; + ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL );if (!ctx)return -ENOMEM ;
drivers/crypto/ccree/cc_driver.c +6 -2
@@ -207,9 +207,13 @@ static int init_cc_resources(struct platif (hw_rev->rev >=CC_HW_REV_712 ) { new_drvdata->hash_len_sz =HASH_LEN_SIZE_712 ; new_drvdata->axim_mon_offset =CC_REG (AXIM_MON_COMP ); + new_drvdata->sig_offset =CC_REG (HOST_SIGNATURE_712 ); + new_drvdata->ver_offset =CC_REG (HOST_VERSION_712 ); }else { new_drvdata->hash_len_sz =HASH_LEN_SIZE_630 ; new_drvdata->axim_mon_offset =CC_REG (AXIM_MON_COMP8 ); + new_drvdata->sig_offset =CC_REG (HOST_SIGNATURE_630 ); + new_drvdata->ver_offset =CC_REG (HOST_VERSION_630 ); }platform_set_drvdata (plat_dev, new_drvdata);
@@ -276,7 +280,7 @@ static int init_cc_resources(struct plat }/* Verify correct mapping */ - signature_val =cc_ioread (new_drvdata,CC_REG (HOST_SIGNATURE )); + signature_val =cc_ioread (new_drvdata, new_drvdata->sig_offset);if (signature_val != hw_rev->sig) {dev_err (dev,"Invalid CC signature: SIGNATURE=0x%08X != expected=0x%08X\n" , signature_val, hw_rev->sig);
@@ -287,7 +291,7 @@ static int init_cc_resources(struct plat/* Display HW versions */ dev_info (dev,"ARM CryptoCell %s Driver: HW version 0x%08X, Driver version %s\n" , - hw_rev->name,cc_ioread (new_drvdata,CC_REG (HOST_VERSION )), + hw_rev->name,cc_ioread (new_drvdata, new_drvdata->ver_offset),DRV_MODULE_VERSION ); rc =init_cc_regs (new_drvdata, true);
drivers/crypto/ccree/cc_driver.h +2 -0
@@ -129,6 +129,8 @@ struct cc_drvdata {enum cc_hw_rev hw_rev;u32 hash_len_sz;u32 axim_mon_offset; +u32 sig_offset; +u32 ver_offset; };struct cc_crypto_alg {
drivers/crypto/ccree/cc_host_regs.h +4 -2
@@ -45,7 +45,8 @@#define CC_HOST_ICR_DSCRPTR_WATERMARK_QUEUE0_CLEAR_BIT_SIZE 0x1UL#define CC_HOST_ICR_AXIM_COMP_INT_CLEAR_BIT_SHIFT 0x17UL#define CC_HOST_ICR_AXIM_COMP_INT_CLEAR_BIT_SIZE 0x1UL -#define CC_HOST_SIGNATURE_REG_OFFSET 0xA24UL +#define CC_HOST_SIGNATURE_712_REG_OFFSET 0xA24UL +#define CC_HOST_SIGNATURE_630_REG_OFFSET 0xAC8UL#define CC_HOST_SIGNATURE_VALUE_BIT_SHIFT 0x0UL#define CC_HOST_SIGNATURE_VALUE_BIT_SIZE 0x20UL#define CC_HOST_BOOT_REG_OFFSET 0xA28UL
@@ -105,7 +106,8 @@#define CC_HOST_BOOT_ONLY_ENCRYPT_LOCAL_BIT_SIZE 0x1UL#define CC_HOST_BOOT_AES_EXISTS_LOCAL_BIT_SHIFT 0x1EUL#define CC_HOST_BOOT_AES_EXISTS_LOCAL_BIT_SIZE 0x1UL -#define CC_HOST_VERSION_REG_OFFSET 0xA40UL +#define CC_HOST_VERSION_712_REG_OFFSET 0xA40UL +#define CC_HOST_VERSION_630_REG_OFFSET 0xAD8UL#define CC_HOST_VERSION_VALUE_BIT_SHIFT 0x0UL#define CC_HOST_VERSION_VALUE_BIT_SIZE 0x20UL#define CC_HOST_KFDE0_VALID_REG_OFFSET 0xA60UL
Greg Kroah-Hartman
maintainerPATCH 34/45 Input: goodix - add new ACPI id for GPD Win 2 touch screen
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ethan Lee <[email protected]>
commit 5ca4d1ae9bad0f59bd6f851c39b19f5366953666 upstream.
GPD Win 2 Website: http://www.gpd.hk/gpdwin2.asp
Tested on a unit from the first production run sent to Indiegogo backers
--- drivers/input/touchscreen/goodix.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/touchscreen/goodix.c +1 -0
@@ -933,6 +933,7 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id);#ifdef CONFIG_ACPI static const struct acpi_device_id goodix_acpi_match[] = { {"GDIX1001" ,0 }, + {"GDIX1002" ,0 }, { } };MODULE_DEVICE_TABLE (acpi, goodix_acpi_match);
Greg Kroah-Hartman
maintainerPATCH 35/45 Input: elan_i2c - add ELAN0612 (Lenovo v330 14IKB) ACPI ID
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Wienke <[email protected]>
commit e6e7e9cd8eed0e18217c899843bffbe8c7dae564 upstream.
Add ELAN0612 to the list of supported touchpads; this ID is used in Lenovo v330 14IKB devices.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199253
--- drivers/input/mouse/elan_i2c_core.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/mouse/elan_i2c_core.c +1 -0
@@ -1262,6 +1262,7 @@ static const struct acpi_device_id elan_ { "ELAN060B", 0 }, { "ELAN060C", 0 }, { "ELAN0611", 0 }, + { "ELAN0612", 0 }, { "ELAN1000", 0 }, { } };
Greg Kroah-Hartman
maintainerPATCH 41/45 crypto: cavium - Fix fallout from CONFIG_VMAP_STACK
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Glauber <[email protected]>
commit 37ff02acaa3d7be87ecb89f198a549ffd3ae2403 upstream.
Enabling virtual mapped kernel stacks breaks the thunderx_zip driver. On compression or decompression the executing CPU hangs in an endless loop. The reason for this is the usage of __pa by the driver which does no longer work for an address that is not part of the 1:1 mapping.
The zip driver allocates a result struct on the stack and needs to tell the hardware the physical address within this struct that is used to signal the completion of the request.
As the hardware gets the wrong address after the broken __pa conversion it writes to an arbitrary address. The zip driver then waits forever for the completion byte to contain a non-zero value.
Allocating the result struct from 1:1 mapped memory resolves this bug.
--- drivers/crypto/cavium/zip/zip_crypto.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
drivers/crypto/cavium/zip/zip_crypto.c +14 -8
@@ -124,7 +124,7 @@ int zip_compress(const u8 *src, unsigned struct zip_kernel_ctx *zip_ctx) {struct zip_operation *zip_ops =NULL ; -struct zip_state zip_state; +struct zip_state *zip_state;struct zip_device *zip =NULL ;int ret;
@@ -135,20 +135,23 @@ int zip_compress(const u8 *src, unsignedif (!zip)return -ENODEV ; -memset (&zip_state,0 ,sizeof (struct zip_state )); + zip_state =kzalloc (sizeof (*zip_state),GFP_ATOMIC ); +if (!zip_state) +return -ENOMEM ; + zip_ops = &zip_ctx->zip_comp; zip_ops->input_len = slen; zip_ops->output_len = *dlen;memcpy (zip_ops->input, src, slen); - ret =zip_deflate (zip_ops, &zip_state, zip); + ret =zip_deflate (zip_ops, zip_state, zip);if (!ret) { *dlen = zip_ops->output_len;memcpy (dst, zip_ops->output, *dlen); } - +kfree (zip_state);return ret; }
@@ -157,7 +160,7 @@ int zip_decompress(const u8 *src, unsign struct zip_kernel_ctx *zip_ctx) {struct zip_operation *zip_ops =NULL ; -struct zip_state zip_state; +struct zip_state *zip_state;struct zip_device *zip =NULL ;int ret;
@@ -168,7 +171,10 @@ int zip_decompress(const u8 *src, unsignif (!zip)return -ENODEV ; -memset (&zip_state,0 ,sizeof (struct zip_state )); + zip_state =kzalloc (sizeof (*zip_state),GFP_ATOMIC ); +if (!zip_state) +return -ENOMEM ; + zip_ops = &zip_ctx->zip_decomp;memcpy (zip_ops->input, src, slen);
@@ -179,13 +185,13 @@ int zip_decompress(const u8 *src, unsign zip_ops->input_len = slen; zip_ops->output_len = *dlen; - ret =zip_inflate (zip_ops, &zip_state, zip); + ret =zip_inflate (zip_ops, zip_state, zip);if (!ret) { *dlen = zip_ops->output_len;memcpy (dst, zip_ops->output, *dlen); } - +kfree (zip_state);return ret; }
Greg Kroah-Hartman
maintainerPATCH 42/45 crypto: cavium - Limit result reading attempts
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Glauber <[email protected]>
commit c782a8c43e94ba6c09e9de2d69b5e3a5840ce61c upstream.
After issuing a request an endless loop was used to read the completion state from memory which is asynchronously updated by the ZIP coprocessor.
Add an upper bound to the retry attempts to prevent a CPU getting stuck forever in case of an error. Additionally, add a read memory barrier and a small delay between the reading attempts.
--- drivers/crypto/cavium/zip/common.h | 21 +++++++++++++++++++++ drivers/crypto/cavium/zip/zip_deflate.c | 4 ++-- drivers/crypto/cavium/zip/zip_inflate.c | 4 ++-- 3 files changed, 25 insertions(+), 4 deletions(-)
drivers/crypto/cavium/zip/common.h +21 -0
@@ -46,8 +46,10 @@#ifndef __COMMON_H__#define __COMMON_H__ +#include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> +#include <linux/io.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/pci.h>
@@ -149,6 +151,25 @@ struct zip_operation {u32 sizeofzops; }; +static inline int zip_poll_result (union zip_zres_s *result) +{ +int retries =1000 ; + +while (!result->s.compcode) { +if (!--retries) { +pr_err ("ZIP ERR: request timed out" ); +return -ETIMEDOUT ; + } +udelay (10 ); +/* +* Force re-reading of compcode which is updated +* by the ZIP coprocessor. +*/ +rmb (); + } +return 0 ; +} +/* error messages */ #define zip_err(fmt, args...) pr_err("ZIP ERR:%s():%d: " \ fmt "\n", __func__, __LINE__, ## args)
drivers/crypto/cavium/zip/zip_deflate.c +2 -2
@@ -129,8 +129,8 @@ int zip_deflate(struct zip_operation *zi/* Stats update for compression requests submitted */ atomic64_inc (&zip_dev->stats.comp_req_submit); -while (!result_ptr->s.compcode) -continue ; +/* Wait for completion or error */ +zip_poll_result (result_ptr);/* Stats update for compression requests completed */ atomic64_inc (&zip_dev->stats.comp_req_complete);
drivers/crypto/cavium/zip/zip_inflate.c +2 -2
@@ -143,8 +143,8 @@ int zip_inflate(struct zip_operation *zi/* Decompression requests submitted stats update */ atomic64_inc (&zip_dev->stats.decomp_req_submit); -while (!result_ptr->s.compcode) -continue ; +/* Wait for completion or error */ +zip_poll_result (result_ptr);/* Decompression requests completed stats update */ atomic64_inc (&zip_dev->stats.decomp_req_complete);
Greg Kroah-Hartman
maintainerPATCH 43/45 crypto: vmx - Remove overly verbose printk from AES init routines
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <[email protected]>
commit 1411b5218adbcf1d45ddb260db5553c52e8d917c upstream.
In the vmx AES init routines we do a printk(KERN_INFO ...) to report the fallback implementation we're using.
However with a slow console this can significantly affect the speed of crypto operations. Using 'cryptsetup benchmark' the removal of the printk() leads to a ~5x speedup for aes-cbc decryption.
So remove them.
--- drivers/crypto/vmx/aes.c | 2 -- drivers/crypto/vmx/aes_cbc.c | 3 --- drivers/crypto/vmx/aes_ctr.c | 2 -- drivers/crypto/vmx/ghash.c | 2 -- 4 files changed, 9 deletions(-)
drivers/crypto/vmx/aes.c +0 -2
@@ -48,8 +48,6 @@ static int p8_aes_init(struct crypto_tfm alg, PTR_ERR(fallback));return PTR_ERR (fallback); } -printk (KERN_INFO "Using '%s' as fallback implementation.\n" , -crypto_tfm_alg_driver_name ((struct crypto_tfm *) fallback)); crypto_cipher_set_flags(fallback, crypto_cipher_get_flags((struct
drivers/crypto/vmx/aes_cbc.c +0 -3
@@ -52,9 +52,6 @@ static int p8_aes_cbc_init(struct crypto alg, PTR_ERR(fallback));return PTR_ERR (fallback); } -printk (KERN_INFO "Using '%s' as fallback implementation.\n" , -crypto_skcipher_driver_name (fallback)); - crypto_skcipher_set_flags( fallback,
drivers/crypto/vmx/aes_ctr.c +0 -2
@@ -50,8 +50,6 @@ static int p8_aes_ctr_init(struct crypto alg, PTR_ERR(fallback));return PTR_ERR (fallback); } -printk (KERN_INFO "Using '%s' as fallback implementation.\n" , -crypto_skcipher_driver_name (fallback)); crypto_skcipher_set_flags( fallback,
drivers/crypto/vmx/ghash.c +0 -2
@@ -64,8 +64,6 @@ static int p8_ghash_init_tfm(struct cryp alg, PTR_ERR(fallback));return PTR_ERR (fallback); } -printk (KERN_INFO "Using '%s' as fallback implementation.\n" , -crypto_tfm_alg_driver_name (crypto_shash_tfm (fallback))); crypto_shash_set_flags(fallback, crypto_shash_get_flags((struct crypto_shash
Greg Kroah-Hartman
maintainerPATCH 44/45 crypto: vmx - Remove overly verbose printk from AES XTS init
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <[email protected]>
commit 730f23b66095a700e2f0786abda6bca011b31558 upstream.
In p8_aes_xts_init() we do a printk(KERN_INFO ...) to report the fallback implementation we're using. However with a slow console this can significantly affect the speed of crypto operations. So remove it.
--- drivers/crypto/vmx/aes_xts.c | 2 -- 1 file changed, 2 deletions(-)
drivers/crypto/vmx/aes_xts.c +0 -2
@@ -53,8 +53,6 @@ static int p8_aes_xts_init(struct crypto alg, PTR_ERR(fallback));return PTR_ERR (fallback); } -printk (KERN_INFO "Using '%s' as fallback implementation.\n" , -crypto_skcipher_driver_name (fallback)); crypto_skcipher_set_flags( fallback,
Greg Kroah-Hartman
maintainerPATCH 45/45 crypto: omap-sham - fix memleak
In reply to Greg Kroah-Hartman4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bin Liu <[email protected]>
commit 9dbc8a0328efa485a6f5b68b867f9f523a3fbeff upstream.
The memory pages freed in omap_sham_finish_req() were less than those allocated in omap_sham_copy_sgs().
--- drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/omap-sham.c +1 -1
@@ -1087,7 +1087,7 @@ static void omap_sham_finish_req(structif (test_bit (FLAGS_SGS_COPIED , &dd->flags))free_pages ((unsigned long )sg_virt (ctx->sg), -get_order (ctx->sg->length)); +get_order (ctx->sg->length + ctx->bufcnt));if (test_bit (FLAGS_SGS_ALLOCED , &dd->flags))kfree (ctx->sg);
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.17.2 release. There are 45 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Jun 16 13:21:05 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.17.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.17.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Greg Kroah-Hartman
maintainerQuoted 15 lines · Shuah Khan
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.17.2 release. There are 45 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Jun 16 13:21:05 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.17.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.17.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 4 lines
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
Thanks for testing all of these and letting me know.
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.17.2 release. There are 45 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Jun 16 13:21:05 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.17.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.17.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm and x86_64.
NOTE:
fcntl36 is an intermittent failure on qemu arm32 for all branches. fcntl36.c:205: FAIL: Unexpected data offset 12304 value 9
Old open bug to investigate, https://bugs.linaro.org/show_bug.cgi?id=3339
Summary
------------------------------------------------------------------------
kernel: 4.17.2-rc1
git repo:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.17.y
git commit: f11fc39630770031c4dd042acc5ad98adc5de301
git describe: v4.17.1-46-gf11fc3963077
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.17-oe/build\
/v4.17.1-46-gf11fc3963077
^ Please join URL
No regressions (compared to build v4.17.1)
------------------------------------------------------------------------
Boards, architectures and test suites:
-------------------------------------
dragonboard-410c - arm64
* boot - pass: 21,
* kselftest - skip: 28, pass: 46, fail: 6
* libhugetlbfs - skip: 1, pass: 89, fail: 1
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - skip: 17, pass: 64,
* ltp-cve-tests - skip: 8, pass: 27,
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - skip: 6, pass: 60,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - skip: 1, pass: 21,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - pass: 14,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - skip: 131, pass: 1018,
* ltp-timers-tests - pass: 13,
hi6220-hikey - arm64
* boot - pass: 21,
* kselftest - skip: 22, pass: 53, fail: 4
* libhugetlbfs - skip: 1, pass: 90,
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - skip: 17, pass: 64,
* ltp-cve-tests - skip: 8, pass: 27,
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - skip: 1, pass: 21,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - skip: 4, pass: 10,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - skip: 132, pass: 1017,
* ltp-timers-tests - pass: 13,
juno-r2 - arm64
* boot - pass: 21,
* kselftest - skip: 24, pass: 51, fail: 5
* libhugetlbfs - skip: 1, pass: 90,
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - skip: 17, pass: 64,
* ltp-cve-tests - skip: 9, pass: 26,
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - skip: 6, pass: 60,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 22,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - skip: 4, pass: 10,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - skip: 131, pass: 1018,
* ltp-timers-tests - pass: 13,
qemu_arm
* boot - pass: 21,
* kselftest - skip: 32, pass: 45, fail: 8
* libhugetlbfs - skip: 1, pass: 87,
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - skip: 18, pass: 63,
* ltp-cve-tests - skip: 12, pass: 23,
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - skip: 5, pass: 61,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - skip: 1, pass: 21,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - skip: 7, pass: 7,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - skip: 94, pass: 1052, fail: 3
* ltp-timers-tests - pass: 13,
qemu_arm64
* boot - pass: 20, fail: 1
* kselftest - skip: 30, pass: 52, fail: 5
* libhugetlbfs - skip: 1, pass: 90,
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - skip: 17, pass: 64,
* ltp-cve-tests - skip: 10, pass: 25,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - skip: 6, pass: 60,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 22,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - skip: 6, pass: 8,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - skip: 154, pass: 995,
* ltp-timers-tests - pass: 13,
qemu_x86_64
* boot - pass: 21,
* kselftest - skip: 30, pass: 67, fail: 3
* libhugetlbfs - skip: 1, pass: 90,
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - skip: 17, pass: 64,
* ltp-cve-tests - skip: 4, pass: 31,
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - skip: 6, pass: 60,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 22,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - skip: 1, pass: 13,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - skip: 152, pass: 997,
* ltp-timers-tests - pass: 13,
x15 - arm
* boot - pass: 21,
* kselftest - skip: 29, pass: 47, fail: 8
* libhugetlbfs - skip: 1, pass: 87,
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - skip: 18, pass: 63,
* ltp-cve-tests - skip: 10, pass: 25,
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - skip: 5, pass: 61,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - skip: 2, pass: 20,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - skip: 1, pass: 13,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - skip: 76, pass: 1073,
* ltp-timers-tests - pass: 13,
x86_64
* boot - pass: 23,
* kselftest - skip: 25, pass: 66, fail: 2
* kselftest-vsyscall-mode-native - skip: 25, pass: 67, fail: 3
* kselftest-vsyscall-mode-none - skip: 25, pass: 65, fail: 3
* libhugetlbfs - skip: 1, pass: 90,
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - skip: 17, pass: 64,
* ltp-cve-tests - skip: 5, pass: 28, fail: 2
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - skip: 5, pass: 61,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 22,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - skip: 5, pass: 9,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - skip: 116, pass: 1033,
* ltp-timers-tests - pass: 13,
Signature · 2 lines
Linaro QA (BETA) https://qa-reports.linaro.org
Greg Kroah-Hartman
maintainerQuoted 15 lines · Naresh Kamboju
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.17.2 release. There are 45 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Jun 16 13:21:05 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.17.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.17.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 3 lines
thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm andx86_64.
Thanks for testing all of these and letting me know.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.17.2 release. There are 45 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Jun 16 13:21:05 UTC 2018. Anything received after that time might be too late.
Build results:
total: 134 pass: 134 fail: 0 Qemu test results: total: 150 pass: 150 fail: 0
Details are available at http://kerneltests.org/builders.
Guenter
Greg Kroah-Hartman
maintainerQuoted 9 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.17.2 release. There are 45 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Jun 16 13:21:05 UTC 2018. Anything received after that time might be too late.
Quoted 6 lines
Build results:
total: 134 pass: 134 fail: 0 Qemu test results: total: 150 pass: 150 fail: 0Details are available at http://kerneltests.org/builders.
Wonderful, thanks for testing all of these and letting me know.
greg k-h