1. Oct 22, 2019
  2. Oct 21, 2019
  3. Oct 20, 2019
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4fe34d61
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A small set of x86 fixes:
      
         - Prevent a NULL pointer dereference in the X2APIC code in case of a
           CPU hotplug failure.
      
         - Prevent boot failures on HP superdome machines by invalidating the
           level2 kernel pagetable entries outside of the kernel area as
           invalid so BIOS reserved space won't be touched unintentionally.
      
           Also ensure that memory holes are rounded up to the next PMD
           boundary correctly.
      
         - Enable X2APIC support on Hyper-V to prevent boot failures.
      
         - Set the paravirt name when running on Hyper-V for consistency
      
         - Move a function under the appropriate ifdef guard to prevent build
           warnings"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot/acpi: Move get_cmdline_acpi_rsdp() under #ifdef guard
        x86/hyperv: Set pv_info.name to "Hyper-V"
        x86/apic/x2apic: Fix a NULL pointer deref when handling a dying cpu
        x86/hyperv: Make vapic support x2apic mode
        x86/boot/64: Round memory hole size up to next PMD page
        x86/boot/64: Make level2_kernel_pgt pages invalid outside kernel area
      4fe34d61
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 81c4bc31
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "A small set of irq chip driver fixes and updates:
      
         - Update the SIFIVE PLIC interrupt driver to use the fasteoi handler
           to address the shortcomings of the existing flow handling which was
           prone to lose interrupts
      
         - Use the proper limit for GIC interrupt line numbers
      
         - Add retrigger support for the recently merged Anapurna Labs Fabric
           interrupt controller to make it complete
      
         - Enable the ATMEL AIC5 interrupt controller driver on the new
           SAM9X60 SoC"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/sifive-plic: Switch to fasteoi flow
        irqchip/gic-v3: Fix GIC_LINE_NR accessor
        irqchip/atmel-aic5: Add support for sam9x60 irqchip
        irqchip/al-fic: Add support for irq retrigger
      81c4bc31
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 188768f3
      Linus Torvalds authored
      Pull hrtimer fixlet from Thomas Gleixner:
       "A single commit annotating the lockcless access to timer->base with
        READ_ONCE() and adding the WRITE_ONCE() counterparts for completeness"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        hrtimer: Annotate lockless access to timer->base
      188768f3
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 589f1222
      Linus Torvalds authored
      Pull stop-machine fix from Thomas Gleixner:
       "A single fix, amending stop machine with WRITE/READ_ONCE() to address
        the fallout of KCSAN"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        stop_machine: Avoid potential race behaviour
      589f1222
    • Marc Zyngier's avatar
      KVM: arm64: pmu: Reset sample period on overflow handling · 8c3252c0
      Marc Zyngier authored
      The PMU emulation code uses the perf event sample period to trigger
      the overflow detection. This works fine  for the *first* overflow
      handling, but results in a huge number of interrupts on the host,
      unrelated to the number of interrupts handled in the guest (a x20
      factor is pretty common for the cycle counter). On a slow system
      (such as a SW model), this can result in the guest only making
      forward progress at a glacial pace.
      
      It turns out that the clue is in the name. The sample period is
      exactly that: a period. And once the an overflow has occured,
      the following period should be the full width of the associated
      counter, instead of whatever the guest had initially programed.
      
      Reset the sample period to the architected value in the overflow
      handler, which now results in a number of host interrupts that is
      much closer to the number of interrupts in the guest.
      
      Fixes: b02386eb
      
       ("arm64: KVM: Add PMU overflow interrupt routing")
      Reviewed-by: default avatarAndrew Murray <andrew.murray@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      8c3252c0
    • Marc Zyngier's avatar
      KVM: arm64: pmu: Set the CHAINED attribute before creating the in-kernel event · 725ce669
      Marc Zyngier authored
      The current convention for KVM to request a chained event from the
      host PMU is to set bit[0] in attr.config1 (PERF_ATTR_CFG1_KVM_PMU_CHAINED).
      
      But as it turns out, this bit gets set *after* we create the kernel
      event that backs our virtual counter, meaning that we never get
      a 64bit counter.
      
      Moving the setting to an earlier point solves the problem.
      
      Fixes: 80f393a2
      
       ("KVM: arm/arm64: Support chained PMU counters")
      Reviewed-by: default avatarAndrew Murray <andrew.murray@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      725ce669
    • Marc Zyngier's avatar
      arm64: KVM: Handle PMCR_EL0.LC as RES1 on pure AArch64 systems · 6f163714
      Marc Zyngier authored
      Of PMCR_EL0.LC, the ARMv8 ARM says:
      
      	"In an AArch64 only implementation, this field is RES 1."
      
      So be it.
      
      Fixes: ab946834
      
       ("arm64: KVM: Add access handler for PMCR register")
      Reviewed-by: default avatarAndrew Murray <andrew.murray@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      6f163714
    • Marc Zyngier's avatar
      KVM: arm64: pmu: Fix cycle counter truncation · f4e23cf9
      Marc Zyngier authored
      When a counter is disabled, its value is sampled before the event
      is being disabled, and the value written back in the shadow register.
      
      In that process, the value gets truncated to 32bit, which is adequate
      for any counter but the cycle counter (defined as a 64bit counter).
      
      This obviously results in a corrupted counter, and things like
      "perf record -e cycles" not working at all when run in a guest...
      A similar, but less critical bug exists in kvm_pmu_get_counter_value.
      
      Make the truncation conditional on the counter not being the cycle
      counter, which results in a minor code reorganisation.
      
      Fixes: 80f393a2
      
       ("KVM: arm/arm64: Support chained PMU counters")
      Reviewed-by: default avatarAndrew Murray <andrew.murray@arm.com>
      Reported-by: default avatarJulien Thierry <julien.thierry.kdev@gmail.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      f4e23cf9
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 531e93d1
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "I was battling a cold after some recent trips, so quite a bit piled up
        meanwhile, sorry about that.
      
        Highlights:
      
         1) Fix fd leak in various bpf selftests, from Brian Vazquez.
      
         2) Fix crash in xsk when device doesn't support some methods, from
            Magnus Karlsson.
      
         3) Fix various leaks and use-after-free in rxrpc, from David Howells.
      
         4) Fix several SKB leaks due to confusion of who owns an SKB and who
            should release it in the llc code. From Eric Biggers.
      
         5) Kill a bunc of KCSAN warnings in TCP, from Eric Dumazet.
      
         6) Jumbo packets don't work after resume on r8169, as the BIOS resets
            the chip into non-jumbo mode during suspend. From Heiner Kallweit.
      
         7) Corrupt L2 header during MPLS push, from Davide Caratti.
      
         8) Prevent possible infinite loop in tc_ctl_action, from Eric
            Dumazet.
      
         9) Get register bits right in bcmgenet driver, based upon chip
            version. From Florian Fainelli.
      
        10) Fix mutex problems in microchip DSA driver, from Marek Vasut.
      
        11) Cure race between route lookup and invalidation in ipv4, from Wei
            Wang.
      
        12) Fix performance regression due to false sharing in 'net'
            structure, from Eric Dumazet"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (145 commits)
        net: reorder 'struct net' fields to avoid false sharing
        net: dsa: fix switch tree list
        net: ethernet: dwmac-sun8i: show message only when switching to promisc
        net: aquantia: add an error handling in aq_nic_set_multicast_list
        net: netem: correct the parent's backlog when corrupted packet was dropped
        net: netem: fix error path for corrupted GSO frames
        macb: propagate errors when getting optional clocks
        xen/netback: fix error path of xenvif_connect_data()
        net: hns3: fix mis-counting IRQ vector numbers issue
        net: usb: lan78xx: Connect PHY before registering MAC
        vsock/virtio: discard packets if credit is not respected
        vsock/virtio: send a credit update when buffer size is changed
        mlxsw: spectrum_trap: Push Ethernet header before reporting trap
        net: ensure correct skb->tstamp in various fragmenters
        net: bcmgenet: reset 40nm EPHY on energy detect
        net: bcmgenet: soft reset 40nm EPHYs before MAC init
        net: phy: bcm7xxx: define soft_reset for 40nm EPHY
        net: bcmgenet: don't set phydev->link from MAC
        net: Update address for MediaTek ethernet driver in MAINTAINERS
        ipv4: fix race condition between route lookup and invalidation
        ...
      531e93d1
    • Eric Dumazet's avatar
      net: reorder 'struct net' fields to avoid false sharing · 2a06b898
      Eric Dumazet authored
      Intel test robot reported a ~7% regression on TCP_CRR tests
      that they bisected to the cited commit.
      
      Indeed, every time a new TCP socket is created or deleted,
      the atomic counter net->count is touched (via get_net(net)
      and put_net(net) calls)
      
      So cpus might have to reload a contended cache line in
      net_hash_mix(net) calls.
      
      We need to reorder 'struct net' fields to move @hash_mix
      in a read mostly cache line.
      
      We move in the first cache line fields that can be
      dirtied often.
      
      We probably will have to address in a followup patch
      the __randomize_layout that was added in linux-4.13,
      since this might break our placement choices.
      
      Fixes: 355b9855
      
       ("netns: provide pure entropy for net_hash_mix()")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a06b898
    • Vivien Didelot's avatar
      net: dsa: fix switch tree list · 50c7d2ba
      Vivien Didelot authored
      If there are multiple switch trees on the device, only the last one
      will be listed, because the arguments of list_add_tail are swapped.
      
      Fixes: 83c0afae
      
       ("net: dsa: Add new binding implementation")
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50c7d2ba
    • Mans Rullgard's avatar
      net: ethernet: dwmac-sun8i: show message only when switching to promisc · 05908d72
      Mans Rullgard authored
      
      
      Printing the info message every time more than the max number of mac
      addresses are requested generates unnecessary log spam.  Showing it only
      when the hw is not already in promiscous mode is equally informative
      without being annoying.
      
      Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05908d72
    • Chenwandun's avatar
      net: aquantia: add an error handling in aq_nic_set_multicast_list · 3d00cf2f
      Chenwandun authored
      
      
      add an error handling in aq_nic_set_multicast_list, it may not
      work when hw_multicast_list_set error; and at the same time
      it will remove gcc Wunused-but-set-variable warning.
      
      Signed-off-by: default avatarChenwandun <chenwandun@huawei.com>
      Reviewed-by: default avatarIgor Russkikh <igor.russkikh@aquantia.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d00cf2f