1. 04 Dec, 2020 1 commit
  2. 03 Dec, 2020 23 commits
  3. 02 Dec, 2020 16 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 3bb61aa6
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "I'm sad to say that we've got an unusually large arm64 fixes pull for
        rc7 which addresses numerous significant instrumentation issues with
        our entry code.
      
        Without these patches, lockdep is hopelessly unreliable in some
        configurations [1,2] and syzkaller is therefore not a lot of use
        because it's so noisy.
      
        Although much of this has always been broken, it appears to have been
        exposed more readily by other changes such as 044d0d6d ("lockdep:
        Only trace IRQ edges") and general lockdep improvements around IRQ
        tracing and NMIs.
      
        Fixing this properly required moving much of the instrumentation hooks
        from our entry assembly into C, which Mark has been working on for the
        last few weeks. We're not quite ready to move to the recently added
        generic functions yet, but the code here has been deliberately written
        to mimic that closely so we can look at cleaning things up once we
        have a bit more breathing room.
      
        Having said all that, the second version of these patches was posted
        last week and I pushed it into our CI (kernelci and cki) along with a
        commit which forced on PROVE_LOCKING, NOHZ_FULL and
        CONTEXT_TRACKING_FORCE. The result? We found a real bug in the
        md/raid10 code [3].
      
        Oh, and there's also a really silly typo patch that's unrelated.
      
        Summary:
      
         - Fix numerous issues with instrumentation and exception entry
      
         - Fix hideous typo in unused register field definition"
      
      [1] https://lore.kernel.org/r/CACT4Y+aAzoJ48Mh1wNYD17pJqyEcDnrxGfApir=-j171TnQXhw@mail.gmail.com
      [2] https://lore.kernel.org/r/20201119193819.GA2601289@elver.google.com
      [3] https://lore.kernel.org/r/94c76d5e-466a-bc5f-e6c2-a11b65c39f83@redhat.com
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: mte: Fix typo in macro definition
        arm64: entry: fix EL1 debug transitions
        arm64: entry: fix NMI {user, kernel}->kernel transitions
        arm64: entry: fix non-NMI kernel<->kernel transitions
        arm64: ptrace: prepare for EL1 irq/rcu tracking
        arm64: entry: fix non-NMI user<->kernel transitions
        arm64: entry: move el1 irq/nmi logic to C
        arm64: entry: prepare ret_to_user for function call
        arm64: entry: move enter_from_user_mode to entry-common.c
        arm64: entry: mark entry code as noinstr
        arm64: mark idle code as noinstr
        arm64: syscall: exit userspace before unmasking exceptions
      3bb61aa6
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 2c6ffa9e
      Linus Torvalds authored
      Pull vdpa fixes from Michael Tsirkin:
       "A couple of fixes that surfaced at the last minute"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vhost_vdpa: return -EFAULT if copy_to_user() fails
        vdpa: mlx5: fix vdpa/vhost dependencies
      2c6ffa9e
    • Linus Torvalds's avatar
      Merge tag 'sound-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · bb95d607
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Here are the pending sound fixes for 5.10: all small device-specific
        fixes, and nothing particular stands out, so far"
      
      * tag 'sound-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek: Add mute LED quirk to yet another HP x360 model
        ALSA: hda/realtek: Fix bass speaker DAC assignment on Asus Zephyrus G14
        ALSA: hda/generic: Add option to enforce preferred_dacs pairs
        ALSA: usb-audio: US16x08: fix value count for level meters
        ALSA: hda/realtek - Add new codec supported for ALC897
        ASoC: rt5682: change SAR voltage threshold
        ASoC: wm_adsp: fix error return code in wm_adsp_load()
        ALSA: hda/realtek: Enable headset of ASUS UX482EG & B9400CEA with ALC294
        ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state
        ALSA: hda/realtek - Fixed Dell AIO wrong sound tone
        ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks
      bb95d607
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.10-rc6-bootconfig' of... · 8a02ec8f
      Linus Torvalds authored
      Merge tag 'trace-v5.10-rc6-bootconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull bootconfig fixes from Steven Rostedt:
       "Have bootconfig size and checksum be little endian
      
        In case the bootconfig is created on one kind of endian machine, and
        then read on the other kind of endian kernel, the size and checksum
        will be incorrect. Instead, have both the size and checksum always be
        little endian and have the tool and the kernel convert it from little
        endian to or from the host endian"
      
      * tag 'trace-v5.10-rc6-bootconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        docs: bootconfig: Add the endianness of fields
        tools/bootconfig: Store size and checksum in footer as le32
        bootconfig: Load size and checksum in the footer as le32
      8a02ec8f
    • Yangbo Lu's avatar
      dpaa_eth: copy timestamp fields to new skb in A-050385 workaround · 07500a60
      Yangbo Lu authored
      The timestamp fields should be copied to new skb too in
      A-050385 workaround for later TX timestamping handling.
      
      Fixes: 3c68b8ff ("dpaa_eth: FMan erratum A050385 workaround")
      Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
      Acked-by: default avatarCamelia Groza <camelia.groza@nxp.com>
      Link: https://lore.kernel.org/r/20201201075258.1875-1-yangbo.lu@nxp.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      07500a60
    • Antoine Tenart's avatar
      net: ip6_gre: set dev->hard_header_len when using header_ops · 832ba596
      Antoine Tenart authored
      syzkaller managed to crash the kernel using an NBMA ip6gre interface. I
      could reproduce it creating an NBMA ip6gre interface and forwarding
      traffic to it:
      
        skbuff: skb_under_panic: text:ffffffff8250e927 len:148 put:44 head:ffff8c03c7a33
        ------------[ cut here ]------------
        kernel BUG at net/core/skbuff.c:109!
        Call Trace:
        skb_push+0x10/0x10
        ip6gre_header+0x47/0x1b0
        neigh_connected_output+0xae/0xf0
      
      ip6gre tunnel provides its own header_ops->create, and sets it
      conditionally when initializing the tunnel in NBMA mode. When
      header_ops->create is used, dev->hard_header_len should reflect the
      length of the header created. Otherwise, when not used,
      dev->needed_headroom should be used.
      
      Fixes: eb95f52f ("net: ipv6_gre: Fix GRO to work on IPv6 over GRE tap")
      Cc: Maria Pasechnik <mariap@mellanox.com>
      Signed-off-by: default avatarAntoine Tenart <atenart@kernel.org>
      Link: https://lore.kernel.org/r/20201130161911.464106-1-atenart@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      832ba596
    • Stanislaw Gruszka's avatar
      mt76: usb: fix crash on device removal · 80798201
      Stanislaw Gruszka authored
      Currently 'while (q->queued > 0)' loop was removed from mt76u_stop_tx()
      code. This causes crash on device removal as we try to cleanup empty
      queue:
      
      [   96.495571] kernel BUG at include/linux/skbuff.h:2297!
      [   96.498983] invalid opcode: 0000 [#1] SMP PTI
      [   96.501162] CPU: 3 PID: 27 Comm: kworker/3:0 Not tainted 5.10.0-rc5+ #11
      [   96.502754] Hardware name: LENOVO 20DGS08H00/20DGS08H00, BIOS J5ET48WW (1.19 ) 08/27/2015
      [   96.504378] Workqueue: usb_hub_wq hub_event
      [   96.505983] RIP: 0010:skb_pull+0x2d/0x30
      [   96.507576] Code: 00 00 8b 47 70 39 c6 77 1e 29 f0 89 47 70 3b 47 74 72 17 48 8b 87 c8 00 00 00 89 f6 48 01 f0 48 89 87 c8 00 00 00 c3 31 c0 c3 <0f> 0b 90 0f 1f 44 00 00 53 48 89 fb 48 8b bf c8 00 00 00 8b 43 70
      [   96.509296] RSP: 0018:ffffb11b801639b8 EFLAGS: 00010287
      [   96.511038] RAX: 000000001c6939ed RBX: ffffb11b801639f8 RCX: 0000000000000000
      [   96.512964] RDX: ffffb11b801639f8 RSI: 0000000000000018 RDI: ffff90c64e4fb800
      [   96.514710] RBP: ffff90c654551ee0 R08: ffff90c652bce7a8 R09: ffffb11b80163728
      [   96.516450] R10: 0000000000000001 R11: 0000000000000001 R12: ffff90c64e4fb800
      [   96.519749] R13: 0000000000000010 R14: 0000000000000020 R15: ffff90c64e352ce8
      [   96.523455] FS:  0000000000000000(0000) GS:ffff90c96eec0000(0000) knlGS:0000000000000000
      [   96.527171] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   96.530900] CR2: 0000242556f18288 CR3: 0000000146a10002 CR4: 00000000003706e0
      [   96.534678] Call Trace:
      [   96.538418]  mt76x02u_tx_complete_skb+0x1f/0x50 [mt76x02_usb]
      [   96.542231]  mt76_queue_tx_complete+0x23/0x50 [mt76]
      [   96.546028]  mt76u_stop_tx.cold+0x71/0xa2 [mt76_usb]
      [   96.549797]  mt76x0u_stop+0x2f/0x90 [mt76x0u]
      [   96.553638]  drv_stop+0x33/0xd0 [mac80211]
      [   96.557449]  ieee80211_do_stop+0x558/0x860 [mac80211]
      [   96.561262]  ? dev_deactivate_many+0x298/0x2d0
      [   96.565101]  ieee80211_stop+0x16/0x20 [mac80211]
      
      Fix that by adding while loop again. We need loop, not just single
      check, to clean all pending entries.
      
      Additionally move mt76_worker_disable/enable after !mt76_has_tx_pending()
      as we want to tx_worker to run to process tx queues, while we wait for
      exactly that.
      
      I was a bit worried about accessing q->queued without lock, but
      mt76_worker_disable() -> kthread_park() should assure this value will
      be seen updated on other cpus.
      
      Fixes: fe5b5ab5 ("mt76: unify queue tx cleanup code")
      Signed-off-by: default avatarStanislaw Gruszka <stf_xl@wp.pl>
      Acked-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201126125520.72912-1-stf_xl@wp.pl
      80798201
    • Golan Ben Ami's avatar
    • Luca Coelho's avatar
      iwlwifi: pcie: invert values of NO_160 device config entries · 568d3434
      Luca Coelho authored
      The NO_160 flag specifies if the device doesn't have 160 MHz support,
      but we errorneously assumed the opposite.  If the flag was set, we
      were considering that 160 MHz was supported, but it's actually the
      opposite.  Fix it by inverting the bits, i.e. NO_160 is 0x1 and 160
      is 0x0.
      
      Fixes: d6f2134a ("iwlwifi: add mac/rf types and 160MHz to the device tables")
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/iwlwifi.20201202143859.375bec857ccb.I83884286b688965293e9810381808039bd7eedae@changeid
      568d3434
    • Luca Coelho's avatar
      iwlwifi: pcie: add one missing entry for AX210 · 5febcdef
      Luca Coelho authored
      The 0x0024 subsytem device ID was missing from the list, so some AX210
      devices were not recognized.  Add it.
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/iwlwifi.20201202143859.308eab4db42c.I3763196cd3f7bb36f3dcabf02ec4e7c4fe859c0f@changeid
      5febcdef
    • Johannes Berg's avatar
      iwlwifi: update MAINTAINERS entry · abfccc3a
      Johannes Berg authored
      Reflect the fact that the linuxwifi@intel.com address will disappear,
      and that neither Emmanuel nor myself are really much involved with
      the maintenance these days.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/iwlwifi.20201129151117.a25afe6d2c7f.I8f13a5689dd353825fb2b9bd5b6f0fbce92cb12b@changeid
      abfccc3a
    • Heiko Carstens's avatar
      s390: fix irq state tracing · b1cae1f8
      Heiko Carstens authored
      With commit 58c644ba ("sched/idle: Fix arch_cpu_idle() vs
      tracing") common code calls arch_cpu_idle() with a lockdep state that
      tells irqs are on.
      
      This doesn't work very well for s390: psw_idle() will enable interrupts
      to wait for an interrupt. As soon as an interrupt occurs the interrupt
      handler will verify if the old context was psw_idle(). If that is the
      case the interrupt enablement bits in the old program status word will
      be cleared.
      
      A subsequent test in both the external as well as the io interrupt
      handler checks if in the old context interrupts were enabled. Due to
      the above patching of the old program status word it is assumed the
      old context had interrupts disabled, and therefore a call to
      TRACE_IRQS_OFF (aka trace_hardirqs_off_caller) is skipped. Which in
      turn makes lockdep incorrectly "think" that interrupts are enabled
      within the interrupt handler.
      
      Fix this by unconditionally calling TRACE_IRQS_OFF when entering
      interrupt handlers. Also call unconditionally TRACE_IRQS_ON when
      leaving interrupts handlers.
      
      This leaves the special psw_idle() case, which now returns with
      interrupts disabled, but has an "irqs on" lockdep state. So callers of
      psw_idle() must adjust the state on their own, if required. This is
      currently only __udelay_disabled().
      
      Fixes: 58c644ba ("sched/idle: Fix arch_cpu_idle() vs tracing")
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      b1cae1f8
    • Alexander Gordeev's avatar
      s390/pci: fix CPU address in MSI for directed IRQ · a2bd4097
      Alexander Gordeev authored
      The directed MSIs are delivered to CPUs whose address is
      written to the MSI message address. The current code assumes
      that a CPU logical number (as it is seen by the kernel)
      is also the CPU address.
      
      The above assumption is not correct, as the CPU address
      is rather the value returned by STAP instruction. That
      value does not necessarily match the kernel logical CPU
      number.
      
      Fixes: e979ce7b ("s390/pci: provide support for CPU directed interrupts")
      Cc: <stable@vger.kernel.org> # v5.2+
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Reviewed-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Reviewed-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
      Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      a2bd4097
    • Dan Carpenter's avatar
      vhost_vdpa: return -EFAULT if copy_to_user() fails · 2c602741
      Dan Carpenter authored
      The copy_to_user() function returns the number of bytes remaining to be
      copied but this should return -EFAULT to the user.
      
      Fixes: 1b48dc03 ("vhost: vdpa: report iova range")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Link: https://lore.kernel.org/r/X8c32z5EtDsMyyIL@mwandaSigned-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      2c602741
    • Randy Dunlap's avatar
      vdpa: mlx5: fix vdpa/vhost dependencies · 98701a2a
      Randy Dunlap authored
      drivers/vdpa/mlx5/ uses vhost_iotlb*() interfaces, so select
      VHOST_IOTLB to make them be built.
      
      However, if VHOST_IOTLB is the only VHOST symbol that is
      set/enabled, the object file still won't be built because
      drivers/Makefile won't descend into drivers/vhost/ to build it,
      so make drivers/Makefile build the needed binary whenever
      VHOST_IOTLB is set, like it does for VHOST_RING.
      
      Fixes these build errors:
      ERROR: modpost: "vhost_iotlb_itree_next" [drivers/vdpa/mlx5/mlx5_vdpa.ko] undefined!
      ERROR: modpost: "vhost_iotlb_itree_first" [drivers/vdpa/mlx5/mlx5_vdpa.ko] undefined!
      
      Fixes: 29064bfd ("vdpa/mlx5: Add support library for mlx5 VDPA implementation")
      Fixes: aff90770 ("vdpa/mlx5: Fix dependency on MLX5_CORE")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Eli Cohen <eli@mellanox.com>
      Cc: Parav Pandit <parav@mellanox.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: virtualization@lists.linux-foundation.org
      Cc: Saeed Mahameed <saeedm@nvidia.com>
      Cc: Leon Romanovsky <leonro@nvidia.com>
      Cc: netdev@vger.kernel.org
      Link: https://lore.kernel.org/r/20201128213905.27409-1-rdunlap@infradead.orgSigned-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      98701a2a
    • Eric Dumazet's avatar
      geneve: pull IP header before ECN decapsulation · 4179b00c
      Eric Dumazet authored
      IP_ECN_decapsulate() and IP6_ECN_decapsulate() assume
      IP header is already pulled.
      
      geneve does not ensure this yet.
      
      Fixing this generically in IP_ECN_decapsulate() and
      IP6_ECN_decapsulate() is not possible, since callers
      pass a pointer that might be freed by pskb_may_pull()
      
      syzbot reported :
      
      BUG: KMSAN: uninit-value in __INET_ECN_decapsulate include/net/inet_ecn.h:238 [inline]
      BUG: KMSAN: uninit-value in INET_ECN_decapsulate+0x345/0x1db0 include/net/inet_ecn.h:260
      CPU: 1 PID: 8941 Comm: syz-executor.0 Not tainted 5.10.0-rc4-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       <IRQ>
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x21c/0x280 lib/dump_stack.c:118
       kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118
       __msan_warning+0x5f/0xa0 mm/kmsan/kmsan_instr.c:197
       __INET_ECN_decapsulate include/net/inet_ecn.h:238 [inline]
       INET_ECN_decapsulate+0x345/0x1db0 include/net/inet_ecn.h:260
       geneve_rx+0x2103/0x2980 include/net/inet_ecn.h:306
       geneve_udp_encap_recv+0x105c/0x1340 drivers/net/geneve.c:377
       udp_queue_rcv_one_skb+0x193a/0x1af0 net/ipv4/udp.c:2093
       udp_queue_rcv_skb+0x282/0x1050 net/ipv4/udp.c:2167
       udp_unicast_rcv_skb net/ipv4/udp.c:2325 [inline]
       __udp4_lib_rcv+0x399d/0x5880 net/ipv4/udp.c:2394
       udp_rcv+0x5c/0x70 net/ipv4/udp.c:2564
       ip_protocol_deliver_rcu+0x572/0xc50 net/ipv4/ip_input.c:204
       ip_local_deliver_finish net/ipv4/ip_input.c:231 [inline]
       NF_HOOK include/linux/netfilter.h:301 [inline]
       ip_local_deliver+0x583/0x8d0 net/ipv4/ip_input.c:252
       dst_input include/net/dst.h:449 [inline]
       ip_rcv_finish net/ipv4/ip_input.c:428 [inline]
       NF_HOOK include/linux/netfilter.h:301 [inline]
       ip_rcv+0x5c3/0x840 net/ipv4/ip_input.c:539
       __netif_receive_skb_one_core net/core/dev.c:5315 [inline]
       __netif_receive_skb+0x1ec/0x640 net/core/dev.c:5429
       process_backlog+0x523/0xc10 net/core/dev.c:6319
       napi_poll+0x420/0x1010 net/core/dev.c:6763
       net_rx_action+0x35c/0xd40 net/core/dev.c:6833
       __do_softirq+0x1a9/0x6fa kernel/softirq.c:298
       asm_call_irq_on_stack+0xf/0x20
       </IRQ>
       __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
       run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
       do_softirq_own_stack+0x6e/0x90 arch/x86/kernel/irq_64.c:77
       do_softirq kernel/softirq.c:343 [inline]
       __local_bh_enable_ip+0x184/0x1d0 kernel/softirq.c:195
       local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32
       rcu_read_unlock_bh include/linux/rcupdate.h:730 [inline]
       __dev_queue_xmit+0x3a9b/0x4520 net/core/dev.c:4167
       dev_queue_xmit+0x4b/0x60 net/core/dev.c:4173
       packet_snd net/packet/af_packet.c:2992 [inline]
       packet_sendmsg+0x86f9/0x99d0 net/packet/af_packet.c:3017
       sock_sendmsg_nosec net/socket.c:651 [inline]
       sock_sendmsg net/socket.c:671 [inline]
       __sys_sendto+0x9dc/0xc80 net/socket.c:1992
       __do_sys_sendto net/socket.c:2004 [inline]
       __se_sys_sendto+0x107/0x130 net/socket.c:2000
       __x64_sys_sendto+0x6e/0x90 net/socket.c:2000
       do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 2d07dc79 ("geneve: add initial netdev driver for GENEVE tunnels")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Link: https://lore.kernel.org/r/20201201090507.4137906-1-eric.dumazet@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4179b00c