Linux 4.17.13
Greg KH
maintainerI'm announcing the release of the 4.17.13 kernel.
All users of the 4.17 kernel series must upgrade.
The updated 4.17.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.17.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/entry/entry_64.S | 18 ---- arch/x86/kernel/apic/apic.c | 3 arch/x86/kvm/vmx.c | 7 - arch/x86/platform/efi/efi_64.c | 2 drivers/crypto/padlock-aes.c | 8 + drivers/gpu/drm/drm_atomic_helper.c | 8 + drivers/gpu/drm/vc4/vc4_plane.c | 3 drivers/infiniband/core/uverbs_cmd.c | 59 ++++++++++++- drivers/net/bonding/bond_main.c | 14 ++- drivers/net/can/usb/ems_usb.c | 1 drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 2 drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 4 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 40 ++++++++- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 69 ++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 5 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 22 +++++ drivers/scsi/sg.c | 1 drivers/virtio/virtio_balloon.c | 2 fs/squashfs/block.c | 2 fs/squashfs/fragment.c | 13 ++- fs/squashfs/squashfs_fs_sb.h | 1 fs/squashfs/super.c | 5 - fs/userfaultfd.c | 4 ipc/shm.c | 12 ++ kernel/auditsc.c | 13 ++- mm/hugetlb.c | 7 + net/dsa/slave.c | 6 + net/ipv4/inet_fragment.c | 6 - net/ipv4/ip_fragment.c | 5 + net/netlink/af_netlink.c | 2 net/rxrpc/call_accept.c | 4 net/socket.c | 5 - 35 files changed, 308 insertions(+), 54 deletions(-)
Andy Lutomirski (1):
x86/entry/64: Remove %ebx handling from error_entry/exit
Anton Vasilyev (1):
can: ems_usb: Fix memory leak on ems_usb_disconnect()
Boris Brezillon (3):
drm/vc4: Reset ->{x, y}_scaling[1] when dealing with uniplanar formats
drm/atomic: Check old_plane_state->crtc in drm_atomic_helper_async_check()
drm/atomic: Initialize variables in drm_atomic_helper_async_check() to make gcc happyBrijesh Singh (1):
x86/efi: Access EFI MMIO data as unencrypted when SEV is active
Eli Cohen (1):
net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
Emmanuel Grumbach (1):
iwlwifi: add more card IDs for 9000 series
Eric Dumazet (3):
bonding: avoid lockdep confusion in bond_get_stats()
inet: frag: enforce memory limits earlier
ipv4: frags: handle possible skb truesize change
Feras Daoud (1):
net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow
Florian Fainelli (1):
net: dsa: Do not suspend/resume closed slave_dev
Greg Kroah-Hartman (1):
Linux 4.17.13
Herbert Xu (1):
crypto: padlock-aes - Fix Nano workaround data corruption
Jack Morgenstein (1):
RDMA/uverbs: Expand primary and alt AV port checks
Jane Chu (1):
ipc/shm.c add ->pagesize function to shm_vm_ops
Jeremy Cline (3):
netlink: Fix spectre v1 gadget in netlink_create()
net: socket: fix potential spectre v1 gadget in socketcall
net: socket: Fix potential spectre v1 gadget in sock_is_registered
Jiang Biao (1):
virtio_balloon: fix another race between migration and ballooning
Jose Abreu (1):
net: stmmac: Fix WoL for PCI-based setups
Len Brown (1):
x86/apic: Future-proof the TSC_DEADLINE quirk for SKX
Linus Torvalds (2):
squashfs: more metadata hardening
squashfs: more metadata hardenings
Mike Rapoport (1):
userfaultfd: remove uffd flags from vma->vm_flags if UFFD_EVENT_FORK fails
Or Gerlitz (1):
net/mlx5e: Set port trust mode to PCP as default
Rafał Miłecki (1):
brcmfmac: fix regression in parsing NVRAM for multiple devices
Roman Kagan (1):
kvm: x86: vmx: fix vpid leak
Tony Battersby (1):
scsi: sg: fix minor memory leak in error path
Yi Wang (1):
audit: fix potential null dereference 'context->module.name'
YueHaibing (1):
rxrpc: Fix user call ID check in rxrpc_service_prealloc_one
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 17 -SUBLEVEL = 12 +SUBLEVEL = 13 EXTRAVERSION = NAME = Merciless Moray
arch/x86/entry/entry_64.S +4 -14
@@ -981,7 +981,7 @@ ENTRY(\sym) call \do_sym - jmp error_exit /* %ebx: no swapgs flag */ + jmp error_exit .endif END(\sym) .endm
@@ -1222,7 +1222,6 @@ END(paranoid_exit) /* * Save all registers in pt_regs, and switch GS if needed. - * Return: EBX=0: came from user mode; EBX=1: otherwise */ ENTRY(error_entry) UNWIND_HINT_FUNC
@@ -1269,7 +1268,6 @@ ENTRY(error_entry) * for these here too. */ .Lerror_kernelspace: - incl %ebx leaq native_irq_return_iret(%rip), %rcx cmpq %rcx, RIP+8(%rsp) je .Lerror_bad_iret
@@ -1303,28 +1301,20 @@ ENTRY(error_entry) /* * Pretend that the exception came from user mode: set up pt_regs - * as if we faulted immediately after IRET and clear EBX so that - * error_exit knows that we will be returning to user mode. + * as if we faulted immediately after IRET. */ mov %rsp, %rdi call fixup_bad_iret mov %rax, %rsp - decl %ebx jmp .Lerror_entry_from_usermode_after_swapgs END(error_entry) - -/* - * On entry, EBX is a "return to kernel mode" flag: - * 1: already in kernel mode, don't need SWAPGS - * 0: user gsbase is loaded, we need SWAPGS and standard preparation for return to usermode - */ ENTRY(error_exit) UNWIND_HINT_REGS DISABLE_INTERRUPTS(CLBR_ANY) TRACE_IRQS_OFF - testl %ebx, %ebx - jnz retint_kernel + testb $3, CS(%rsp) + jz retint_kernel jmp retint_user END(error_exit)
arch/x86/kernel/apic/apic.c +3 -0
@@ -573,6 +573,9 @@ static u32 skx_deadline_rev(void)case 0x04 :return 0x02000014 ; } +if (boot_cpu_data.x86_stepping >4 ) +return 0 ; +return ~0U ; }
arch/x86/kvm/vmx.c +3 -4
@@ -7660,6 +7660,8 @@ static int enter_vmx_operation(struct kvm_vcpu *vcpu) HRTIMER_MODE_REL_PINNED); vmx->nested.preemption_timer.function = vmx_preemption_timer_fn; + vmx->nested.vpid02 =allocate_vpid (); + vmx->nested.vmxon = true;return 0 ;
@@ -10108,11 +10110,9 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id) goto free_vmcs; } -if (nested) { +if (nested)nested_vmx_setup_ctls_msrs (&vmx->nested.msrs,kvm_vcpu_apicv_active (&vmx->vcpu)); - vmx->nested.vpid02 =allocate_vpid (); - } vmx->nested.posted_intr_nv =-1 ; vmx->nested.current_vmptr =-1ull ;
@@ -10129,7 +10129,6 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)return &vmx->vcpu; free_vmcs: -free_vpid (vmx->nested.vpid02);free_loaded_vmcs (vmx->loaded_vmcs); free_msrs:kfree (vmx->guest_msrs);
arch/x86/platform/efi/efi_64.c +1 -1
@@ -417,7 +417,7 @@ static void __init __map_region(efi_memory_desc_t *md, u64 va)if (!(md->attribute &EFI_MEMORY_WB )) flags |= _PAGE_PCD; -if (sev_active ()) +if (sev_active () && md->type !=EFI_MEMORY_MAPPED_IO ) flags |= _PAGE_ENC; pfn = md->phys_addr >>PAGE_SHIFT ;
drivers/crypto/padlock-aes.c +6 -2
@@ -266,6 +266,8 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,return ; } + count -= initial; +if (initial) asmvolatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */ : "+S"(input), "+D"(output)
@@ -273,7 +275,7 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key, asmvolatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */ :"+S" (input),"+D" (output) - :"d" (control_word),"b" (key),"c" (count - initial)); + :"d" (control_word),"b" (key),"c" (count)); } static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
@@ -284,6 +286,8 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,if (count < cbc_fetch_blocks)return cbc_crypt (input, output, key, iv, control_word, count); + count -= initial; +if (initial) asmvolatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */ : "+S" (input), "+D" (output), "+a" (iv)
@@ -291,7 +295,7 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key, asmvolatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */ :"+S" (input),"+D" (output),"+a" (iv) - :"d" (control_word),"b" (key),"c" (count-initial)); + :"d" (control_word),"b" (key),"c" (count));return iv; }
drivers/gpu/drm/drm_atomic_helper.c +5 -3
@@ -1499,8 +1499,9 @@ int drm_atomic_helper_async_check(struct drm_device *dev, {struct drm_crtc *crtc;struct drm_crtc_state *crtc_state; -struct drm_plane *plane; -struct drm_plane_state *old_plane_state, *new_plane_state; +struct drm_plane *plane =NULL ; +struct drm_plane_state *old_plane_state =NULL ; +struct drm_plane_state *new_plane_state =NULL ;const struct drm_plane_helper_funcs *funcs;int i, n_planes =0 ;
@@ -1516,7 +1517,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev,if (n_planes !=1 )return -EINVAL ; -if (!new_plane_state->crtc) +if (!new_plane_state->crtc || + old_plane_state->crtc != new_plane_state->crtc)return -EINVAL ; funcs = plane->helper_private;
drivers/gpu/drm/vc4/vc4_plane.c +3 -0
@@ -319,6 +319,9 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) vc4_state->x_scaling[0 ] =VC4_SCALING_TPZ ;if (vc4_state->y_scaling[0 ] ==VC4_SCALING_NONE ) vc4_state->y_scaling[0 ] =VC4_SCALING_TPZ ; + }else { + vc4_state->x_scaling[1 ] =VC4_SCALING_NONE ; + vc4_state->y_scaling[1 ] =VC4_SCALING_NONE ; } vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
drivers/infiniband/core/uverbs_cmd.c +54 -5
69 lines not on this page · raw message
drivers/net/bonding/bond_main.c +12 -2
@@ -1691,6 +1691,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev, goto err_upper_unlink; } + bond->nest_level =dev_get_nest_level (bond_dev) +1 ; +/* If the mode uses primary, then the following is handled by * bond_change_active_slave(). */
@@ -1738,7 +1740,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,if (bond_mode_uses_xmit_hash (bond))bond_update_slave_arr (bond,NULL ); - bond->nest_level =dev_get_nest_level (bond_dev); netdev_info(bond_dev, "Enslaving %s as %s interface with %s link\n", slave_dev->name,
@@ -3389,6 +3390,13 @@ static void bond_fold_stats(struct rtnl_link_stats64 *_res, } } +static int bond_get_nest_level (struct net_device *bond_dev) +{ +struct bonding *bond =netdev_priv (bond_dev); + +return bond->nest_level; +} +static void bond_get_stats (struct net_device *bond_dev,struct rtnl_link_stats64 *stats) {
@@ -3397,7 +3405,7 @@ static void bond_get_stats(struct net_device *bond_dev,struct list_head *iter;struct slave *slave; -spin_lock (&bond->stats_lock); +spin_lock_nested (&bond->stats_lock,bond_get_nest_level (bond_dev));memcpy (stats, &bond->bond_stats,sizeof (*stats));rcu_read_lock ();
@@ -4192,6 +4200,7 @@ static const struct net_device_ops bond_netdev_ops = { .ndo_neigh_setup = bond_neigh_setup, .ndo_vlan_rx_add_vid = bond_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = bond_vlan_rx_kill_vid, + .ndo_get_lock_subclass = bond_get_nest_level, #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_netpoll_setup = bond_netpoll_setup, .ndo_netpoll_cleanup = bond_netpoll_cleanup,
@@ -4690,6 +4699,7 @@ static int bond_init(struct net_device *bond_dev)if (!bond->wq)return -ENOMEM ; + bond->nest_level =SINGLE_DEPTH_NESTING ;netdev_lockdep_set_classes (bond_dev);list_add_tail (&bond->bond_list, &bn->dev_list);
drivers/net/can/usb/ems_usb.c +1 -0
@@ -1072,6 +1072,7 @@ static void ems_usb_disconnect(struct usb_interface *intf)usb_free_urb (dev->intr_urb);kfree (dev->intr_in_buffer); +kfree (dev->tx_msg_buffer); } }
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +2 -0
@@ -1057,6 +1057,8 @@ static int mlx5e_trust_initialize(struct mlx5e_priv *priv)struct mlx5_core_dev *mdev = priv->mdev;int err; + priv->dcbx_dp.trust_state =MLX5_QPTS_TRUST_PCP ; +if (!MLX5_DSCP_SUPPORTED (mdev))return 0 ;
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +2 -2
@@ -1698,7 +1698,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)int vport_num;int err; -if (!MLX5_VPORT_MANAGER (dev)) +if (!MLX5_ESWITCH_MANAGER (dev))return 0 ; esw_info(dev,
@@ -1767,7 +1767,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)void mlx5_eswitch_cleanup (struct mlx5_eswitch *esw) { -if (!esw || !MLX5_VPORT_MANAGER (esw->dev)) +if (!esw || !MLX5_ESWITCH_MANAGER (esw->dev))return ;esw_info (esw->dev,"cleanup\n" );
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c +4 -0
@@ -76,6 +76,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev, void *ppriv) {struct mlx5e_priv *priv =mlx5i_epriv (netdev); +u16 max_mtu;/* priv init */ priv->mdev = mdev;
@@ -84,6 +85,9 @@ void mlx5i_init(struct mlx5_core_dev *mdev, priv->ppriv = ppriv;mutex_init (&priv->state_lock); +mlx5_query_port_max_mtu (mdev, &max_mtu,1 ); + netdev->mtu = max_mtu; +mlx5e_build_nic_params (mdev, &priv->channels.params, profile->max_nch (mdev), netdev->mtu);mlx5i_build_nic_params (mdev, &priv->channels.params);
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +38 -2
@@ -257,7 +257,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev,return -ENOMEM ;/* Enable pci device */ - ret =pcim_enable_device (pdev); + ret =pci_enable_device (pdev);if (ret) {dev_err (&pdev->dev,"%s: ERROR: failed to enable device\n" , __func__);
@@ -300,9 +300,45 @@ static int stmmac_pci_probe(struct pci_dev *pdev,static void stmmac_pci_remove (struct pci_dev *pdev) {stmmac_dvr_remove (&pdev->dev); +pci_disable_device (pdev); } -static SIMPLE_DEV_PM_OPS(stmmac_pm_ops, stmmac_suspend, stmmac_resume); +static int stmmac_pci_suspend (struct device *dev) +{ +struct pci_dev *pdev =to_pci_dev (dev); +int ret; + + ret =stmmac_suspend (dev); +if (ret) +return ret; + + ret =pci_save_state (pdev); +if (ret) +return ret; + +pci_disable_device (pdev); +pci_wake_from_d3 (pdev, true); +return 0 ; +} + +static int stmmac_pci_resume (struct device *dev) +{ +struct pci_dev *pdev =to_pci_dev (dev); +int ret; + +pci_restore_state (pdev); +pci_set_power_state (pdev,PCI_D0 ); + + ret =pci_enable_device (pdev); +if (ret) +return ret; + +pci_set_master (pdev); + +return stmmac_resume (dev); +} + +static SIMPLE_DEV_PM_OPS(stmmac_pm_ops, stmmac_pci_suspend, stmmac_pci_resume);/* synthetic ID, no official vendor */ #define PCI_VENDOR_ID_STMMAC 0x700
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +2 -1
@@ -1755,7 +1755,8 @@ brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo) fwreq->items[BRCMF_PCIE_FW_CODE ].type =BRCMF_FW_TYPE_BINARY ; fwreq->items[BRCMF_PCIE_FW_NVRAM ].type =BRCMF_FW_TYPE_NVRAM ; fwreq->items[BRCMF_PCIE_FW_NVRAM ].flags =BRCMF_FW_REQF_OPTIONAL ; - fwreq->domain_nr =pci_domain_nr (devinfo->pdev->bus); +/* NVRAM reserves PCI domain 0 for Broadcom's SDK faked bus */ + fwreq->domain_nr =pci_domain_nr (devinfo->pdev->bus) +1 ; fwreq->bus_nr = devinfo->pdev->bus->number;return fwreq;
drivers/net/wireless/intel/iwlwifi/cfg/9000.c +69 -0
87 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/iwl-config.h +5 -0
@@ -471,6 +471,7 @@ extern const struct iwl_cfg iwl8275_2ac_cfg;extern const struct iwl_cfg iwl4165_2ac_cfg;extern const struct iwl_cfg iwl9160_2ac_cfg;extern const struct iwl_cfg iwl9260_2ac_cfg; +extern const struct iwl_cfg iwl9260_killer_2ac_cfg;extern const struct iwl_cfg iwl9270_2ac_cfg;extern const struct iwl_cfg iwl9460_2ac_cfg;extern const struct iwl_cfg iwl9560_2ac_cfg;
@@ -478,10 +479,14 @@ extern const struct iwl_cfg iwl9460_2ac_cfg_soc;extern const struct iwl_cfg iwl9461_2ac_cfg_soc;extern const struct iwl_cfg iwl9462_2ac_cfg_soc;extern const struct iwl_cfg iwl9560_2ac_cfg_soc; +extern const struct iwl_cfg iwl9560_killer_2ac_cfg_soc; +extern const struct iwl_cfg iwl9560_killer_s_2ac_cfg_soc;extern const struct iwl_cfg iwl9460_2ac_cfg_shared_clk;extern const struct iwl_cfg iwl9461_2ac_cfg_shared_clk;extern const struct iwl_cfg iwl9462_2ac_cfg_shared_clk;extern const struct iwl_cfg iwl9560_2ac_cfg_shared_clk; +extern const struct iwl_cfg iwl9560_killer_2ac_cfg_shared_clk; +extern const struct iwl_cfg iwl9560_killer_s_2ac_cfg_shared_clk;extern const struct iwl_cfg iwl22000_2ac_cfg_hr;extern const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb;extern const struct iwl_cfg iwl22000_2ac_cfg_jf;
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +22 -0
@@ -545,6 +545,9 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x2526, 0x1210, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x2526, 0x1410, iwl9270_2ac_cfg)}, {IWL_PCI_DEVICE(0x2526, 0x1420, iwl9460_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0x2526, 0x1550, iwl9260_killer_2ac_cfg)}, + {IWL_PCI_DEVICE(0x2526, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0x2526, 0x1552, iwl9560_killer_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x2526, 0x1610, iwl9270_2ac_cfg)}, {IWL_PCI_DEVICE(0x2526, 0x2030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x2526, 0x2034, iwl9560_2ac_cfg_soc)},
@@ -554,6 +557,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x2526, 0x40A4, iwl9460_2ac_cfg)}, {IWL_PCI_DEVICE(0x2526, 0x4234, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x2526, 0x42A4, iwl9462_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0x2526, 0x8014, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x2526, 0xA014, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x271B, 0x0010, iwl9160_2ac_cfg)}, {IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)},
@@ -578,6 +582,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x2720, 0x1010, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x2720, 0x1030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x2720, 0x1210, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x2720, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0x2720, 0x1552, iwl9560_killer_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x2720, 0x2030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x2720, 0x2034, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x2720, 0x4030, iwl9560_2ac_cfg)},
@@ -604,6 +610,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x30DC, 0x1010, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x30DC, 0x1030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x30DC, 0x1210, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x30DC, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0x30DC, 0x1552, iwl9560_killer_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x30DC, 0x2030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x30DC, 0x2034, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x30DC, 0x4030, iwl9560_2ac_cfg_soc)},
@@ -630,6 +638,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x31DC, 0x1010, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x31DC, 0x1030, iwl9560_2ac_cfg_shared_clk)}, {IWL_PCI_DEVICE(0x31DC, 0x1210, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x31DC, 0x1551, iwl9560_killer_s_2ac_cfg_shared_clk)}, + {IWL_PCI_DEVICE(0x31DC, 0x1552, iwl9560_killer_2ac_cfg_shared_clk)}, {IWL_PCI_DEVICE(0x31DC, 0x2030, iwl9560_2ac_cfg_shared_clk)}, {IWL_PCI_DEVICE(0x31DC, 0x2034, iwl9560_2ac_cfg_shared_clk)}, {IWL_PCI_DEVICE(0x31DC, 0x4030, iwl9560_2ac_cfg_shared_clk)},
@@ -656,6 +666,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x34F0, 0x1010, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x34F0, 0x1030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x34F0, 0x1210, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x34F0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0x34F0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x34F0, 0x2030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x34F0, 0x2034, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x34F0, 0x4030, iwl9560_2ac_cfg_soc)},
@@ -682,6 +694,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x3DF0, 0x1010, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x3DF0, 0x1030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x3DF0, 0x1210, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x3DF0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0x3DF0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x3DF0, 0x2030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x3DF0, 0x2034, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x3DF0, 0x4030, iwl9560_2ac_cfg_soc)},
@@ -708,6 +722,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x43F0, 0x1010, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x43F0, 0x1030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x43F0, 0x1210, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x43F0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0x43F0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x43F0, 0x2030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x43F0, 0x2034, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x43F0, 0x4030, iwl9560_2ac_cfg_soc)},
@@ -743,6 +759,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x9DF0, 0x1010, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x9DF0, 0x1030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x9DF0, 0x1210, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x9DF0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0x9DF0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x9DF0, 0x2010, iwl9460_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x9DF0, 0x2030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0x9DF0, 0x2034, iwl9560_2ac_cfg_soc)},
@@ -771,6 +789,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0xA0F0, 0x1010, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0xA0F0, 0x1030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0xA0F0, 0x1210, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0xA0F0, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0xA0F0, 0x1552, iwl9560_killer_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0xA0F0, 0x2030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0xA0F0, 0x2034, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0xA0F0, 0x4030, iwl9560_2ac_cfg_soc)},
@@ -797,6 +817,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0xA370, 0x1010, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0xA370, 0x1030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0xA370, 0x1210, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0xA370, 0x1551, iwl9560_killer_s_2ac_cfg_soc)}, + {IWL_PCI_DEVICE(0xA370, 0x1552, iwl9560_killer_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0xA370, 0x2030, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0xA370, 0x2034, iwl9560_2ac_cfg_soc)}, {IWL_PCI_DEVICE(0xA370, 0x4030, iwl9560_2ac_cfg_soc)},
drivers/scsi/sg.c +1 -0
@@ -2186,6 +2186,7 @@ sg_add_sfp(Sg_device * sdp)write_lock_irqsave (&sdp->sfd_lock, iflags);if (atomic_read (&sdp->detaching)) {write_unlock_irqrestore (&sdp->sfd_lock, iflags); +kfree (sfp);return ERR_PTR (-ENODEV ); }list_add_tail (&sfp->sfd_siblings, &sdp->sfds);
drivers/virtio/virtio_balloon.c +2 -0
@@ -513,7 +513,9 @@ static int virtballoon_migratepage(struct balloon_dev_info *vb_dev_info,tell_host (vb, vb->inflate_vq);/* balloon's page migration 2nd step -- deflate "page" */ +spin_lock_irqsave (&vb_dev_info->pages_lock, flags);balloon_page_delete (page); +spin_unlock_irqrestore (&vb_dev_info->pages_lock, flags); vb->num_pfns =VIRTIO_BALLOON_PAGES_PER_PAGE ;set_page_pfns (vb, vb->pfns, page);tell_host (vb, vb->deflate_vq);
fs/squashfs/block.c +2 -0
@@ -167,6 +167,8 @@ int squashfs_read_data(struct super_block *sb, u64 index, int length, }if (compressed) { +if (!msblk->stream) + goto read_failure; length =squashfs_decompress (msblk, bh, b, offset, length, output);if (length <0 )
fs/squashfs/fragment.c +9 -4
@@ -49,11 +49,16 @@ int squashfs_frag_lookup(struct super_block *sb, unsigned int fragment, u64 *fragment_block) {struct squashfs_sb_info *msblk = sb->s_fs_info; -int block =SQUASHFS_FRAGMENT_INDEX (fragment); -int offset =SQUASHFS_FRAGMENT_INDEX_OFFSET (fragment); -u64 start_block =le64_to_cpu (msblk->fragment_index[block]); +int block, offset, size;struct squashfs_fragment_entry fragment_entry; -int size; +u64 start_block; + +if (fragment >= msblk->fragments) +return -EIO ; + block =SQUASHFS_FRAGMENT_INDEX (fragment); + offset =SQUASHFS_FRAGMENT_INDEX_OFFSET (fragment); + + start_block =le64_to_cpu (msblk->fragment_index[block]); size =squashfs_read_metadata (sb, &fragment_entry, &start_block, &offset,sizeof (fragment_entry));
fs/squashfs/squashfs_fs_sb.h +1 -0
@@ -75,6 +75,7 @@ struct squashfs_sb_info {unsigned short block_log;long long bytes_used;unsigned int inodes; +unsigned int fragments; int xattr_ids; };#endif
fs/squashfs/super.c +3 -2
@@ -175,6 +175,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent) msblk->inode_table =le64_to_cpu (sblk->inode_table_start); msblk->directory_table =le64_to_cpu (sblk->directory_table_start); msblk->inodes =le32_to_cpu (sblk->inodes); + msblk->fragments =le32_to_cpu (sblk->fragments); flags =le16_to_cpu (sblk->flags);TRACE ("Found valid superblock on %pg\n" , sb->s_bdev);
@@ -185,7 +186,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)TRACE ("Filesystem size %lld bytes\n" , msblk->bytes_used);TRACE ("Block size %d\n" , msblk->block_size);TRACE ("Number of inodes %d\n" , msblk->inodes); -TRACE ("Number of fragments %d\n" ,le32_to_cpu (sblk->fragments)); +TRACE ("Number of fragments %d\n" , msblk->fragments);TRACE ("Number of ids %d\n" ,le16_to_cpu (sblk->no_ids));TRACE ("sblk->inode_table_start %llx\n" , msblk->inode_table);TRACE ("sblk->directory_table_start %llx\n" , msblk->directory_table);
@@ -272,7 +273,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent) sb->s_export_op = &squashfs_export_ops; handle_fragments: - fragments =le32_to_cpu (sblk->fragments); + fragments = msblk->fragments;if (fragments ==0 ) goto check_directory_table;
fs/userfaultfd.c +3 -1
@@ -631,8 +631,10 @@ static void userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx,/* the various vma->vm_userfaultfd_ctx still points to it */ down_write (&mm->mmap_sem);for (vma = mm->mmap; vma; vma = vma->vm_next) -if (vma->vm_userfaultfd_ctx.ctx == release_new_ctx) +if (vma->vm_userfaultfd_ctx.ctx == release_new_ctx) { vma->vm_userfaultfd_ctx =NULL_VM_UFFD_CTX ; + vma->vm_flags &= ~(VM_UFFD_WP |VM_UFFD_MISSING ); + }up_write (&mm->mmap_sem);userfaultfd_ctx_put (release_new_ctx);
ipc/shm.c +12 -0
@@ -427,6 +427,17 @@ static int shm_split(struct vm_area_struct *vma, unsigned long addr)return 0 ; } +static unsigned long shm_pagesize (struct vm_area_struct *vma) +{ +struct file *file = vma->vm_file; +struct shm_file_data *sfd =shm_file_data (file); + +if (sfd->vm_ops->pagesize) +return sfd->vm_ops->pagesize (vma); + +return PAGE_SIZE ; +} +#ifdef CONFIG_NUMA static int shm_set_policy (struct vm_area_struct *vma,struct mempolicy *new) {
@@ -554,6 +565,7 @@ static const struct vm_operations_struct shm_vm_ops = { .close = shm_close, /* callback for when the vm-area is released */ .fault = shm_fault, .split = shm_split, + .pagesize = shm_pagesize,#if defined(CONFIG_NUMA ) .set_policy = shm_set_policy, .get_policy = shm_get_policy,
kernel/auditsc.c +9 -4
@@ -1274,8 +1274,12 @@ static void show_special(struct audit_context *context, int *call_panic)break ;case AUDIT_KERN_MODULE :audit_log_format (ab,"name=" ); -audit_log_untrustedstring (ab, context->module.name); -kfree (context->module.name); +if (context->module.name) { +audit_log_untrustedstring (ab, context->module.name); +kfree (context->module.name); + }else +audit_log_format (ab,"(null)" ); +break ; }audit_log_end (ab);
@@ -2408,8 +2412,9 @@ void __audit_log_kern_module(char *name) {struct audit_context *context = current->audit_context; - context->module.name =kmalloc (strlen (name) +1 ,GFP_KERNEL ); -strcpy (context->module.name, name); + context->module.name =kstrdup (name,GFP_KERNEL ); +if (!context->module.name) +audit_log_lost ("out of memory in __audit_log_kern_module" ); context->type =AUDIT_KERN_MODULE ; }
mm/hugetlb.c +7 -0
@@ -3166,6 +3166,13 @@ static int hugetlb_vm_op_fault(struct vm_fault *vmf)return 0 ; } +/* +* When a new function is introduced to vm_operations_struct and added +* to hugetlb_vm_ops, please consider adding the function to shm_vm_ops. +* This is because under System V memory model, mappings created via +* shmget/shmat with "huge page" specified are backed by hugetlbfs files, +* their original vm_ops are overwritten with shm_vm_ops. +*/ const struct vm_operations_struct hugetlb_vm_ops = { .fault = hugetlb_vm_op_fault, .open = hugetlb_vm_op_open,
net/dsa/slave.c +6 -0
@@ -1195,6 +1195,9 @@ int dsa_slave_suspend(struct net_device *slave_dev) {struct dsa_slave_priv *p =netdev_priv (slave_dev); +if (!netif_running (slave_dev)) +return 0 ; +netif_device_detach (slave_dev);if (slave_dev->phydev) {
@@ -1210,6 +1213,9 @@ int dsa_slave_suspend(struct net_device *slave_dev)int dsa_slave_resume (struct net_device *slave_dev) { +if (!netif_running (slave_dev)) +return 0 ; +netif_device_attach (slave_dev);if (slave_dev->phydev) {
net/ipv4/inet_fragment.c +3 -3
@@ -157,9 +157,6 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf, {struct inet_frag_queue *q; -if (!nf->high_thresh ||frag_mem_limit (nf) > nf->high_thresh) -return NULL ; - q =kmem_cache_zalloc (f->frags_cachep,GFP_ATOMIC );if (!q)return NULL ;
@@ -204,6 +201,9 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key) {struct inet_frag_queue *fq; +if (!nf->high_thresh ||frag_mem_limit (nf) > nf->high_thresh) +return NULL ; +rcu_read_lock (); fq =rhashtable_lookup (&nf->rhashtable, key, nf->f->rhash_params);
net/ipv4/ip_fragment.c +5 -0
@@ -383,11 +383,16 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)int i = end - next->ip_defrag_offset;/* overlap is 'i' bytes */ if (i < next->len) { +int delta = -next->truesize; +/* Eat head of the next overlapped fragment * and leave the loop. The next ones cannot overlap. */ if (!pskb_pull (next, i)) goto err; + delta += next->truesize; +if (delta) +add_frag_mem_limit (qp->q.net, delta); next->ip_defrag_offset += i; qp->q.meat -= i;if (next->ip_summed !=CHECKSUM_UNNECESSARY )
net/netlink/af_netlink.c +2 -0
@@ -63,6 +63,7 @@#include <linux/hash.h> #include <linux/genetlink.h> #include <linux/net_namespace.h> +#include <linux/nospec.h> #include <net/net_namespace.h> #include <net/netns/generic.h>
@@ -679,6 +680,7 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol,if (protocol <0 || protocol >=MAX_LINKS )return -EPROTONOSUPPORT ; + protocol =array_index_nospec (protocol,MAX_LINKS );netlink_lock_table ();#ifdef CONFIG_MODULES
net/rxrpc/call_accept.c +2 -2
@@ -116,9 +116,9 @@ static int rxrpc_service_prealloc_one(struct rxrpc_sock *rx,while (*pp) { parent = *pp; xcall = rb_entry(parent, struct rxrpc_call, sock_node); -if (user_call_ID < call->user_call_ID) +if (user_call_ID < xcall->user_call_ID) pp = &(*pp)->rb_left; -else if (user_call_ID > call->user_call_ID) +else if (user_call_ID > xcall->user_call_ID) pp = &(*pp)->rb_right;else goto id_in_use;
net/socket.c +4 -1
@@ -89,6 +89,7 @@#include <linux/magic.h> #include <linux/slab.h> #include <linux/xattr.h> +#include <linux/nospec.h> #include <linux/uaccess.h> #include <asm/unistd.h>
@@ -2526,6 +2527,7 @@ SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args)if (call <1 || call >SYS_SENDMMSG )return -EINVAL ; + call =array_index_nospec (call,SYS_SENDMMSG +1 ); len = nargs[call];if (len >sizeof (a))
@@ -2692,7 +2694,8 @@ EXPORT_SYMBOL(sock_unregister);bool sock_is_registered (int family) { -return family <NPROTO &&rcu_access_pointer (net_families[family]); +return family <NPROTO && +rcu_access_pointer (net_families[array_index_nospec (family,NPROTO )]); }static int __init sock_init (void )