Linux 4.16.16
Greg KH
maintainerI'm announcing the release of the 4.16.16 kernel.
All users of the 4.16 kernel series must upgrade.
The updated 4.16.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.16.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 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 | 53 +++++-- 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/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 ++- net/key/af_key.c | 45 ++++-- net/netfilter/nft_ct.c | 20 +- 44 files changed, 685 insertions(+), 443 deletions(-)
Alexander Kappner (2):
usb-storage: Add support for FL_ALWAYS_SYNC flag in the UAS driver
usb-storage: Add compatibility quirk flags for G-Technologies G-Drive
Atul Gupta (1):
crypto: chelsio - request to HW should wrap
Bart Van Assche (1):
blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers
Bin Liu (1):
crypto: omap-sham - fix memleak
Dave Martin (1):
tty: pl011: Avoid spuriously stuck-off interrupts
Ethan Lee (2):
Input: xpad - add GPD Win 2 Controller USB IDs
Input: goodix - add new ACPI id for GPD Win 2 touch screen
Felix Wilhelm (1):
kvm: nVMX: Enforce cpl=0 for VMX instructions
Geert Uytterhoeven (1):
serial: sh-sci: Stop using printk format %pCr
Gil Kupfer (1):
vmw_balloon: fixing double free when batching mode is off
Greg Kroah-Hartman (2):
NFC: pn533: don't send USB data off of the stack Linux 4.16.16
Gustavo A. R. Silva (1):
usbip: vhci_sysfs: fix potential Spectre v1
Heikki Krogerus (1):
usb: typec: wcove: Remove dependency on HW FSM
Horia Geantă (5):
crypto: caam - strip input zeros from RSA input buffer
crypto: caam - fix DMA mapping dir for generated IV
crypto: caam - fix IV DMA mapping and updating
crypto: caam/qi - fix IV DMA mapping and updating
crypto: caam - fix size of RSA prime factor q
Jan Glauber (2):
crypto: cavium - Fix fallout from CONFIG_VMAP_STACK
crypto: cavium - Limit result reading attempts
Johannes Wienke (1):
Input: elan_i2c - add ELAN0612 (Lenovo v330 14IKB) ACPI ID
Kevin Easton (1):
af_key: Always verify length of provided sadb_key
Laura Abbott (1):
staging: android: ion: Switch to pr_warn_once in ion_buffer_destroy
Manu Gautam (1):
phy: qcom-qusb2: Fix crash if nvmem cell not specified
Marek Szyprowski (1):
serial: samsung: fix maxburst parameter for DMA transactions
Michael Ellerman (2):
crypto: vmx - Remove overly verbose printk from AES init routines
crypto: vmx - Remove overly verbose printk from AES XTS init
Paolo Bonzini (3):
KVM: x86: introduce linear_{read,write}_system
KVM: x86: pass kvm_vcpu to kvm_read_guest_virt and kvm_write_guest_virt_system
kvm: x86: use correct privilege level for sgdt/sidt/fxsave/fxrstor access
Ruslan Bilovol (1):
usb: core: message: remove extra endianness conversion in usb_set_isoch_delay
Sebastian Andrzej Siewior (1):
tty/serial: atmel: use port->name as name in request_irq()
Taehee Yoo (1):
netfilter: nf_tables: fix NULL pointer dereference on nft_ct_helper_obj_dump()
Tony Lindgren (1):
serial: 8250: omap: Fix idling of clocks for unused uarts
Wanpeng Li (1):
KVM: X86: Fix reserved bits check for MOV to CR3
Yoshihiro Shimoda (7):
usb: gadget: function: printer: avoid wrong list handling in printer_write()
usb: gadget: udc: renesas_usb3: fix double phy_put()
usb: gadget: udc: renesas_usb3: should remove debugfs
usb: gadget: udc: renesas_usb3: should call pm_runtime_enable() before add udc
usb: gadget: udc: renesas_usb3: should call devm_phy_get() before add udc
usb: gadget: udc: renesas_usb3: should fail if devm_phy_get() returns error
usb: gadget: udc: renesas_usb3: disable the controller's irqs for reconnecting
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 16 -SUBLEVEL = 15 +SUBLEVEL = 16 EXTRAVERSION = NAME = Fearless Coyote
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 +39 -37
194 lines not on this page · raw message
arch/x86/kvm/vmx.c +23 -15
@@ -7344,8 +7344,7 @@ static int nested_vmx_get_vmptr(struct kvm_vcpu *vcpu, gpa_t *vmpointer) 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 ; }
@@ -7426,6 +7425,12 @@ static int handle_vmon(struct kvm_vcpu *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);
@@ -7485,6 +7490,11 @@ static int handle_vmon(struct kvm_vcpu *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 ;
@@ -7785,9 +7795,9 @@ static int handle_vmread(struct kvm_vcpu *vcpu)if (get_vmx_mem_address (vcpu, exit_qualification, vmx_instruction_info, true, &gva))return 1 ; -/* _system ok, as hardware has verified cpl=0 */ -kvm_write_guest_virt_system (&vcpu->arch.emulate_ctxt, gva, - &field_value, (is_long_mode (vcpu) ?8 :4 ),NULL ); +/* _system ok, nested_vmx_check_permission has verified cpl=0 */ +kvm_write_guest_virt_system (vcpu, gva, &field_value, + (is_long_mode (vcpu) ?8 :4 ),NULL ); }nested_vmx_succeed (vcpu);
@@ -7825,8 +7835,8 @@ static int handle_vmwrite(struct kvm_vcpu *vcpu)if (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 ; }
@@ -7945,10 +7955,10 @@ static int handle_vmptrst(struct kvm_vcpu *vcpu)if (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 */ -if (kvm_write_guest_virt_system (&vcpu->arch.emulate_ctxt, vmcs_gva, - (void *)&to_vmx (vcpu)->nested.current_vmptr, -sizeof (u64), &e)) { +/* *_system ok, nested_vmx_check_permission has verified cpl=0 */ +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 ; }
@@ -7995,8 +8005,7 @@ static int handle_invept(struct kvm_vcpu *vcpu)if (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 ; }
@@ -8060,8 +8069,7 @@ static int handle_invvpid(struct kvm_vcpu *vcpu)if (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 +38 -15
100 lines not on this page · raw message
arch/x86/kvm/x86.h +2 -2
@@ -213,11 +213,11 @@ int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq, int inc_eip);void 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);
block/blk-zoned.c +6 -2
@@ -328,7 +328,11 @@ int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode,if (!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 block_device *bdev, fmode_t mode, } out: -kfree (zones); +kvfree (zones);return ret; }
drivers/crypto/caam/caamalg.c +103 -128
473 lines not on this page · raw message
drivers/crypto/caam/caamalg_qi.c +116 -111
372 lines not on this page · raw message
drivers/crypto/caam/caampkc.c +58 -4
110 lines not on this page · raw message
drivers/crypto/caam/caampkc.h +8 -0
@@ -95,6 +95,14 @@ struct caam_rsa_ctx {struct device *dev; }; +/** +* caam_rsa_req_ctx - per request context. +* @src: input scatterlist (stripped of leading zeros) +*/ +struct caam_rsa_req_ctx { +struct scatterlist src[2 ]; +}; +/** * rsa_edesc - s/w-extended rsa descriptor * @src_nents : number of segments in input scatterlist
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_crypto.c +14 -8
@@ -124,7 +124,7 @@ int zip_compress(const u8 *src, unsigned int slen, 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, unsigned int slen,if (!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, unsigned int slen, 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, unsigned int slen,if (!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, unsigned int slen, 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; }
drivers/crypto/cavium/zip/zip_deflate.c +2 -2
@@ -129,8 +129,8 @@ int zip_deflate(struct zip_operation *zip_ops, struct zip_state *s,/* 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 *zip_ops, struct zip_state *s,/* 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);
drivers/crypto/chelsio/chcr_ipsec.c +17 -18
@@ -346,18 +346,23 @@ inline void *copy_cpltx_pktxt(struct sk_buff *skb,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;if (skb->ip_summed ==CHECKSUM_PARTIAL )
@@ -383,18 +388,17 @@ inline void *copy_key_cpltx_pktxt(struct sk_buff *skb,void *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 */
@@ -412,19 +416,14 @@ inline void *copy_key_cpltx_pktxt(struct sk_buff *skb, 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);
drivers/crypto/omap-sham.c +1 -1
@@ -1082,7 +1082,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err)if (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);
drivers/crypto/vmx/aes.c +0 -2
@@ -48,8 +48,6 @@ static int p8_aes_init(struct crypto_tfm *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_tfm *tfm) 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_tfm *tfm) 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_xts.c +0 -2
@@ -53,8 +53,6 @@ static int p8_aes_xts_init(struct crypto_tfm *tfm) 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 crypto_tfm *tfm) 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
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 },
@@ -408,6 +409,7 @@ static const signed short xpad_abs_triggers[] = {static 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 */
drivers/input/mouse/elan_i2c_core.c +1 -0
@@ -1262,6 +1262,7 @@ static const struct acpi_device_id elan_acpi_id[] = { { "ELAN060B", 0 }, { "ELAN060C", 0 }, { "ELAN0611", 0 }, + { "ELAN0612", 0 }, { "ELAN1000", 0 }, { } };
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);
drivers/misc/vmw_balloon.c +7 -16
@@ -576,15 +576,9 @@ static void vmballoon_pop(struct vmballoon *b) } } -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 vmballoon_batched_ops = {static 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; }
drivers/nfc/pn533/usb.c +30 -12
106 lines not on this page · raw message
drivers/phy/qualcomm/phy-qcom-qusb2.c +4 -0
@@ -178,6 +178,10 @@ static void qusb2_phy_set_tune2_param(struct qusb2_phy *qphy)struct device *dev = &qphy->phy->dev;u8 *val; +/* efuse register is optional */ +if (!qphy->cell) +return ; +/* * Read efuse register having TUNE2 parameter's high nibble. * If efuse register shows value as 0x0, or if we fail to find
drivers/staging/android/ion/ion.c +4 -1
@@ -119,8 +119,11 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,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); }
drivers/tty/serial/8250/8250_omap.c +15 -1
@@ -1101,13 +1101,14 @@ static int omap8250_no_handle_irq(struct uart_port *port)return 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, },
@@ -1344,6 +1345,19 @@ static int omap8250_soft_reset(struct device *dev)int 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 */
drivers/tty/serial/amba-pl011.c +16 -0
@@ -1727,10 +1727,26 @@ static int pl011_allocate_irq(struct uart_amba_port *uap)*/ 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 ;
drivers/tty/serial/atmel_serial.c +2 -3
@@ -1757,7 +1757,6 @@ static int atmel_startup(struct uart_port *port) {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_port *port)* 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;
drivers/tty/serial/samsung.c +2 -5
@@ -862,15 +862,12 @@ static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p) 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" );
drivers/tty/serial/sh-sci.c +2 -2
@@ -2691,8 +2691,8 @@ static int sci_init_clocks(struct sci_port *sci_port, struct device *dev)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 ;
drivers/usb/core/message.c +1 -1
@@ -940,7 +940,7 @@ int usb_set_isoch_delay(struct usb_device *dev)return 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 ); }
drivers/usb/gadget/function/f_printer.c +3 -3
@@ -631,19 +631,19 @@ printer_write(struct file *fd, const char __user *buf, size_t len, loff_t *ptr)return -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);
drivers/usb/gadget/udc/renesas_usb3.c +25 -12
@@ -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;
@@ -622,6 +623,13 @@ static void usb3_disconnect(struct renesas_usb3 *usb3)usb3_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);
@@ -2393,8 +2401,12 @@ static void renesas_usb3_debugfs_init(struct renesas_usb3 *usb3, 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,14 +2414,13 @@ static int renesas_usb3_remove(struct platform_device *pdev) {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);renesas_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 ;
@@ -2628,6 +2639,17 @@ static int renesas_usb3_probe(struct platform_device *pdev)if (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_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);if (ret <0 ) goto err_add_udc;
@@ -2636,20 +2658,11 @@ static int renesas_usb3_probe(struct platform_device *pdev)if (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);dev_info (&pdev->dev,"probed%s\n" , usb3->phy ?" with phy" :"" ); -pm_runtime_enable (usb3_to_dev (usb3));return 0 ;
drivers/usb/storage/uas.c +6 -0
@@ -836,6 +836,12 @@ static int uas_slave_configure(struct scsi_device *sdev)if (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 ; }
drivers/usb/storage/unusual_devs.h +9 -0
@@ -2321,6 +2321,15 @@ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x0100, "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, 0x9999, "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),
drivers/usb/typec/typec_wcove.c +28 -2
@@ -202,6 +202,10 @@ static int wcove_init(struct tcpc_dev *tcpc)struct 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_dev *tcpc, enum typec_cc_status *cc1,static 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)
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 vhci_hcd *vhci_hcd, __u32 rhport)return 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 device *dev, struct device_attribute *attr, 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 device *dev, struct device_attribute *attr, }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 device *dev, struct device_attribute *attr, 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);
net/key/af_key.c +35 -10
71 lines not on this page · raw message
net/netfilter/nft_ct.c +12 -8
@@ -842,22 +842,26 @@ static int nft_ct_helper_obj_dump(struct sk_buff *skb, struct nft_object *obj, bool reset) {const struct nft_ct_helper_obj *priv =nft_obj_data (obj); -const struct nf_conntrack_helper *helper = priv->helper4; +const struct nf_conntrack_helper *helper;u16 family; +if (priv->helper4 && priv->helper6) { + family =NFPROTO_INET ; + helper = priv->helper4; + }else if (priv->helper6) { + family =NFPROTO_IPV6 ; + helper = priv->helper6; + }else { + family =NFPROTO_IPV4 ; + helper = priv->helper4; + } +if (nla_put_string (skb,NFTA_CT_HELPER_NAME , helper->name))return -1 ;if (nla_put_u8 (skb,NFTA_CT_HELPER_L4PROTO , priv->l4proto))return -1 ; -if (priv->helper4 && priv->helper6) - family =NFPROTO_INET ; -else if (priv->helper6) - family =NFPROTO_IPV6 ; -else - family =NFPROTO_IPV4 ; -if (nla_put_be16 (skb,NFTA_CT_HELPER_L3PROTO ,htons (family)))return -1 ;