All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.10 000/103] 5.10.32-rc1 review
@ 2021-04-19 13:05 Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 001/103] net/sctp: fix race condition in sctp_destroy_sock Greg Kroah-Hartman
                   ` (111 more replies)
  0 siblings, 112 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, stable

This is the start of the stable review cycle for the 5.10.32 release.
There are 103 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
or in the git tree and branch at:
	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 5.10.32-rc1

Daniel Borkmann <daniel@iogearbox.net>
    bpf: Move sanitize_val_alu out of op switch

Daniel Borkmann <daniel@iogearbox.net>
    bpf: Improve verifier error messages for users

Daniel Borkmann <daniel@iogearbox.net>
    bpf: Rework ptr_limit into alu_limit and add common error path

Catalin Marinas <catalin.marinas@arm.com>
    arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically

Fredrik Strupe <fredrik@strupe.net>
    ARM: 9071/1: uprobes: Don't hook on thumb instructions

Daniel Borkmann <daniel@iogearbox.net>
    bpf: Move off_reg into sanitize_ptr_alu

Daniel Borkmann <daniel@iogearbox.net>
    bpf: Ensure off_reg has no mixed signed bounds for all types

Heiner Kallweit <hkallweit1@gmail.com>
    r8169: don't advertise pause in jumbo mode

Heiner Kallweit <hkallweit1@gmail.com>
    r8169: tweak max read request size for newer chips also in jumbo mtu mode

Reiji Watanabe <reijiw@google.com>
    KVM: VMX: Don't use vcpu->run->internal.ndata as an array index

Sean Christopherson <seanjc@google.com>
    KVM: VMX: Convert vcpu_vmx.exit_reason to a union

Daniel Borkmann <daniel@iogearbox.net>
    bpf: Use correct permission flag for mixed signed bounds arithmetic

Jernej Skrabec <jernej.skrabec@siol.net>
    arm64: dts: allwinner: h6: beelink-gs1: Remove ext. 32 kHz osc reference

Andre Przywara <andre.przywara@arm.com>
    arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems

Tony Lindgren <tony@atomide.com>
    ARM: OMAP2+: Fix uninitialized sr_inst

Russell King <rmk+kernel@armlinux.org.uk>
    ARM: footbridge: fix PCI interrupt mapping

Vladimir Murzin <vladimir.murzin@arm.com>
    ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range()

Tony Lindgren <tony@atomide.com>
    ARM: OMAP2+: Fix warning for omap_init_time_of()

Eric Dumazet <edumazet@google.com>
    gro: ensure frag0 meets IP header alignment

Vinay Kumar Yadav <vinay.yadav@chelsio.com>
    ch_ktls: do not send snd_una update to TCB in middle

Vinay Kumar Yadav <vinay.yadav@chelsio.com>
    ch_ktls: tcb close causes tls connection failure

Vinay Kumar Yadav <vinay.yadav@chelsio.com>
    ch_ktls: fix device connection close

Vinay Kumar Yadav <vinay.yadav@chelsio.com>
    ch_ktls: Fix kernel panic

Lijun Pan <lijunp213@gmail.com>
    ibmvnic: remove duplicate napi_schedule call in open function

Lijun Pan <lijunp213@gmail.com>
    ibmvnic: remove duplicate napi_schedule call in do_reset function

Lijun Pan <lijunp213@gmail.com>
    ibmvnic: avoid calling napi_disable() twice

John Paul Adrian Glaubitz <glaubitz () physik ! fu-berlin ! de>
    ia64: tools: remove inclusion of ia64-specific version of errno.h header

Randy Dunlap <rdunlap@infradead.org>
    ia64: remove duplicate entries in generic_defconfig

Jakub Kicinski <kuba@kernel.org>
    ethtool: pause: make sure we init driver stats

Jason Xing <xingwanli@kuaishou.com>
    i40e: fix the panic when running bpf in xdpdrv mode

Jonathon Reinhart <jonathon.reinhart@gmail.com>
    net: Make tcp_allowed_congestion_control readonly in non-init netns

Christophe Leroy <christophe.leroy@csgroup.eu>
    mm: ptdump: fix build failure

Hristo Venev <hristo@venev.name>
    net: ip6_tunnel: Unregister catch-all devices

Hristo Venev <hristo@venev.name>
    net: sit: Unregister catch-all devices

Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    net: davicom: Fix regulator not turned off on failed probe

Aya Levin <ayal@nvidia.com>
    net/mlx5e: Fix setting of RS FEC mode

Eric Dumazet <edumazet@google.com>
    netfilter: nft_limit: avoid possible divide error in nft_limit_init

wenxu <wenxu@ucloud.cn>
    net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta

Claudiu Beznea <claudiu.beznea@microchip.com>
    net: macb: fix the restore of cmp registers

Ciara Loftus <ciara.loftus@intel.com>
    libbpf: Fix potential NULL pointer dereference

Florian Westphal <fw@strlen.de>
    netfilter: arp_tables: add pre_exit hook for table unregister

Florian Westphal <fw@strlen.de>
    netfilter: bridge: add pre_exit hooks for ebtable unregistration

Vaibhav Jain <vaibhav@linux.ibm.com>
    libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC

Colin Ian King <colin.king@canonical.com>
    ice: Fix potential infinite loop when using u8 loop counter

Pablo Neira Ayuso <pablo@netfilter.org>
    netfilter: conntrack: do not print icmpv6 as unknown via /proc

Pablo Neira Ayuso <pablo@netfilter.org>
    netfilter: flowtable: fix NAT IPv6 offload mangling

Yongxin Liu <yongxin.liu@windriver.com>
    ixgbe: fix unbalanced device enable/disable in suspend/resume

Jolly Shah <jollys@google.com>
    scsi: libsas: Reset num_scatter if libata marks qc as NODATA

Kefeng Wang <wangkefeng.wang@huawei.com>
    riscv: Fix spelling mistake "SPARSEMEM" to "SPARSMEM"

Christian A. Ehrhardt <lk@c--e.de>
    vfio/pci: Add missing range check in vfio_pci_mmap

Nathan Chancellor <nathan@kernel.org>
    arm64: alternatives: Move length validation in alternative_{insn, endif}

Peter Collingbourne <pcc@google.com>
    arm64: fix inline asm in load_unaligned_zeropad()

Linus Torvalds <torvalds@linux-foundation.org>
    readdir: make sure to verify directory entry for legacy interfaces too

Jaegeuk Kim <jaegeuk@kernel.org>
    dm verity fec: fix misaligned RS roots IO

Ping Cheng <pinglinux@gmail.com>
    HID: wacom: set EV_KEY and EV_ABS only for non-HID_GENERIC type of devices

Arnd Bergmann <arnd@arndb.de>
    Input: i8042 - fix Pegatron C15B ID entry

Caleb Connolly <caleb@connolly.tech>
    Input: s6sy761 - fix coordinate read bit shift

Julian Braha <julianbraha@gmail.com>
    lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS

A. Cody Schuffelen <schuffelen@google.com>
    virt_wifi: Return micros for BSS TSF values

Seevalamuthu Mariappan <seevalam@codeaurora.org>
    mac80211: clear sta->fast_rx when STA removed from 4-addr VLAN

Zheng Yongjun <zhengyongjun3@huawei.com>
    net: tipc: Fix spelling errors in net/tipc module

Aditya Pakki <pakki001@umn.edu>
    net/rds: Avoid potential use after free in rds_send_remove_from_sock

Guenter Roeck <linux@roeck-us.net>
    pcnet32: Use pci_resource_len to validate PCI resource

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: forbid monitor for add llsec seclevel

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: stop dump llsec seclevels for monitors

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: forbid monitor for del llsec devkey

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: forbid monitor for add llsec devkey

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: stop dump llsec devkeys for monitors

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: forbid monitor for del llsec dev

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: forbid monitor for add llsec dev

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: stop dump llsec devs for monitors

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: forbid monitor for del llsec key

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: forbid monitor for add llsec key

Alexander Aring <aahringo@redhat.com>
    net: ieee802154: stop dump llsec keys for monitors

Matt Chen <matt.chen@intel.com>
    iwlwifi: add support for Qu with AX201 device

Martin Wilck <mwilck@suse.com>
    scsi: scsi_transport_srp: Don't block target in SRP_PORT_LOST state

Alexander Shiyan <shc_work@mail.ru>
    ASoC: fsl_esai: Fix TDM slot setup for I2S mode

Rob Clark <robdclark@chromium.org>
    drm/msm: Fix a5xx/a6xx timestamps

Arnd Bergmann <arnd@arndb.de>
    ARM: omap1: fix building with clang IAS

Arnd Bergmann <arnd@arndb.de>
    ARM: keystone: fix integer overflow warning

Tong Zhu <zhutong@amazon.com>
    neighbour: Disregard DEAD dst in neigh_update

Lv Yunlong <lyl2019@mail.ustc.edu.cn>
    gpu/xen: Fix a use after free in xen_drm_drv_init

Ryan Lee <ryans.lee@maximintegrated.com>
    ASoC: max98373: Added 30ms turn on/off time delay

Ryan Lee <ryans.lee@maximintegrated.com>
    ASoC: max98373: Changed amp shutdown register as volatile

Xin Long <lucien.xin@gmail.com>
    xfrm: BEET mode doesn't support fragments for inner packets

Jiri Kosina <jkosina@suse.cz>
    iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd()

Wang Qing <wangqing@vivo.com>
    arc: kernel: Return -EFAULT if copy_to_user() fails

Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    lockdep: Add a missing initialization hint to the "INFO: Trying to register non-static key" message

Tony Lindgren <tony@atomide.com>
    ARM: dts: Fix moving mmc devices with aliases for omap4 & 5

Tony Lindgren <tony@atomide.com>
    ARM: dts: Drop duplicate sha2md5_fck to fix clk_disable race

Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    ACPI: x86: Call acpi_boot_table_init() after acpi_table_upgrade()

Dave Jiang <dave.jiang@intel.com>
    dmaengine: idxd: fix wq cleanup of WQCFG registers

Dan Carpenter <dan.carpenter@oracle.com>
    dmaengine: plx_dma: add a missing put_device() on error path

Lv Yunlong <lyl2019@mail.ustc.edu.cn>
    dmaengine: Fix a double free in dma_async_device_register

Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    dmaengine: dw: Make it dependent to HAS_IOMEM

Dave Jiang <dave.jiang@intel.com>
    dmaengine: idxd: fix wq size store permission state

Dave Jiang <dave.jiang@intel.com>
    dmaengine: idxd: fix opcap sysfs attribute output

Dave Jiang <dave.jiang@intel.com>
    dmaengine: idxd: fix delta_rec and crc size field for completion record

Dave Jiang <dave.jiang@intel.com>
    dmaengine: idxd: Fix clobbering of SWERR overflow bit on writeback

Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
    gpio: sysfs: Obey valid_mask

Fabian Vogt <fabian@ritter-vogt.de>
    Input: nspire-keypad - enable interrupts only when opened

Hauke Mehrtens <hauke@hauke-m.de>
    mtd: rawnand: mtk: Fix WAITRDY break condition and timeout

Or Cohen <orcohen@paloaltonetworks.com>
    net/sctp: fix race condition in sctp_destroy_sock


-------------

Diffstat:

 Makefile                                           |   4 +-
 arch/arc/kernel/signal.c                           |   4 +-
 arch/arm/boot/dts/omap4.dtsi                       |   5 +
 arch/arm/boot/dts/omap44xx-clocks.dtsi             |   8 --
 arch/arm/boot/dts/omap5.dtsi                       |   5 +
 arch/arm/mach-footbridge/cats-pci.c                |   4 +-
 arch/arm/mach-footbridge/ebsa285-pci.c             |   4 +-
 arch/arm/mach-footbridge/netwinder-pci.c           |   2 +-
 arch/arm/mach-footbridge/personal-pci.c            |   5 +-
 arch/arm/mach-keystone/keystone.c                  |   4 +-
 arch/arm/mach-omap1/ams-delta-fiq-handler.S        |   1 +
 arch/arm/mach-omap2/board-generic.c                |   2 +-
 arch/arm/mach-omap2/sr_device.c                    |   2 +-
 arch/arm/mm/pmsa-v7.c                              |   4 +-
 arch/arm/mm/pmsa-v8.c                              |   4 +-
 arch/arm/probes/uprobes/core.c                     |   4 +-
 arch/arm64/Kconfig                                 |   6 +-
 .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts   |   4 +
 .../boot/dts/allwinner/sun50i-a64-sopine.dtsi      |   2 +-
 .../boot/dts/allwinner/sun50i-h6-beelink-gs1.dts   |   4 -
 arch/arm64/include/asm/alternative.h               |   8 +-
 arch/arm64/include/asm/word-at-a-time.h            |  10 +-
 arch/arm64/kernel/entry.S                          |  10 +-
 arch/ia64/configs/generic_defconfig                |   2 -
 arch/riscv/Kconfig                                 |   2 +-
 arch/x86/kernel/setup.c                            |   5 +-
 arch/x86/kvm/vmx/nested.c                          |  42 ++++---
 arch/x86/kvm/vmx/vmx.c                             |  78 ++++++------
 arch/x86/kvm/vmx/vmx.h                             |  25 +++-
 drivers/dma/dmaengine.c                            |   1 +
 drivers/dma/dw/Kconfig                             |   2 +
 drivers/dma/idxd/device.c                          |  35 ++++--
 drivers/dma/idxd/idxd.h                            |   1 +
 drivers/dma/idxd/irq.c                             |   4 +-
 drivers/dma/idxd/sysfs.c                           |  19 +--
 drivers/dma/plx_dma.c                              |  18 +--
 drivers/gpio/gpiolib-sysfs.c                       |   8 ++
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c              |   4 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c              |   4 +-
 drivers/gpu/drm/xen/xen_drm_front.c                |   6 +-
 drivers/hid/wacom_wac.c                            |   6 +-
 drivers/input/keyboard/nspire-keypad.c             |  56 +++++----
 drivers/input/serio/i8042-x86ia64io.h              |   1 +
 drivers/input/touchscreen/s6sy761.c                |   4 +-
 drivers/md/dm-verity-fec.c                         |  11 +-
 drivers/md/dm-verity-fec.h                         |   1 +
 drivers/mtd/nand/raw/mtk_nand.c                    |   4 +-
 drivers/net/ethernet/amd/pcnet32.c                 |   5 +-
 drivers/net/ethernet/cadence/macb_main.c           |   2 +-
 .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c      | 102 ++-------------
 drivers/net/ethernet/davicom/dm9000.c              |   6 +-
 drivers/net/ethernet/ibm/ibmvnic.c                 |  14 +--
 drivers/net/ethernet/intel/i40e/i40e_main.c        |   6 +
 drivers/net/ethernet/intel/ice/ice_dcb.c           |   4 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |   5 +
 drivers/net/ethernet/mellanox/mlx5/core/en/port.c  |  23 +---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c    |   3 +
 drivers/net/ethernet/realtek/r8169_main.c          |  18 ++-
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      |   1 +
 drivers/net/wireless/intel/iwlwifi/pcie/tx.c       |   7 +-
 drivers/net/wireless/virt_wifi.c                   |   5 +-
 drivers/nvdimm/region_devs.c                       |   9 +-
 drivers/scsi/libsas/sas_ata.c                      |   9 +-
 drivers/scsi/scsi_transport_srp.c                  |   2 +-
 drivers/vfio/pci/vfio_pci.c                        |   4 +-
 fs/readdir.c                                       |   6 +
 include/linux/netfilter_arp/arp_tables.h           |   5 +-
 include/linux/netfilter_bridge/ebtables.h          |   5 +-
 include/uapi/linux/idxd.h                          |   4 +-
 kernel/bpf/verifier.c                              | 138 ++++++++++++++-------
 kernel/locking/lockdep.c                           |   3 +-
 lib/Kconfig.debug                                  |   6 +-
 mm/ptdump.c                                        |   2 +-
 net/bridge/netfilter/ebtable_broute.c              |   8 +-
 net/bridge/netfilter/ebtable_filter.c              |   8 +-
 net/bridge/netfilter/ebtable_nat.c                 |   8 +-
 net/bridge/netfilter/ebtables.c                    |  30 ++++-
 net/core/dev.c                                     |   3 +-
 net/core/neighbour.c                               |   2 +-
 net/ethtool/pause.c                                |   8 +-
 net/ieee802154/nl802154.c                          |  41 ++++++
 net/ipv4/netfilter/arp_tables.c                    |   9 +-
 net/ipv4/netfilter/arptable_filter.c               |  10 +-
 net/ipv4/sysctl_net_ipv4.c                         |  16 ++-
 net/ipv6/ip6_tunnel.c                              |  10 ++
 net/ipv6/sit.c                                     |   4 +-
 net/mac80211/cfg.c                                 |   4 +-
 net/netfilter/nf_conntrack_standalone.c            |   1 +
 net/netfilter/nf_flow_table_offload.c              |   6 +-
 net/netfilter/nft_limit.c                          |   4 +-
 net/rds/message.c                                  |   1 +
 net/rds/send.c                                     |   2 +-
 net/sctp/socket.c                                  |  13 +-
 net/tipc/bearer.h                                  |   6 +-
 net/tipc/net.c                                     |   2 +-
 net/tipc/node.c                                    |   2 +-
 net/xfrm/xfrm_output.c                             |  13 ++
 sound/soc/codecs/max98373-i2c.c                    |   1 +
 sound/soc/codecs/max98373-sdw.c                    |   1 +
 sound/soc/codecs/max98373.c                        |   2 +
 sound/soc/fsl/fsl_esai.c                           |   8 +-
 tools/include/uapi/asm/errno.h                     |   2 -
 tools/lib/bpf/xsk.c                                |   5 +-
 103 files changed, 641 insertions(+), 428 deletions(-)



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 001/103] net/sctp: fix race condition in sctp_destroy_sock
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 002/103] mtd: rawnand: mtk: Fix WAITRDY break condition and timeout Greg Kroah-Hartman
                   ` (110 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Or Cohen, Xin Long,
	Marcelo Ricardo Leitner, David S. Miller

From: Or Cohen <orcohen@paloaltonetworks.com>

commit b166a20b07382b8bc1dcee2a448715c9c2c81b5b upstream.

If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock
held and sp->do_auto_asconf is true, then an element is removed
from the auto_asconf_splist without any proper locking.

This can happen in the following functions:
1. In sctp_accept, if sctp_sock_migrate fails.
2. In inet_create or inet6_create, if there is a bpf program
   attached to BPF_CGROUP_INET_SOCK_CREATE which denies
   creation of the sctp socket.

The bug is fixed by acquiring addr_wq_lock in sctp_destroy_sock
instead of sctp_close.

This addresses CVE-2021-23133.

Reported-by: Or Cohen <orcohen@paloaltonetworks.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Fixes: 610236587600 ("bpf: Add new cgroup attach type to enable sock modifications")
Signed-off-by: Or Cohen <orcohen@paloaltonetworks.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/sctp/socket.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1520,11 +1520,9 @@ static void sctp_close(struct sock *sk,
 
 	/* Supposedly, no process has access to the socket, but
 	 * the net layers still may.
-	 * Also, sctp_destroy_sock() needs to be called with addr_wq_lock
-	 * held and that should be grabbed before socket lock.
 	 */
-	spin_lock_bh(&net->sctp.addr_wq_lock);
-	bh_lock_sock_nested(sk);
+	local_bh_disable();
+	bh_lock_sock(sk);
 
 	/* Hold the sock, since sk_common_release() will put sock_put()
 	 * and we have just a little more cleanup.
@@ -1533,7 +1531,7 @@ static void sctp_close(struct sock *sk,
 	sk_common_release(sk);
 
 	bh_unlock_sock(sk);
-	spin_unlock_bh(&net->sctp.addr_wq_lock);
+	local_bh_enable();
 
 	sock_put(sk);
 
@@ -4939,9 +4937,6 @@ static int sctp_init_sock(struct sock *s
 	sk_sockets_allocated_inc(sk);
 	sock_prot_inuse_add(net, sk->sk_prot, 1);
 
-	/* Nothing can fail after this block, otherwise
-	 * sctp_destroy_sock() will be called without addr_wq_lock held
-	 */
 	if (net->sctp.default_auto_asconf) {
 		spin_lock(&sock_net(sk)->sctp.addr_wq_lock);
 		list_add_tail(&sp->auto_asconf_list,
@@ -4976,7 +4971,9 @@ static void sctp_destroy_sock(struct soc
 
 	if (sp->do_auto_asconf) {
 		sp->do_auto_asconf = 0;
+		spin_lock_bh(&sock_net(sk)->sctp.addr_wq_lock);
 		list_del(&sp->auto_asconf_list);
+		spin_unlock_bh(&sock_net(sk)->sctp.addr_wq_lock);
 	}
 	sctp_endpoint_free(sp->ep);
 	local_bh_disable();



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 002/103] mtd: rawnand: mtk: Fix WAITRDY break condition and timeout
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 001/103] net/sctp: fix race condition in sctp_destroy_sock Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 003/103] Input: nspire-keypad - enable interrupts only when opened Greg Kroah-Hartman
                   ` (109 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hauke Mehrtens, Boris Brezillon,
	Miquel Raynal, Sasha Levin

From: Hauke Mehrtens <hauke@hauke-m.de>

[ Upstream commit 2fb164f0ce95e504e2688b4f984893c29ebd19ab ]

This fixes NAND_OP_WAITRDY_INSTR operation in the driver. Without this
change the driver waits till the system is busy, but we should wait till
the busy flag is cleared. The readl_poll_timeout() function gets a break
condition, not a wait condition.

In addition fix the timeout. The timeout_ms is given in ms, but the
readl_poll_timeout() function takes the timeout in us. Multiple the
given timeout by 1000 to convert it.

Without this change, the driver does not work at all, it doesn't even
identify the NAND chip.

Fixes: 5197360f9e09 ("mtd: rawnand: mtk: Convert the driver to exec_op()")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210309000107.1368404-1-hauke@hauke-m.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/mtd/nand/raw/mtk_nand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c
index 57f1f1708994..5c5c92132287 100644
--- a/drivers/mtd/nand/raw/mtk_nand.c
+++ b/drivers/mtd/nand/raw/mtk_nand.c
@@ -488,8 +488,8 @@ static int mtk_nfc_exec_instr(struct nand_chip *chip,
 		return 0;
 	case NAND_OP_WAITRDY_INSTR:
 		return readl_poll_timeout(nfc->regs + NFI_STA, status,
-					  status & STA_BUSY, 20,
-					  instr->ctx.waitrdy.timeout_ms);
+					  !(status & STA_BUSY), 20,
+					  instr->ctx.waitrdy.timeout_ms * 1000);
 	default:
 		break;
 	}
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 003/103] Input: nspire-keypad - enable interrupts only when opened
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 001/103] net/sctp: fix race condition in sctp_destroy_sock Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 002/103] mtd: rawnand: mtk: Fix WAITRDY break condition and timeout Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 004/103] gpio: sysfs: Obey valid_mask Greg Kroah-Hartman
                   ` (108 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Fabian Vogt, Dmitry Torokhov, Sasha Levin

From: Fabian Vogt <fabian@ritter-vogt.de>

[ Upstream commit 69d5ff3e9e51e23d5d81bf48480aa5671be67a71 ]

The driver registers an interrupt handler in _probe, but didn't configure
them until later when the _open function is called. In between, the keypad
can fire an IRQ due to touchpad activity, which the handler ignores. This
causes the kernel to disable the interrupt, blocking the keypad from
working.

Fix this by disabling interrupts before registering the handler.
Additionally, disable them in _close, so that they're only enabled while
open.

Fixes: fc4f31461892 ("Input: add TI-Nspire keypad support")
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
Link: https://lore.kernel.org/r/3383725.iizBOSrK1V@linux-e202.suse.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/keyboard/nspire-keypad.c | 56 ++++++++++++++------------
 1 file changed, 31 insertions(+), 25 deletions(-)

diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c
index 63d5e488137d..e9fa1423f136 100644
--- a/drivers/input/keyboard/nspire-keypad.c
+++ b/drivers/input/keyboard/nspire-keypad.c
@@ -93,9 +93,15 @@ static irqreturn_t nspire_keypad_irq(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static int nspire_keypad_chip_init(struct nspire_keypad *keypad)
+static int nspire_keypad_open(struct input_dev *input)
 {
+	struct nspire_keypad *keypad = input_get_drvdata(input);
 	unsigned long val = 0, cycles_per_us, delay_cycles, row_delay_cycles;
+	int error;
+
+	error = clk_prepare_enable(keypad->clk);
+	if (error)
+		return error;
 
 	cycles_per_us = (clk_get_rate(keypad->clk) / 1000000);
 	if (cycles_per_us == 0)
@@ -121,30 +127,6 @@ static int nspire_keypad_chip_init(struct nspire_keypad *keypad)
 	keypad->int_mask = 1 << 1;
 	writel(keypad->int_mask, keypad->reg_base + KEYPAD_INTMSK);
 
-	/* Disable GPIO interrupts to prevent hanging on touchpad */
-	/* Possibly used to detect touchpad events */
-	writel(0, keypad->reg_base + KEYPAD_UNKNOWN_INT);
-	/* Acknowledge existing interrupts */
-	writel(~0, keypad->reg_base + KEYPAD_UNKNOWN_INT_STS);
-
-	return 0;
-}
-
-static int nspire_keypad_open(struct input_dev *input)
-{
-	struct nspire_keypad *keypad = input_get_drvdata(input);
-	int error;
-
-	error = clk_prepare_enable(keypad->clk);
-	if (error)
-		return error;
-
-	error = nspire_keypad_chip_init(keypad);
-	if (error) {
-		clk_disable_unprepare(keypad->clk);
-		return error;
-	}
-
 	return 0;
 }
 
@@ -152,6 +134,11 @@ static void nspire_keypad_close(struct input_dev *input)
 {
 	struct nspire_keypad *keypad = input_get_drvdata(input);
 
+	/* Disable interrupts */
+	writel(0, keypad->reg_base + KEYPAD_INTMSK);
+	/* Acknowledge existing interrupts */
+	writel(~0, keypad->reg_base + KEYPAD_INT);
+
 	clk_disable_unprepare(keypad->clk);
 }
 
@@ -210,6 +197,25 @@ static int nspire_keypad_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 
+	error = clk_prepare_enable(keypad->clk);
+	if (error) {
+		dev_err(&pdev->dev, "failed to enable clock\n");
+		return error;
+	}
+
+	/* Disable interrupts */
+	writel(0, keypad->reg_base + KEYPAD_INTMSK);
+	/* Acknowledge existing interrupts */
+	writel(~0, keypad->reg_base + KEYPAD_INT);
+
+	/* Disable GPIO interrupts to prevent hanging on touchpad */
+	/* Possibly used to detect touchpad events */
+	writel(0, keypad->reg_base + KEYPAD_UNKNOWN_INT);
+	/* Acknowledge existing GPIO interrupts */
+	writel(~0, keypad->reg_base + KEYPAD_UNKNOWN_INT_STS);
+
+	clk_disable_unprepare(keypad->clk);
+
 	input_set_drvdata(input, keypad);
 
 	input->id.bustype = BUS_HOST;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 004/103] gpio: sysfs: Obey valid_mask
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 003/103] Input: nspire-keypad - enable interrupts only when opened Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 005/103] dmaengine: idxd: Fix clobbering of SWERR overflow bit on writeback Greg Kroah-Hartman
                   ` (107 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Matti Vaittinen, Andy Shevchenko,
	Bartosz Golaszewski, Sasha Levin

From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>

[ Upstream commit 23cf00ddd2e1aacf1873e43f5e0c519c120daf7a ]

Do not allow exporting GPIOs which are set invalid
by the driver's valid mask.

Fixes: 726cb3ba4969 ("gpiolib: Support 'gpio-reserved-ranges' property")
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpio/gpiolib-sysfs.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index 728f6c687182..fa5d945b2f28 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -458,6 +458,8 @@ static ssize_t export_store(struct class *class,
 	long			gpio;
 	struct gpio_desc	*desc;
 	int			status;
+	struct gpio_chip	*gc;
+	int			offset;
 
 	status = kstrtol(buf, 0, &gpio);
 	if (status < 0)
@@ -469,6 +471,12 @@ static ssize_t export_store(struct class *class,
 		pr_warn("%s: invalid GPIO %ld\n", __func__, gpio);
 		return -EINVAL;
 	}
+	gc = desc->gdev->chip;
+	offset = gpio_chip_hwgpio(desc);
+	if (!gpiochip_line_is_valid(gc, offset)) {
+		pr_warn("%s: GPIO %ld masked\n", __func__, gpio);
+		return -EINVAL;
+	}
 
 	/* No extra locking here; FLAG_SYSFS just signifies that the
 	 * request and export were done by on behalf of userspace, so
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 005/103] dmaengine: idxd: Fix clobbering of SWERR overflow bit on writeback
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 004/103] gpio: sysfs: Obey valid_mask Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 006/103] dmaengine: idxd: fix delta_rec and crc size field for completion record Greg Kroah-Hartman
                   ` (106 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sanjay Kumar, Dave Jiang, Vinod Koul,
	Sasha Levin

From: Dave Jiang <dave.jiang@intel.com>

[ Upstream commit ea941ac294d75d0ace50797aebf0056f6f8f7a7f ]

Current code blindly writes over the SWERR and the OVERFLOW bits. Write
back the bits actually read instead so the driver avoids clobbering the
OVERFLOW bit that comes after the register is read.

Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators")
Reported-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/161352082229.3511254.1002151220537623503.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/idxd/irq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c
index 552e2e270705..6bb1c1773aae 100644
--- a/drivers/dma/idxd/irq.c
+++ b/drivers/dma/idxd/irq.c
@@ -66,7 +66,9 @@ static int process_misc_interrupts(struct idxd_device *idxd, u32 cause)
 		for (i = 0; i < 4; i++)
 			idxd->sw_err.bits[i] = ioread64(idxd->reg_base +
 					IDXD_SWERR_OFFSET + i * sizeof(u64));
-		iowrite64(IDXD_SWERR_ACK, idxd->reg_base + IDXD_SWERR_OFFSET);
+
+		iowrite64(idxd->sw_err.bits[0] & IDXD_SWERR_ACK,
+			  idxd->reg_base + IDXD_SWERR_OFFSET);
 
 		if (idxd->sw_err.valid && idxd->sw_err.wq_idx_valid) {
 			int id = idxd->sw_err.wq_idx;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 006/103] dmaengine: idxd: fix delta_rec and crc size field for completion record
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 005/103] dmaengine: idxd: Fix clobbering of SWERR overflow bit on writeback Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 007/103] dmaengine: idxd: fix opcap sysfs attribute output Greg Kroah-Hartman
                   ` (105 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nikhil Rao, Dave Jiang, Vinod Koul,
	Sasha Levin

From: Dave Jiang <dave.jiang@intel.com>

[ Upstream commit 4ac823e9cd85f66da274c951d21bf9f6b714b729 ]

The delta_rec_size and crc_val in the completion record should
be 32bits and not 16bits.

Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators")
Reported-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/161645618572.2003490.14466173451736323035.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/uapi/linux/idxd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/idxd.h b/include/uapi/linux/idxd.h
index fdcdfe414223..9d9ecc0f4c38 100644
--- a/include/uapi/linux/idxd.h
+++ b/include/uapi/linux/idxd.h
@@ -187,8 +187,8 @@ struct dsa_completion_record {
 			uint32_t	rsvd2:8;
 		};
 
-		uint16_t	delta_rec_size;
-		uint16_t	crc_val;
+		uint32_t	delta_rec_size;
+		uint32_t	crc_val;
 
 		/* DIF check & strip */
 		struct {
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 007/103] dmaengine: idxd: fix opcap sysfs attribute output
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 006/103] dmaengine: idxd: fix delta_rec and crc size field for completion record Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 008/103] dmaengine: idxd: fix wq size store permission state Greg Kroah-Hartman
                   ` (104 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lucas Van, Dave Jiang, Vinod Koul,
	Sasha Levin

From: Dave Jiang <dave.jiang@intel.com>

[ Upstream commit ea6a5735d2a61b938a302eb3629272342a9e7c46 ]

The operation capability register is 256bits. The current output only
prints out the first 64bits. Fix to output the entire 256bits. The current
code omits operation caps from IAX devices.

Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver")
Reported-by: Lucas Van <lucas.van@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/161645624963.2003736.829798666998490151.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/idxd/sysfs.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
index fb97c9f319a5..b3ab86ced355 100644
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@ -1259,8 +1259,14 @@ static ssize_t op_cap_show(struct device *dev,
 {
 	struct idxd_device *idxd =
 		container_of(dev, struct idxd_device, conf_dev);
+	int i, rc = 0;
+
+	for (i = 0; i < 4; i++)
+		rc += sysfs_emit_at(buf, rc, "%#llx ", idxd->hw.opcap.bits[i]);
 
-	return sprintf(buf, "%#llx\n", idxd->hw.opcap.bits[0]);
+	rc--;
+	rc += sysfs_emit_at(buf, rc, "\n");
+	return rc;
 }
 static DEVICE_ATTR_RO(op_cap);
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 008/103] dmaengine: idxd: fix wq size store permission state
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 007/103] dmaengine: idxd: fix opcap sysfs attribute output Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 009/103] dmaengine: dw: Make it dependent to HAS_IOMEM Greg Kroah-Hartman
                   ` (103 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dave Jiang, Vinod Koul, Sasha Levin

From: Dave Jiang <dave.jiang@intel.com>

[ Upstream commit 0fff71c5a311e1264988179f7dcc217fda15fadd ]

WQ size can only be changed when the device is disabled. Current code
allows change when device is enabled but wq is disabled. Change the check
to detect device state.

Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/161782558755.107710.18138252584838406025.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/idxd/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
index b3ab86ced355..ad46b3c648af 100644
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@ -923,7 +923,7 @@ static ssize_t wq_size_store(struct device *dev,
 	if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
 		return -EPERM;
 
-	if (wq->state != IDXD_WQ_DISABLED)
+	if (idxd->state == IDXD_DEV_ENABLED)
 		return -EPERM;
 
 	if (size + total_claimed_wq_size(idxd) - wq->size > idxd->max_wq_size)
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 009/103] dmaengine: dw: Make it dependent to HAS_IOMEM
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 008/103] dmaengine: idxd: fix wq size store permission state Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 010/103] dmaengine: Fix a double free in dma_async_device_register Greg Kroah-Hartman
                   ` (102 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, kernel test robot, Andy Shevchenko,
	Viresh Kumar, Vinod Koul, Sasha Levin

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

[ Upstream commit 88cd1d6191b13689094310c2405394e4ce36d061 ]

Some architectures do not provide devm_*() APIs. Hence make the driver
dependent on HAVE_IOMEM.

Fixes: dbde5c2934d1 ("dw_dmac: use devm_* functions to simplify code")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20210324141757.24710-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/dw/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/dw/Kconfig b/drivers/dma/dw/Kconfig
index e5162690de8f..db25f9b7778c 100644
--- a/drivers/dma/dw/Kconfig
+++ b/drivers/dma/dw/Kconfig
@@ -10,6 +10,7 @@ config DW_DMAC_CORE
 
 config DW_DMAC
 	tristate "Synopsys DesignWare AHB DMA platform driver"
+	depends on HAS_IOMEM
 	select DW_DMAC_CORE
 	help
 	  Support the Synopsys DesignWare AHB DMA controller. This
@@ -18,6 +19,7 @@ config DW_DMAC
 config DW_DMAC_PCI
 	tristate "Synopsys DesignWare AHB DMA PCI driver"
 	depends on PCI
+	depends on HAS_IOMEM
 	select DW_DMAC_CORE
 	help
 	  Support the Synopsys DesignWare AHB DMA controller on the
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 010/103] dmaengine: Fix a double free in dma_async_device_register
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 009/103] dmaengine: dw: Make it dependent to HAS_IOMEM Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 011/103] dmaengine: plx_dma: add a missing put_device() on error path Greg Kroah-Hartman
                   ` (101 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lv Yunlong, Dave Jiang, Vinod Koul,
	Sasha Levin

From: Lv Yunlong <lyl2019@mail.ustc.edu.cn>

[ Upstream commit ea45b6008f8095db0cc09ad6e03c7785c2986197 ]

In the first list_for_each_entry() macro of dma_async_device_register,
it gets the chan from list and calls __dma_async_device_channel_register
(..,chan). We can see that chan->local is allocated by alloc_percpu() and
it is freed chan->local by free_percpu(chan->local) when
__dma_async_device_channel_register() failed.

But after __dma_async_device_channel_register() failed, the caller will
goto err_out and freed the chan->local in the second time by free_percpu().

The cause of this problem is forget to set chan->local to NULL when
chan->local was freed in __dma_async_device_channel_register(). My
patch sets chan->local to NULL when the callee failed to avoid double free.

Fixes: d2fb0a0438384 ("dmaengine: break out channel registration")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20210331014458.3944-1-lyl2019@mail.ustc.edu.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/dmaengine.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index fe6a460c4373..af3ee288bc11 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -1086,6 +1086,7 @@ static int __dma_async_device_channel_register(struct dma_device *device,
 	kfree(chan->dev);
  err_free_local:
 	free_percpu(chan->local);
+	chan->local = NULL;
 	return rc;
 }
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 011/103] dmaengine: plx_dma: add a missing put_device() on error path
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 010/103] dmaengine: Fix a double free in dma_async_device_register Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 012/103] dmaengine: idxd: fix wq cleanup of WQCFG registers Greg Kroah-Hartman
                   ` (100 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Logan Gunthorpe,
	Vinod Koul, Sasha Levin

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit 07503e6aefe4a6efd777062191944a14f03b3a18 ]

Add a missing put_device(&pdev->dev) if the call to
dma_async_device_register(dma); fails.

Fixes: 905ca51e63be ("dmaengine: plx-dma: Introduce PLX DMA engine PCI driver skeleton")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Link: https://lore.kernel.org/r/YFnq/0IQzixtAbC1@mwanda
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/plx_dma.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c
index f387c5bbc170..166934544161 100644
--- a/drivers/dma/plx_dma.c
+++ b/drivers/dma/plx_dma.c
@@ -507,10 +507,8 @@ static int plx_dma_create(struct pci_dev *pdev)
 
 	rc = request_irq(pci_irq_vector(pdev, 0), plx_dma_isr, 0,
 			 KBUILD_MODNAME, plxdev);
-	if (rc) {
-		kfree(plxdev);
-		return rc;
-	}
+	if (rc)
+		goto free_plx;
 
 	spin_lock_init(&plxdev->ring_lock);
 	tasklet_setup(&plxdev->desc_task, plx_dma_desc_task);
@@ -540,14 +538,20 @@ static int plx_dma_create(struct pci_dev *pdev)
 	rc = dma_async_device_register(dma);
 	if (rc) {
 		pci_err(pdev, "Failed to register dma device: %d\n", rc);
-		free_irq(pci_irq_vector(pdev, 0),  plxdev);
-		kfree(plxdev);
-		return rc;
+		goto put_device;
 	}
 
 	pci_set_drvdata(pdev, plxdev);
 
 	return 0;
+
+put_device:
+	put_device(&pdev->dev);
+	free_irq(pci_irq_vector(pdev, 0),  plxdev);
+free_plx:
+	kfree(plxdev);
+
+	return rc;
 }
 
 static int plx_dma_probe(struct pci_dev *pdev,
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 012/103] dmaengine: idxd: fix wq cleanup of WQCFG registers
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 011/103] dmaengine: plx_dma: add a missing put_device() on error path Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 013/103] ACPI: x86: Call acpi_boot_table_init() after acpi_table_upgrade() Greg Kroah-Hartman
                   ` (99 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shreenivaas Devarajan, Dave Jiang,
	Vinod Koul, Sasha Levin

From: Dave Jiang <dave.jiang@intel.com>

[ Upstream commit ea9aadc06a9f10ad20a90edc0a484f1147d88a7a ]

A pre-release silicon erratum workaround where wq reset does not clear
WQCFG registers was leaked into upstream code. Use wq reset command
instead of blasting the MMIO region. This also address an issue where
we clobber registers in future devices.

Fixes: da32b28c95a7 ("dmaengine: idxd: cleanup workqueue config after disabling")
Reported-by: Shreenivaas Devarajan <shreenivaas.devarajan@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/161824330020.881560.16375921906426627033.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/idxd/device.c | 35 ++++++++++++++++++++++++-----------
 drivers/dma/idxd/idxd.h   |  1 +
 drivers/dma/idxd/sysfs.c  |  9 ++-------
 3 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index a6704838ffcb..459e9fbc2253 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -263,6 +263,22 @@ void idxd_wq_drain(struct idxd_wq *wq)
 	idxd_cmd_exec(idxd, IDXD_CMD_DRAIN_WQ, operand, NULL);
 }
 
+void idxd_wq_reset(struct idxd_wq *wq)
+{
+	struct idxd_device *idxd = wq->idxd;
+	struct device *dev = &idxd->pdev->dev;
+	u32 operand;
+
+	if (wq->state != IDXD_WQ_ENABLED) {
+		dev_dbg(dev, "WQ %d in wrong state: %d\n", wq->id, wq->state);
+		return;
+	}
+
+	operand = BIT(wq->id % 16) | ((wq->id / 16) << 16);
+	idxd_cmd_exec(idxd, IDXD_CMD_RESET_WQ, operand, NULL);
+	wq->state = IDXD_WQ_DISABLED;
+}
+
 int idxd_wq_map_portal(struct idxd_wq *wq)
 {
 	struct idxd_device *idxd = wq->idxd;
@@ -291,8 +307,6 @@ void idxd_wq_unmap_portal(struct idxd_wq *wq)
 void idxd_wq_disable_cleanup(struct idxd_wq *wq)
 {
 	struct idxd_device *idxd = wq->idxd;
-	struct device *dev = &idxd->pdev->dev;
-	int i, wq_offset;
 
 	lockdep_assert_held(&idxd->dev_lock);
 	memset(wq->wqcfg, 0, idxd->wqcfg_size);
@@ -303,14 +317,6 @@ void idxd_wq_disable_cleanup(struct idxd_wq *wq)
 	wq->priority = 0;
 	clear_bit(WQ_FLAG_DEDICATED, &wq->flags);
 	memset(wq->name, 0, WQ_NAME_SIZE);
-
-	for (i = 0; i < WQCFG_STRIDES(idxd); i++) {
-		wq_offset = WQCFG_OFFSET(idxd, wq->id, i);
-		iowrite32(0, idxd->reg_base + wq_offset);
-		dev_dbg(dev, "WQ[%d][%d][%#x]: %#x\n",
-			wq->id, i, wq_offset,
-			ioread32(idxd->reg_base + wq_offset));
-	}
 }
 
 /* Device control bits */
@@ -560,7 +566,14 @@ static int idxd_wq_config_write(struct idxd_wq *wq)
 	if (!wq->group)
 		return 0;
 
-	memset(wq->wqcfg, 0, idxd->wqcfg_size);
+	/*
+	 * Instead of memset the entire shadow copy of WQCFG, copy from the hardware after
+	 * wq reset. This will copy back the sticky values that are present on some devices.
+	 */
+	for (i = 0; i < WQCFG_STRIDES(idxd); i++) {
+		wq_offset = WQCFG_OFFSET(idxd, wq->id, i);
+		wq->wqcfg->bits[i] = ioread32(idxd->reg_base + wq_offset);
+	}
 
 	/* byte 0-3 */
 	wq->wqcfg->wq_size = wq->size;
diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h
index 953ef6536aac..1d7849cb9100 100644
--- a/drivers/dma/idxd/idxd.h
+++ b/drivers/dma/idxd/idxd.h
@@ -295,6 +295,7 @@ void idxd_wq_free_resources(struct idxd_wq *wq);
 int idxd_wq_enable(struct idxd_wq *wq);
 int idxd_wq_disable(struct idxd_wq *wq);
 void idxd_wq_drain(struct idxd_wq *wq);
+void idxd_wq_reset(struct idxd_wq *wq);
 int idxd_wq_map_portal(struct idxd_wq *wq);
 void idxd_wq_unmap_portal(struct idxd_wq *wq);
 void idxd_wq_disable_cleanup(struct idxd_wq *wq);
diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
index ad46b3c648af..7566b573d546 100644
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@ -241,7 +241,6 @@ static void disable_wq(struct idxd_wq *wq)
 {
 	struct idxd_device *idxd = wq->idxd;
 	struct device *dev = &idxd->pdev->dev;
-	int rc;
 
 	mutex_lock(&wq->wq_lock);
 	dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev));
@@ -262,17 +261,13 @@ static void disable_wq(struct idxd_wq *wq)
 	idxd_wq_unmap_portal(wq);
 
 	idxd_wq_drain(wq);
-	rc = idxd_wq_disable(wq);
+	idxd_wq_reset(wq);
 
 	idxd_wq_free_resources(wq);
 	wq->client_count = 0;
 	mutex_unlock(&wq->wq_lock);
 
-	if (rc < 0)
-		dev_warn(dev, "Failed to disable %s: %d\n",
-			 dev_name(&wq->conf_dev), rc);
-	else
-		dev_info(dev, "wq %s disabled\n", dev_name(&wq->conf_dev));
+	dev_info(dev, "wq %s disabled\n", dev_name(&wq->conf_dev));
 }
 
 static int idxd_config_bus_remove(struct device *dev)
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 013/103] ACPI: x86: Call acpi_boot_table_init() after acpi_table_upgrade()
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 012/103] dmaengine: idxd: fix wq cleanup of WQCFG registers Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 014/103] ARM: dts: Drop duplicate sha2md5_fck to fix clk_disable race Greg Kroah-Hartman
                   ` (98 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hans de Goede, Rafael J. Wysocki,
	Sasha Levin

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

[ Upstream commit 6998a8800d73116187aad542391ce3b2dd0f9e30 ]

Commit 1a1c130ab757 ("ACPI: tables: x86: Reserve memory occupied by
ACPI tables") attempted to address an issue with reserving the memory
occupied by ACPI tables, but it broke the initrd-based table override
mechanism relied on by multiple users.

To restore the initrd-based ACPI table override functionality, move
the acpi_boot_table_init() invocation in setup_arch() on x86 after
the acpi_table_upgrade() one.

Fixes: 1a1c130ab757 ("ACPI: tables: x86: Reserve memory occupied by ACPI tables")
Reported-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/kernel/setup.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index d23795057c4f..28c89fce0dab 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1051,9 +1051,6 @@ void __init setup_arch(char **cmdline_p)
 
 	cleanup_highmap();
 
-	/* Look for ACPI tables and reserve memory occupied by them. */
-	acpi_boot_table_init();
-
 	memblock_set_current_limit(ISA_END_ADDRESS);
 	e820__memblock_setup();
 
@@ -1132,6 +1129,8 @@ void __init setup_arch(char **cmdline_p)
 	reserve_initrd();
 
 	acpi_table_upgrade();
+	/* Look for ACPI tables and reserve memory occupied by them. */
+	acpi_boot_table_init();
 
 	vsmp_init();
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 014/103] ARM: dts: Drop duplicate sha2md5_fck to fix clk_disable race
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 013/103] ACPI: x86: Call acpi_boot_table_init() after acpi_table_upgrade() Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 015/103] ARM: dts: Fix moving mmc devices with aliases for omap4 & 5 Greg Kroah-Hartman
                   ` (97 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tony Lindgren, Sasha Levin

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit 140a776833957539c84301dbdb4c3013876de118 ]

We have a duplicate legacy clock defined for sha2md5_fck that can
sometimes race with clk_disable() with the dts configured clock
for OMAP4_SHA2MD5_CLKCTRL when unused clocks are disabled during
boot causing an "Unhandled fault: imprecise external abort".

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/omap44xx-clocks.dtsi | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/arm/boot/dts/omap44xx-clocks.dtsi b/arch/arm/boot/dts/omap44xx-clocks.dtsi
index 532868591107..1f1c04d8f472 100644
--- a/arch/arm/boot/dts/omap44xx-clocks.dtsi
+++ b/arch/arm/boot/dts/omap44xx-clocks.dtsi
@@ -770,14 +770,6 @@
 		ti,max-div = <2>;
 	};
 
-	sha2md5_fck: sha2md5_fck@15c8 {
-		#clock-cells = <0>;
-		compatible = "ti,gate-clock";
-		clocks = <&l3_div_ck>;
-		ti,bit-shift = <1>;
-		reg = <0x15c8>;
-	};
-
 	usb_phy_cm_clk32k: usb_phy_cm_clk32k@640 {
 		#clock-cells = <0>;
 		compatible = "ti,gate-clock";
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 015/103] ARM: dts: Fix moving mmc devices with aliases for omap4 & 5
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 014/103] ARM: dts: Drop duplicate sha2md5_fck to fix clk_disable race Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 016/103] lockdep: Add a missing initialization hint to the "INFO: Trying to register non-static key" message Greg Kroah-Hartman
                   ` (96 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tony Lindgren, Sasha Levin

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit 77335a040178a0456d4eabc8bf17a7ca3ee4a327 ]

Fix moving mmc devices with dts aliases as discussed on the lists.
Without this we now have internal eMMC mmc1 show up as mmc2 compared
to the earlier order of devices.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/omap4.dtsi | 5 +++++
 arch/arm/boot/dts/omap5.dtsi | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index d6475cc6a91a..049174086756 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -22,6 +22,11 @@
 		i2c1 = &i2c2;
 		i2c2 = &i2c3;
 		i2c3 = &i2c4;
+		mmc0 = &mmc1;
+		mmc1 = &mmc2;
+		mmc2 = &mmc3;
+		mmc3 = &mmc4;
+		mmc4 = &mmc5;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 2bf2e5839a7f..530210db2719 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -25,6 +25,11 @@
 		i2c2 = &i2c3;
 		i2c3 = &i2c4;
 		i2c4 = &i2c5;
+		mmc0 = &mmc1;
+		mmc1 = &mmc2;
+		mmc2 = &mmc3;
+		mmc3 = &mmc4;
+		mmc4 = &mmc5;
 		serial0 = &uart1;
 		serial1 = &uart2;
 		serial2 = &uart3;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 016/103] lockdep: Add a missing initialization hint to the "INFO: Trying to register non-static key" message
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 015/103] ARM: dts: Fix moving mmc devices with aliases for omap4 & 5 Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 017/103] arc: kernel: Return -EFAULT if copy_to_user() fails Greg Kroah-Hartman
                   ` (95 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tetsuo Handa, Ingo Molnar, Sasha Levin

From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

[ Upstream commit 3a85969e9d912d5dd85362ee37b5f81266e00e77 ]

Since this message is printed when dynamically allocated spinlocks (e.g.
kzalloc()) are used without initialization (e.g. spin_lock_init()),
suggest to developers to check whether initialization functions for objects
were called, before making developers wonder what annotation is missing.

[ mingo: Minor tweaks to the message. ]

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210321064913.4619-1-penguin-kernel@I-love.SAKURA.ne.jp
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/locking/lockdep.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index eead7efbe7e5..38d7c03e694c 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -930,7 +930,8 @@ static bool assign_lock_key(struct lockdep_map *lock)
 		/* Debug-check: all keys must be persistent! */
 		debug_locks_off();
 		pr_err("INFO: trying to register non-static key.\n");
-		pr_err("the code is fine but needs lockdep annotation.\n");
+		pr_err("The code is fine but needs lockdep annotation, or maybe\n");
+		pr_err("you didn't initialize this object before use?\n");
 		pr_err("turning off the locking correctness validator.\n");
 		dump_stack();
 		return false;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 017/103] arc: kernel: Return -EFAULT if copy_to_user() fails
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 016/103] lockdep: Add a missing initialization hint to the "INFO: Trying to register non-static key" message Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 018/103] iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd() Greg Kroah-Hartman
                   ` (94 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wang Qing, Vineet Gupta, Sasha Levin

From: Wang Qing <wangqing@vivo.com>

[ Upstream commit 46e152186cd89d940b26726fff11eb3f4935b45a ]

The copy_to_user() function returns the number of bytes remaining to be
copied, but we want to return -EFAULT if the copy doesn't complete.

Signed-off-by: Wang Qing <wangqing@vivo.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arc/kernel/signal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arc/kernel/signal.c b/arch/arc/kernel/signal.c
index 2be55fb96d87..98e575dbcce5 100644
--- a/arch/arc/kernel/signal.c
+++ b/arch/arc/kernel/signal.c
@@ -96,7 +96,7 @@ stash_usr_regs(struct rt_sigframe __user *sf, struct pt_regs *regs,
 			     sizeof(sf->uc.uc_mcontext.regs.scratch));
 	err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(sigset_t));
 
-	return err;
+	return err ? -EFAULT : 0;
 }
 
 static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf)
@@ -110,7 +110,7 @@ static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf)
 				&(sf->uc.uc_mcontext.regs.scratch),
 				sizeof(sf->uc.uc_mcontext.regs.scratch));
 	if (err)
-		return err;
+		return -EFAULT;
 
 	set_current_blocked(&set);
 	regs->bta	= uregs.scratch.bta;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 018/103] iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd()
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 017/103] arc: kernel: Return -EFAULT if copy_to_user() fails Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 019/103] xfrm: BEET mode doesnt support fragments for inner packets Greg Kroah-Hartman
                   ` (93 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jiri Kosina, Luca Coelho, Kalle Valo,
	Sasha Levin, Sedat Dilek

From: Jiri Kosina <jkosina@suse.cz>

[ Upstream commit 2800aadc18a64c96b051bcb7da8a7df7d505db3f ]

It's possible for iwl_pcie_enqueue_hcmd() to be called with hard IRQs
disabled (e.g. from LED core). We can't enable BHs in such a situation.

Turn the unconditional BH-enable/BH-disable code into
hardirq-disable/conditional-enable.

This fixes the warning below.

 WARNING: CPU: 1 PID: 1139 at kernel/softirq.c:178 __local_bh_enable_ip+0xa5/0xf0
 CPU: 1 PID: 1139 Comm: NetworkManager Not tainted 5.12.0-rc1-00004-gb4ded168af79 #7
 Hardware name: LENOVO 20K5S22R00/20K5S22R00, BIOS R0IET38W (1.16 ) 05/31/2017
 RIP: 0010:__local_bh_enable_ip+0xa5/0xf0
 Code: f7 69 e8 ee 23 14 00 fb 66 0f 1f 44 00 00 65 8b 05 f0 f4 f7 69 85 c0 74 3f 48 83 c4 08 5b c3 65 8b 05 9b fe f7 69 85 c0 75 8e <0f> 0b eb 8a 48 89 3c 24 e8 4e 20 14 00 48 8b 3c 24 eb 91 e8 13 4e
 RSP: 0018:ffffafd580b13298 EFLAGS: 00010046
 RAX: 0000000000000000 RBX: 0000000000000201 RCX: 0000000000000000
 RDX: 0000000000000003 RSI: 0000000000000201 RDI: ffffffffc1272389
 RBP: ffff96517ae4c018 R08: 0000000000000001 R09: 0000000000000000
 R10: ffffafd580b13178 R11: 0000000000000001 R12: ffff96517b060000
 R13: 0000000000000000 R14: ffffffff80000000 R15: 0000000000000001
 FS:  00007fc604ebefc0(0000) GS:ffff965267480000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 000055fb3fef13b2 CR3: 0000000109112004 CR4: 00000000003706e0
 Call Trace:
  ? _raw_spin_unlock_bh+0x1f/0x30
  iwl_pcie_enqueue_hcmd+0x5d9/0xa00 [iwlwifi]
  iwl_trans_txq_send_hcmd+0x6c/0x430 [iwlwifi]
  iwl_trans_send_cmd+0x88/0x170 [iwlwifi]
  ? lock_acquire+0x277/0x3d0
  iwl_mvm_send_cmd+0x32/0x80 [iwlmvm]
  iwl_mvm_led_set+0xc2/0xe0 [iwlmvm]
  ? led_trigger_event+0x46/0x70
  led_trigger_event+0x46/0x70
  ieee80211_do_open+0x5c5/0xa20 [mac80211]
  ieee80211_open+0x67/0x90 [mac80211]
  __dev_open+0xd4/0x150
  __dev_change_flags+0x19e/0x1f0
  dev_change_flags+0x23/0x60
  do_setlink+0x30d/0x1230
  ? lock_is_held_type+0xb4/0x120
  ? __nla_validate_parse.part.7+0x57/0xcb0
  ? __lock_acquire+0x2e1/0x1a50
  __rtnl_newlink+0x560/0x910
  ? __lock_acquire+0x2e1/0x1a50
  ? __lock_acquire+0x2e1/0x1a50
  ? lock_acquire+0x277/0x3d0
  ? sock_def_readable+0x5/0x290
  ? lock_is_held_type+0xb4/0x120
  ? find_held_lock+0x2d/0x90
  ? sock_def_readable+0xb3/0x290
  ? lock_release+0x166/0x2a0
  ? lock_is_held_type+0x90/0x120
  rtnl_newlink+0x47/0x70
  rtnetlink_rcv_msg+0x25c/0x470
  ? netlink_deliver_tap+0x97/0x3e0
  ? validate_linkmsg+0x350/0x350
  netlink_rcv_skb+0x50/0x100
  netlink_unicast+0x1b2/0x280
  netlink_sendmsg+0x336/0x450
  sock_sendmsg+0x5b/0x60
  ____sys_sendmsg+0x1ed/0x250
  ? copy_msghdr_from_user+0x5c/0x90
  ___sys_sendmsg+0x88/0xd0
  ? lock_is_held_type+0xb4/0x120
  ? find_held_lock+0x2d/0x90
  ? lock_release+0x166/0x2a0
  ? __fget_files+0xfe/0x1d0
  ? __sys_sendmsg+0x5e/0xa0
  __sys_sendmsg+0x5e/0xa0
  ? lockdep_hardirqs_on_prepare+0xd9/0x170
  do_syscall_64+0x33/0x80
  entry_SYSCALL_64_after_hwframe+0x44/0xae
 RIP: 0033:0x7fc605c9572d
 Code: 28 89 54 24 1c 48 89 74 24 10 89 7c 24 08 e8 da ee ff ff 8b 54 24 1c 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 33 44 89 c7 48 89 44 24 08 e8 2e ef ff ff 48
 RSP: 002b:00007fffc83789f0 EFLAGS: 00000293 ORIG_RAX: 000000000000002e
 RAX: ffffffffffffffda RBX: 000055ef468570c0 RCX: 00007fc605c9572d
 RDX: 0000000000000000 RSI: 00007fffc8378a30 RDI: 000000000000000c
 RBP: 0000000000000010 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
 R13: 00007fffc8378b80 R14: 00007fffc8378b7c R15: 0000000000000000
 irq event stamp: 170785
 hardirqs last  enabled at (170783): [<ffffffff9609a8c2>] __local_bh_enable_ip+0x82/0xf0
 hardirqs last disabled at (170784): [<ffffffff96a8613d>] _raw_read_lock_irqsave+0x8d/0x90
 softirqs last  enabled at (170782): [<ffffffffc1272389>] iwl_pcie_enqueue_hcmd+0x5d9/0xa00 [iwlwifi]
 softirqs last disabled at (170785): [<ffffffffc1271ec6>] iwl_pcie_enqueue_hcmd+0x116/0xa00 [iwlwifi]

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM/Clang v12.0.0-rc3
Acked-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/nycvar.YFH.7.76.2103021125430.12405@cbobk.fhfr.pm
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
index 50133c09a780..133371385056 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
@@ -1181,6 +1181,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
 	u32 cmd_pos;
 	const u8 *cmddata[IWL_MAX_CMD_TBS_PER_TFD];
 	u16 cmdlen[IWL_MAX_CMD_TBS_PER_TFD];
+	unsigned long flags;
 
 	if (WARN(!trans->wide_cmd_header &&
 		 group_id > IWL_ALWAYS_LONG_GROUP,
@@ -1264,10 +1265,10 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
 		goto free_dup_buf;
 	}
 
-	spin_lock_bh(&txq->lock);
+	spin_lock_irqsave(&txq->lock, flags);
 
 	if (iwl_txq_space(trans, txq) < ((cmd->flags & CMD_ASYNC) ? 2 : 1)) {
-		spin_unlock_bh(&txq->lock);
+		spin_unlock_irqrestore(&txq->lock, flags);
 
 		IWL_ERR(trans, "No space in command queue\n");
 		iwl_op_mode_cmd_queue_full(trans->op_mode);
@@ -1427,7 +1428,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
  unlock_reg:
 	spin_unlock(&trans_pcie->reg_lock);
  out:
-	spin_unlock_bh(&txq->lock);
+	spin_unlock_irqrestore(&txq->lock, flags);
  free_dup_buf:
 	if (idx < 0)
 		kfree(dup_buf);
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 019/103] xfrm: BEET mode doesnt support fragments for inner packets
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 018/103] iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd() Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 020/103] ASoC: max98373: Changed amp shutdown register as volatile Greg Kroah-Hartman
                   ` (92 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Xiumei Mu, Xin Long,
	Steffen Klassert, Sasha Levin

From: Xin Long <lucien.xin@gmail.com>

[ Upstream commit 68dc022d04eb0fd60a540e242dcb11ec1bee07e2 ]

BEET mode replaces the IP(6) Headers with new IP(6) Headers when sending
packets. However, when it's a fragment before the replacement, currently
kernel keeps the fragment flag and replace the address field then encaps
it with ESP. It would cause in RX side the fragments to get reassembled
before decapping with ESP, which is incorrect.

In Xiumei's testing, these fragments went over an xfrm interface and got
encapped with ESP in the device driver, and the traffic was broken.

I don't have a good way to fix it, but only to warn this out in dmesg.

Reported-by: Xiumei Mu <xmu@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/xfrm/xfrm_output.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index b81ca117dac7..e4cb0ff4dcf4 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -660,6 +660,12 @@ static int xfrm4_extract_output(struct xfrm_state *x, struct sk_buff *skb)
 {
 	int err;
 
+	if (x->outer_mode.encap == XFRM_MODE_BEET &&
+	    ip_is_fragment(ip_hdr(skb))) {
+		net_warn_ratelimited("BEET mode doesn't support inner IPv4 fragments\n");
+		return -EAFNOSUPPORT;
+	}
+
 	err = xfrm4_tunnel_check_size(skb);
 	if (err)
 		return err;
@@ -705,8 +711,15 @@ out:
 static int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb)
 {
 #if IS_ENABLED(CONFIG_IPV6)
+	unsigned int ptr = 0;
 	int err;
 
+	if (x->outer_mode.encap == XFRM_MODE_BEET &&
+	    ipv6_find_hdr(skb, &ptr, NEXTHDR_FRAGMENT, NULL, NULL) >= 0) {
+		net_warn_ratelimited("BEET mode doesn't support inner IPv6 fragments\n");
+		return -EAFNOSUPPORT;
+	}
+
 	err = xfrm6_tunnel_check_size(skb);
 	if (err)
 		return err;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 020/103] ASoC: max98373: Changed amp shutdown register as volatile
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 019/103] xfrm: BEET mode doesnt support fragments for inner packets Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 021/103] ASoC: max98373: Added 30ms turn on/off time delay Greg Kroah-Hartman
                   ` (91 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ryan Lee, Mark Brown, Sasha Levin

From: Ryan Lee <ryans.lee@maximintegrated.com>

[ Upstream commit a23f9099ff1541f15704e96b784d3846d2a4483d ]

0x20FF(amp global enable) register was defined as non-volatile,
but it is not. Overheating, overcurrent can cause amp shutdown
in hardware.
'regmap_write' compare register readback value before writing
to avoid same value writing. 'regmap_read' just read cache
not actual hardware value for the non-volatile register.
When amp is internally shutdown by some reason, next 'AMP ON'
command can be ignored because regmap think amp is already ON.

Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Link: https://lore.kernel.org/r/20210325033555.29377-1-ryans.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/max98373-i2c.c | 1 +
 sound/soc/codecs/max98373-sdw.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sound/soc/codecs/max98373-i2c.c b/sound/soc/codecs/max98373-i2c.c
index 92921e34f948..32b0c1d98365 100644
--- a/sound/soc/codecs/max98373-i2c.c
+++ b/sound/soc/codecs/max98373-i2c.c
@@ -440,6 +440,7 @@ static bool max98373_volatile_reg(struct device *dev, unsigned int reg)
 	case MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK:
 	case MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK:
 	case MAX98373_R20B6_BDE_CUR_STATE_READBACK:
+	case MAX98373_R20FF_GLOBAL_SHDN:
 	case MAX98373_R21FF_REV_ID:
 		return true;
 	default:
diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c
index fa589d834f9a..14fd2f9a0bf3 100644
--- a/sound/soc/codecs/max98373-sdw.c
+++ b/sound/soc/codecs/max98373-sdw.c
@@ -214,6 +214,7 @@ static bool max98373_volatile_reg(struct device *dev, unsigned int reg)
 	case MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK:
 	case MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK:
 	case MAX98373_R20B6_BDE_CUR_STATE_READBACK:
+	case MAX98373_R20FF_GLOBAL_SHDN:
 	case MAX98373_R21FF_REV_ID:
 	/* SoundWire Control Port Registers */
 	case MAX98373_R0040_SCP_INIT_STAT_1 ... MAX98373_R0070_SCP_FRAME_CTLR:
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 021/103] ASoC: max98373: Added 30ms turn on/off time delay
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 020/103] ASoC: max98373: Changed amp shutdown register as volatile Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 022/103] gpu/xen: Fix a use after free in xen_drm_drv_init Greg Kroah-Hartman
                   ` (90 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ryan Lee, Mark Brown, Sasha Levin

From: Ryan Lee <ryans.lee@maximintegrated.com>

[ Upstream commit 3a27875e91fb9c29de436199d20b33f9413aea77 ]

Amp requires 10 ~ 30ms for the power ON and OFF.
Added 30ms delay for stability.

Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Link: https://lore.kernel.org/r/20210325033555.29377-2-ryans.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/max98373.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c
index 929bb1798c43..1fd4dbbb4ecf 100644
--- a/sound/soc/codecs/max98373.c
+++ b/sound/soc/codecs/max98373.c
@@ -28,11 +28,13 @@ static int max98373_dac_event(struct snd_soc_dapm_widget *w,
 		regmap_update_bits(max98373->regmap,
 			MAX98373_R20FF_GLOBAL_SHDN,
 			MAX98373_GLOBAL_EN_MASK, 1);
+		usleep_range(30000, 31000);
 		break;
 	case SND_SOC_DAPM_POST_PMD:
 		regmap_update_bits(max98373->regmap,
 			MAX98373_R20FF_GLOBAL_SHDN,
 			MAX98373_GLOBAL_EN_MASK, 0);
+		usleep_range(30000, 31000);
 		max98373->tdm_mode = false;
 		break;
 	default:
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 022/103] gpu/xen: Fix a use after free in xen_drm_drv_init
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 021/103] ASoC: max98373: Added 30ms turn on/off time delay Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 023/103] neighbour: Disregard DEAD dst in neigh_update Greg Kroah-Hartman
                   ` (89 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lv Yunlong, Oleksandr Andrushchenko,
	Sasha Levin

From: Lv Yunlong <lyl2019@mail.ustc.edu.cn>

[ Upstream commit 52762efa2b256ed1c5274e5177cbd52ee11a2f6a ]

In function displback_changed, has the call chain
displback_connect(front_info)->xen_drm_drv_init(front_info).
We can see that drm_info is assigned to front_info->drm_info
and drm_info is freed in fail branch in xen_drm_drv_init().

Later displback_disconnect(front_info) is called and it calls
xen_drm_drv_fini(front_info) cause a use after free by
drm_info = front_info->drm_info statement.

My patch has done two things. First fixes the fail label which
drm_info = kzalloc() failed and still free the drm_info.
Second sets front_info->drm_info to NULL to avoid uaf.

Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210323014656.10068-1-lyl2019@mail.ustc.edu.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/xen/xen_drm_front.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
index cc93a8c9547b..8ea91542b567 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.c
+++ b/drivers/gpu/drm/xen/xen_drm_front.c
@@ -531,7 +531,7 @@ static int xen_drm_drv_init(struct xen_drm_front_info *front_info)
 	drm_dev = drm_dev_alloc(&xen_drm_driver, dev);
 	if (IS_ERR(drm_dev)) {
 		ret = PTR_ERR(drm_dev);
-		goto fail;
+		goto fail_dev;
 	}
 
 	drm_info->drm_dev = drm_dev;
@@ -561,8 +561,10 @@ fail_modeset:
 	drm_kms_helper_poll_fini(drm_dev);
 	drm_mode_config_cleanup(drm_dev);
 	drm_dev_put(drm_dev);
-fail:
+fail_dev:
 	kfree(drm_info);
+	front_info->drm_info = NULL;
+fail:
 	return ret;
 }
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 023/103] neighbour: Disregard DEAD dst in neigh_update
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 022/103] gpu/xen: Fix a use after free in xen_drm_drv_init Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 024/103] ARM: keystone: fix integer overflow warning Greg Kroah-Hartman
                   ` (88 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tong Zhu, David S. Miller, Sasha Levin

From: Tong Zhu <zhutong@amazon.com>

[ Upstream commit d47ec7a0a7271dda08932d6208e4ab65ab0c987c ]

After a short network outage, the dst_entry is timed out and put
in DST_OBSOLETE_DEAD. We are in this code because arp reply comes
from this neighbour after network recovers. There is a potential
race condition that dst_entry is still in DST_OBSOLETE_DEAD.
With that, another neighbour lookup causes more harm than good.

In best case all packets in arp_queue are lost. This is
counterproductive to the original goal of finding a better path
for those packets.

I observed a worst case with 4.x kernel where a dst_entry in
DST_OBSOLETE_DEAD state is associated with loopback net_device.
It leads to an ethernet header with all zero addresses.
A packet with all zero source MAC address is quite deadly with
mac80211, ath9k and 802.11 block ack.  It fails
ieee80211_find_sta_by_ifaddr in ath9k (xmit.c). Ath9k flushes tx
queue (ath_tx_complete_aggr). BAW (block ack window) is not
updated. BAW logic is damaged and ath9k transmission is disabled.

Signed-off-by: Tong Zhu <zhutong@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/core/neighbour.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 2fe4bbb6b80c..8339978d46ff 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1380,7 +1380,7 @@ static int __neigh_update(struct neighbour *neigh, const u8 *lladdr,
 			 * we can reinject the packet there.
 			 */
 			n2 = NULL;
-			if (dst) {
+			if (dst && dst->obsolete != DST_OBSOLETE_DEAD) {
 				n2 = dst_neigh_lookup_skb(dst, skb);
 				if (n2)
 					n1 = n2;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 024/103] ARM: keystone: fix integer overflow warning
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 023/103] neighbour: Disregard DEAD dst in neigh_update Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 025/103] ARM: omap1: fix building with clang IAS Greg Kroah-Hartman
                   ` (87 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Nathan Chancellor,
	Santosh Shilimkar, Sasha Levin

From: Arnd Bergmann <arnd@arndb.de>

[ Upstream commit 844b85dda2f569943e1e018fdd63b6f7d1d6f08e ]

clang warns about an impossible condition when building with 32-bit
phys_addr_t:

arch/arm/mach-keystone/keystone.c:79:16: error: result of comparison of constant 51539607551 with expression of type 'phys_addr_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
            mem_end   > KEYSTONE_HIGH_PHYS_END) {
            ~~~~~~~   ^ ~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-keystone/keystone.c:78:16: error: result of comparison of constant 34359738368 with expression of type 'phys_addr_t' (aka 'unsigned int') is always true [-Werror,-Wtautological-constant-out-of-range-compare]
        if (mem_start < KEYSTONE_HIGH_PHYS_START ||
            ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Change the temporary variable to a fixed-size u64 to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Link: https://lore.kernel.org/r/20210323131814.2751750-1-arnd@kernel.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/mach-keystone/keystone.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
index 09a65c2dfd73..b8fa01f9516e 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -65,7 +65,7 @@ static void __init keystone_init(void)
 static long long __init keystone_pv_fixup(void)
 {
 	long long offset;
-	phys_addr_t mem_start, mem_end;
+	u64 mem_start, mem_end;
 
 	mem_start = memblock_start_of_DRAM();
 	mem_end = memblock_end_of_DRAM();
@@ -78,7 +78,7 @@ static long long __init keystone_pv_fixup(void)
 	if (mem_start < KEYSTONE_HIGH_PHYS_START ||
 	    mem_end   > KEYSTONE_HIGH_PHYS_END) {
 		pr_crit("Invalid address space for memory (%08llx-%08llx)\n",
-		        (u64)mem_start, (u64)mem_end);
+		        mem_start, mem_end);
 		return 0;
 	}
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 025/103] ARM: omap1: fix building with clang IAS
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 024/103] ARM: keystone: fix integer overflow warning Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 026/103] drm/msm: Fix a5xx/a6xx timestamps Greg Kroah-Hartman
                   ` (86 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Tony Lindgren, Sasha Levin

From: Arnd Bergmann <arnd@arndb.de>

[ Upstream commit 28399a5a6d569c9bdb612345e4933046ca37cde5 ]

The clang integrated assembler fails to build one file with
a complex asm instruction:

arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: error: invalid instruction, any one of the following would fix this:
 mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit
 ^
arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: note: instruction requires: armv6t2
 mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit
 ^
arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: note: instruction requires: thumb2
 mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit
 ^

The problem is that 'NR_IRQS_LEGACY' is not defined here. Apparently
gas does not care because we first add and then subtract this number,
leading to the immediate value to be the same regardless of the
specific definition of NR_IRQS_LEGACY.

Neither the way that 'gas' just silently builds this file, nor the
way that clang IAS makes nonsensical suggestions for how to fix it
is great. Fortunately there is an easy fix, which is to #include
the header that contains the definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20210308153430.2530616-1-arnd@kernel.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/mach-omap1/ams-delta-fiq-handler.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S
index 14a6c3eb3298..f745a65d3bd7 100644
--- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S
+++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S
@@ -15,6 +15,7 @@
 #include <linux/platform_data/gpio-omap.h>
 
 #include <asm/assembler.h>
+#include <asm/irq.h>
 
 #include "ams-delta-fiq.h"
 #include "board-ams-delta.h"
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 026/103] drm/msm: Fix a5xx/a6xx timestamps
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 025/103] ARM: omap1: fix building with clang IAS Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 027/103] ASoC: fsl_esai: Fix TDM slot setup for I2S mode Greg Kroah-Hartman
                   ` (85 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Rob Clark, Jordan Crouse, Sasha Levin

From: Rob Clark <robdclark@chromium.org>

[ Upstream commit 9fbd3088351b92e8c2cef6e37a39decb12a8d5bb ]

They were reading a counter that was configured to ALWAYS_COUNT (ie.
cycles that the GPU is doing something) rather than ALWAYS_ON.  This
isn't the thing that userspace is looking for.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Jordan Crouse <jordan@cosmicpenguin.net>
Message-Id: <20210325012358.1759770-2-robdclark@gmail.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 ++--
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index 5e11cdb207d8..0ca7e53db112 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -1240,8 +1240,8 @@ static int a5xx_pm_suspend(struct msm_gpu *gpu)
 
 static int a5xx_get_timestamp(struct msm_gpu *gpu, uint64_t *value)
 {
-	*value = gpu_read64(gpu, REG_A5XX_RBBM_PERFCTR_CP_0_LO,
-		REG_A5XX_RBBM_PERFCTR_CP_0_HI);
+	*value = gpu_read64(gpu, REG_A5XX_RBBM_ALWAYSON_COUNTER_LO,
+		REG_A5XX_RBBM_ALWAYSON_COUNTER_HI);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 83b50f6d6bb7..722c2fe3bfd5 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -1073,8 +1073,8 @@ static int a6xx_get_timestamp(struct msm_gpu *gpu, uint64_t *value)
 	/* Force the GPU power on so we can read this register */
 	a6xx_gmu_set_oob(&a6xx_gpu->gmu, GMU_OOB_PERFCOUNTER_SET);
 
-	*value = gpu_read64(gpu, REG_A6XX_RBBM_PERFCTR_CP_0_LO,
-		REG_A6XX_RBBM_PERFCTR_CP_0_HI);
+	*value = gpu_read64(gpu, REG_A6XX_CP_ALWAYS_ON_COUNTER_LO,
+		REG_A6XX_CP_ALWAYS_ON_COUNTER_HI);
 
 	a6xx_gmu_clear_oob(&a6xx_gpu->gmu, GMU_OOB_PERFCOUNTER_SET);
 	mutex_unlock(&perfcounter_oob);
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 027/103] ASoC: fsl_esai: Fix TDM slot setup for I2S mode
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 026/103] drm/msm: Fix a5xx/a6xx timestamps Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 028/103] scsi: scsi_transport_srp: Dont block target in SRP_PORT_LOST state Greg Kroah-Hartman
                   ` (84 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Shiyan, Nicolin Chen,
	Mark Brown, Sasha Levin

From: Alexander Shiyan <shc_work@mail.ru>

[ Upstream commit e7a48c710defa0e0fef54d42b7d9e4ab596e2761 ]

When using the driver in I2S TDM mode, the fsl_esai_startup()
function rewrites the number of slots previously set by the
fsl_esai_set_dai_tdm_slot() function to 2.
To fix this, let's use the saved slot count value or, if TDM
is not used and the number of slots is not set, the driver will use
the default value (2), which is set by fsl_esai_probe().

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20210402081405.9892-1-shc_work@mail.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/fsl/fsl_esai.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 39637ca78cdb..9f5f217a9607 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -524,11 +524,13 @@ static int fsl_esai_startup(struct snd_pcm_substream *substream,
 				   ESAI_SAICR_SYNC, esai_priv->synchronous ?
 				   ESAI_SAICR_SYNC : 0);
 
-		/* Set a default slot number -- 2 */
+		/* Set slots count */
 		regmap_update_bits(esai_priv->regmap, REG_ESAI_TCCR,
-				   ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(2));
+				   ESAI_xCCR_xDC_MASK,
+				   ESAI_xCCR_xDC(esai_priv->slots));
 		regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR,
-				   ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(2));
+				   ESAI_xCCR_xDC_MASK,
+				   ESAI_xCCR_xDC(esai_priv->slots));
 	}
 
 	return 0;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 028/103] scsi: scsi_transport_srp: Dont block target in SRP_PORT_LOST state
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 027/103] ASoC: fsl_esai: Fix TDM slot setup for I2S mode Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 029/103] iwlwifi: add support for Qu with AX201 device Greg Kroah-Hartman
                   ` (83 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bart Van Assche, Martin Wilck,
	Martin K. Petersen, Sasha Levin

From: Martin Wilck <mwilck@suse.com>

[ Upstream commit 5cd0f6f57639c5afbb36100c69281fee82c95ee7 ]

rport_dev_loss_timedout() sets the rport state to SRP_PORT_LOST and the
SCSI target state to SDEV_TRANSPORT_OFFLINE. If this races with
srp_reconnect_work(), a warning is printed:

Mar 27 18:48:07 ictm1604s01h4 kernel: dev_loss_tmo expired for SRP port-18:1 / host18.
Mar 27 18:48:07 ictm1604s01h4 kernel: ------------[ cut here ]------------
Mar 27 18:48:07 ictm1604s01h4 kernel: scsi_internal_device_block(18:0:0:100) failed: ret = -22
Mar 27 18:48:07 ictm1604s01h4 kernel: Call Trace:
Mar 27 18:48:07 ictm1604s01h4 kernel:  ? scsi_target_unblock+0x50/0x50 [scsi_mod]
Mar 27 18:48:07 ictm1604s01h4 kernel:  starget_for_each_device+0x80/0xb0 [scsi_mod]
Mar 27 18:48:07 ictm1604s01h4 kernel:  target_block+0x24/0x30 [scsi_mod]
Mar 27 18:48:07 ictm1604s01h4 kernel:  device_for_each_child+0x57/0x90
Mar 27 18:48:07 ictm1604s01h4 kernel:  srp_reconnect_rport+0xe4/0x230 [scsi_transport_srp]
Mar 27 18:48:07 ictm1604s01h4 kernel:  srp_reconnect_work+0x40/0xc0 [scsi_transport_srp]

Avoid this by not trying to block targets for rports in SRP_PORT_LOST
state.

Link: https://lore.kernel.org/r/20210401091105.8046-1-mwilck@suse.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/scsi_transport_srp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c
index 1e939a2a387f..98a34ed10f1a 100644
--- a/drivers/scsi/scsi_transport_srp.c
+++ b/drivers/scsi/scsi_transport_srp.c
@@ -541,7 +541,7 @@ int srp_reconnect_rport(struct srp_rport *rport)
 	res = mutex_lock_interruptible(&rport->mutex);
 	if (res)
 		goto out;
-	if (rport->state != SRP_RPORT_FAIL_FAST)
+	if (rport->state != SRP_RPORT_FAIL_FAST && rport->state != SRP_RPORT_LOST)
 		/*
 		 * sdev state must be SDEV_TRANSPORT_OFFLINE, transition
 		 * to SDEV_BLOCK is illegal. Calling scsi_target_unblock()
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 029/103] iwlwifi: add support for Qu with AX201 device
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 028/103] scsi: scsi_transport_srp: Dont block target in SRP_PORT_LOST state Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 030/103] net: ieee802154: stop dump llsec keys for monitors Greg Kroah-Hartman
                   ` (82 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Matt Chen, Luca Coelho, Kalle Valo,
	Sasha Levin

From: Matt Chen <matt.chen@intel.com>

[ Upstream commit 97195d3cad852063208a1cd4f4d073459547a415 ]

Add this specific Samsung AX201 sku to driver so it can be
detected and initialized successfully.

Signed-off-by: Matt Chen <matt.chen@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210326125611.30b622037714.Id9fd709cf1c8261c097bbfd7453f6476077dcafc@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index fa32f9045c0c..500fdb0b6c42 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -684,6 +684,7 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
 	IWL_DEV_INFO(0x4DF0, 0x1652, killer1650i_2ax_cfg_qu_b0_hr_b0, NULL),
 	IWL_DEV_INFO(0x4DF0, 0x2074, iwl_ax201_cfg_qu_hr, NULL),
 	IWL_DEV_INFO(0x4DF0, 0x4070, iwl_ax201_cfg_qu_hr, NULL),
+	IWL_DEV_INFO(0x4DF0, 0x6074, iwl_ax201_cfg_qu_hr, NULL),
 
 	_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
 		      IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 030/103] net: ieee802154: stop dump llsec keys for monitors
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 029/103] iwlwifi: add support for Qu with AX201 device Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 031/103] net: ieee802154: forbid monitor for add llsec key Greg Kroah-Hartman
                   ` (81 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit fb3c5cdf88cd504ef11d59e8d656f4bc896c6922 ]

This patch stops dumping llsec keys for monitors which we don't support
yet. Otherwise we will access llsec mib which isn't initialized for
monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-4-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index d1b6a9665b17..a7cb28a78c6f 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1498,6 +1498,11 @@ nl802154_dump_llsec_key(struct sk_buff *skb, struct netlink_callback *cb)
 	if (err)
 		return err;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) {
+		err = skb->len;
+		goto out_err;
+	}
+
 	if (!wpan_dev->netdev) {
 		err = -EINVAL;
 		goto out_err;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 031/103] net: ieee802154: forbid monitor for add llsec key
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 030/103] net: ieee802154: stop dump llsec keys for monitors Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 032/103] net: ieee802154: forbid monitor for del " Greg Kroah-Hartman
                   ` (80 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit 08470c5453339369bd3d590c4cbb0b5961cdcbb6 ]

This patch forbids to add llsec key for monitor interfaces which we
don't support yet. Otherwise we will access llsec mib which isn't
initialized for monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-5-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index a7cb28a78c6f..6036516ddb9e 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1557,6 +1557,9 @@ static int nl802154_add_llsec_key(struct sk_buff *skb, struct genl_info *info)
 	struct ieee802154_llsec_key_id id = { };
 	u32 commands[NL802154_CMD_FRAME_NR_IDS / 32] = { };
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR)
+		return -EOPNOTSUPP;
+
 	if (!info->attrs[NL802154_ATTR_SEC_KEY] ||
 	    nla_parse_nested_deprecated(attrs, NL802154_KEY_ATTR_MAX, info->attrs[NL802154_ATTR_SEC_KEY], nl802154_key_policy, info->extack))
 		return -EINVAL;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 032/103] net: ieee802154: forbid monitor for del llsec key
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 031/103] net: ieee802154: forbid monitor for add llsec key Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 033/103] net: ieee802154: stop dump llsec devs for monitors Greg Kroah-Hartman
                   ` (79 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit b6e2949544a183f590ae6f3ef2d1aaaa2c44e38a ]

This patch forbids to del llsec key for monitor interfaces which we
don't support yet. Otherwise we will access llsec mib which isn't
initialized for monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-6-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 6036516ddb9e..47c57347ab7f 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1609,6 +1609,9 @@ static int nl802154_del_llsec_key(struct sk_buff *skb, struct genl_info *info)
 	struct nlattr *attrs[NL802154_KEY_ATTR_MAX + 1];
 	struct ieee802154_llsec_key_id id;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR)
+		return -EOPNOTSUPP;
+
 	if (!info->attrs[NL802154_ATTR_SEC_KEY] ||
 	    nla_parse_nested_deprecated(attrs, NL802154_KEY_ATTR_MAX, info->attrs[NL802154_ATTR_SEC_KEY], nl802154_key_policy, info->extack))
 		return -EINVAL;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 033/103] net: ieee802154: stop dump llsec devs for monitors
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 032/103] net: ieee802154: forbid monitor for del " Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 034/103] net: ieee802154: forbid monitor for add llsec dev Greg Kroah-Hartman
                   ` (78 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit 5582d641e6740839c9b83efd1fbf9bcd00b6f5fc ]

This patch stops dumping llsec devs for monitors which we don't support
yet. Otherwise we will access llsec mib which isn't initialized for
monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-7-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 47c57347ab7f..8a9019aa00c3 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1677,6 +1677,11 @@ nl802154_dump_llsec_dev(struct sk_buff *skb, struct netlink_callback *cb)
 	if (err)
 		return err;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) {
+		err = skb->len;
+		goto out_err;
+	}
+
 	if (!wpan_dev->netdev) {
 		err = -EINVAL;
 		goto out_err;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 034/103] net: ieee802154: forbid monitor for add llsec dev
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 033/103] net: ieee802154: stop dump llsec devs for monitors Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 035/103] net: ieee802154: forbid monitor for del " Greg Kroah-Hartman
                   ` (77 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit 5303f956b05a2886ff42890908156afaec0f95ac ]

This patch forbids to add llsec dev for monitor interfaces which we
don't support yet. Otherwise we will access llsec mib which isn't
initialized for monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-8-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 8a9019aa00c3..c8576dc0686d 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1768,6 +1768,9 @@ static int nl802154_add_llsec_dev(struct sk_buff *skb, struct genl_info *info)
 	struct wpan_dev *wpan_dev = dev->ieee802154_ptr;
 	struct ieee802154_llsec_device dev_desc;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR)
+		return -EOPNOTSUPP;
+
 	if (ieee802154_llsec_parse_device(info->attrs[NL802154_ATTR_SEC_DEVICE],
 					  &dev_desc) < 0)
 		return -EINVAL;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 035/103] net: ieee802154: forbid monitor for del llsec dev
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 034/103] net: ieee802154: forbid monitor for add llsec dev Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 036/103] net: ieee802154: stop dump llsec devkeys for monitors Greg Kroah-Hartman
                   ` (76 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit ad8f9de1f3566686af35b1c6b43240726541da61 ]

This patch forbids to del llsec dev for monitor interfaces which we
don't support yet. Otherwise we will access llsec mib which isn't
initialized for monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-9-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index c8576dc0686d..da4bd6bc4567 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1786,6 +1786,9 @@ static int nl802154_del_llsec_dev(struct sk_buff *skb, struct genl_info *info)
 	struct nlattr *attrs[NL802154_DEV_ATTR_MAX + 1];
 	__le64 extended_addr;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR)
+		return -EOPNOTSUPP;
+
 	if (!info->attrs[NL802154_ATTR_SEC_DEVICE] ||
 	    nla_parse_nested_deprecated(attrs, NL802154_DEV_ATTR_MAX, info->attrs[NL802154_ATTR_SEC_DEVICE], nl802154_dev_policy, info->extack))
 		return -EINVAL;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 036/103] net: ieee802154: stop dump llsec devkeys for monitors
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 035/103] net: ieee802154: forbid monitor for del " Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 037/103] net: ieee802154: forbid monitor for add llsec devkey Greg Kroah-Hartman
                   ` (75 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit 080d1a57a94d93e70f84b7a360baa351388c574f ]

This patch stops dumping llsec devkeys for monitors which we don't support
yet. Otherwise we will access llsec mib which isn't initialized for
monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-10-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index da4bd6bc4567..40022e137094 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1858,6 +1858,11 @@ nl802154_dump_llsec_devkey(struct sk_buff *skb, struct netlink_callback *cb)
 	if (err)
 		return err;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) {
+		err = skb->len;
+		goto out_err;
+	}
+
 	if (!wpan_dev->netdev) {
 		err = -EINVAL;
 		goto out_err;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 037/103] net: ieee802154: forbid monitor for add llsec devkey
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 036/103] net: ieee802154: stop dump llsec devkeys for monitors Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 038/103] net: ieee802154: forbid monitor for del " Greg Kroah-Hartman
                   ` (74 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit a347b3b394868fef15b16f143719df56184be81d ]

This patch forbids to add llsec devkey for monitor interfaces which we
don't support yet. Otherwise we will access llsec mib which isn't
initialized for monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-11-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 40022e137094..023c1e75daf9 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1920,6 +1920,9 @@ static int nl802154_add_llsec_devkey(struct sk_buff *skb, struct genl_info *info
 	struct ieee802154_llsec_device_key key;
 	__le64 extended_addr;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR)
+		return -EOPNOTSUPP;
+
 	if (!info->attrs[NL802154_ATTR_SEC_DEVKEY] ||
 	    nla_parse_nested_deprecated(attrs, NL802154_DEVKEY_ATTR_MAX, info->attrs[NL802154_ATTR_SEC_DEVKEY], nl802154_devkey_policy, info->extack) < 0)
 		return -EINVAL;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 038/103] net: ieee802154: forbid monitor for del llsec devkey
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 037/103] net: ieee802154: forbid monitor for add llsec devkey Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 039/103] net: ieee802154: stop dump llsec seclevels for monitors Greg Kroah-Hartman
                   ` (73 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit 6fb8045319ef172dc88a8142e7f8b58c7608137e ]

This patch forbids to del llsec devkey for monitor interfaces which we
don't support yet. Otherwise we will access llsec mib which isn't
initialized for monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-12-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 023c1e75daf9..87dac717d197 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1954,6 +1954,9 @@ static int nl802154_del_llsec_devkey(struct sk_buff *skb, struct genl_info *info
 	struct ieee802154_llsec_device_key key;
 	__le64 extended_addr;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR)
+		return -EOPNOTSUPP;
+
 	if (!info->attrs[NL802154_ATTR_SEC_DEVKEY] ||
 	    nla_parse_nested_deprecated(attrs, NL802154_DEVKEY_ATTR_MAX, info->attrs[NL802154_ATTR_SEC_DEVKEY], nl802154_devkey_policy, info->extack))
 		return -EINVAL;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 039/103] net: ieee802154: stop dump llsec seclevels for monitors
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 038/103] net: ieee802154: forbid monitor for del " Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 040/103] net: ieee802154: forbid monitor for add llsec seclevel Greg Kroah-Hartman
                   ` (72 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit 4c9b4f55ad1f5a4b6206ac4ea58f273126d21925 ]

This patch stops dumping llsec seclevels for monitors which we don't
support yet. Otherwise we will access llsec mib which isn't initialized
for monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-13-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 87dac717d197..10fc37e45e2b 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -2031,6 +2031,11 @@ nl802154_dump_llsec_seclevel(struct sk_buff *skb, struct netlink_callback *cb)
 	if (err)
 		return err;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) {
+		err = skb->len;
+		goto out_err;
+	}
+
 	if (!wpan_dev->netdev) {
 		err = -EINVAL;
 		goto out_err;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 040/103] net: ieee802154: forbid monitor for add llsec seclevel
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 039/103] net: ieee802154: stop dump llsec seclevels for monitors Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 041/103] pcnet32: Use pci_resource_len to validate PCI resource Greg Kroah-Hartman
                   ` (71 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Aring, Stefan Schmidt, Sasha Levin

From: Alexander Aring <aahringo@redhat.com>

[ Upstream commit 9ec87e322428d4734ac647d1a8e507434086993d ]

This patch forbids to add llsec seclevel for monitor interfaces which we
don't support yet. Otherwise we will access llsec mib which isn't
initialized for monitors.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210405003054.256017-14-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/nl802154.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 10fc37e45e2b..f0b47d43c9f6 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -2120,6 +2120,9 @@ static int nl802154_add_llsec_seclevel(struct sk_buff *skb,
 	struct wpan_dev *wpan_dev = dev->ieee802154_ptr;
 	struct ieee802154_llsec_seclevel sl;
 
+	if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR)
+		return -EOPNOTSUPP;
+
 	if (llsec_parse_seclevel(info->attrs[NL802154_ATTR_SEC_LEVEL],
 				 &sl) < 0)
 		return -EINVAL;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 041/103] pcnet32: Use pci_resource_len to validate PCI resource
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 040/103] net: ieee802154: forbid monitor for add llsec seclevel Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 042/103] net/rds: Avoid potential use after free in rds_send_remove_from_sock Greg Kroah-Hartman
                   ` (70 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Guenter Roeck, David S. Miller, Sasha Levin

From: Guenter Roeck <linux@roeck-us.net>

[ Upstream commit 66c3f05ddc538ee796321210c906b6ae6fc0792a ]

pci_resource_start() is not a good indicator to determine if a PCI
resource exists or not, since the resource may start at address 0.
This is seen when trying to instantiate the driver in qemu for riscv32
or riscv64.

pci 0000:00:01.0: reg 0x10: [io  0x0000-0x001f]
pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x0000001f]
...
pcnet32: card has no PCI IO resources, aborting

Use pci_resouce_len() instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/amd/pcnet32.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index 187b0b9a6e1d..f78daba60b35 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -1534,8 +1534,7 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent)
 	}
 	pci_set_master(pdev);
 
-	ioaddr = pci_resource_start(pdev, 0);
-	if (!ioaddr) {
+	if (!pci_resource_len(pdev, 0)) {
 		if (pcnet32_debug & NETIF_MSG_PROBE)
 			pr_err("card has no PCI IO resources, aborting\n");
 		err = -ENODEV;
@@ -1548,6 +1547,8 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent)
 			pr_err("architecture does not support 32bit PCI busmaster DMA\n");
 		goto err_disable_dev;
 	}
+
+	ioaddr = pci_resource_start(pdev, 0);
 	if (!request_region(ioaddr, PCNET32_TOTAL_SIZE, "pcnet32_probe_pci")) {
 		if (pcnet32_debug & NETIF_MSG_PROBE)
 			pr_err("io address range already allocated\n");
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 042/103] net/rds: Avoid potential use after free in rds_send_remove_from_sock
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 041/103] pcnet32: Use pci_resource_len to validate PCI resource Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 21:29   ` Pavel Machek
  2021-04-20  7:13   ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 043/103] net: tipc: Fix spelling errors in net/tipc module Greg Kroah-Hartman
                   ` (69 subsequent siblings)
  111 siblings, 2 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Aditya Pakki, Santosh Shilimkar,
	David S. Miller, Sasha Levin

From: Aditya Pakki <pakki001@umn.edu>

[ Upstream commit 0c85a7e87465f2d4cbc768e245f4f45b2f299b05 ]

In case of rs failure in rds_send_remove_from_sock(), the 'rm' resource
is freed and later under spinlock, causing potential use-after-free.
Set the free pointer to NULL to avoid undefined behavior.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/rds/message.c | 1 +
 net/rds/send.c    | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/rds/message.c b/net/rds/message.c
index 799034e0f513..4fc66ff0f1ec 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -180,6 +180,7 @@ void rds_message_put(struct rds_message *rm)
 		rds_message_purge(rm);
 
 		kfree(rm);
+		rm = NULL;
 	}
 }
 EXPORT_SYMBOL_GPL(rds_message_put);
diff --git a/net/rds/send.c b/net/rds/send.c
index 985d0b7713ac..fe5264b9d4b3 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -665,7 +665,7 @@ static void rds_send_remove_from_sock(struct list_head *messages, int status)
 unlock_and_drop:
 		spin_unlock_irqrestore(&rm->m_rs_lock, flags);
 		rds_message_put(rm);
-		if (was_on_sock)
+		if (was_on_sock && rm)
 			rds_message_put(rm);
 	}
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 043/103] net: tipc: Fix spelling errors in net/tipc module
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 042/103] net/rds: Avoid potential use after free in rds_send_remove_from_sock Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 21:32   ` Pavel Machek
  2021-04-19 13:05 ` [PATCH 5.10 044/103] mac80211: clear sta->fast_rx when STA removed from 4-addr VLAN Greg Kroah-Hartman
                   ` (68 subsequent siblings)
  111 siblings, 1 reply; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hulk Robot, Zheng Yongjun,
	David S. Miller, Sasha Levin

From: Zheng Yongjun <zhengyongjun3@huawei.com>

[ Upstream commit a79ace4b312953c5835fafb12adc3cb6878b26bd ]

These patches fix a series of spelling errors in net/tipc module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/tipc/bearer.h | 6 +++---
 net/tipc/net.c    | 2 +-
 net/tipc/node.c   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
index bc0023119da2..9700c7df1b7f 100644
--- a/net/tipc/bearer.h
+++ b/net/tipc/bearer.h
@@ -150,9 +150,9 @@ struct tipc_media {
  * care of initializing all other fields.
  */
 struct tipc_bearer {
-	void __rcu *media_ptr;			/* initalized by media */
-	u32 mtu;				/* initalized by media */
-	struct tipc_media_addr addr;		/* initalized by media */
+	void __rcu *media_ptr;			/* initialized by media */
+	u32 mtu;				/* initialized by media */
+	struct tipc_media_addr addr;		/* initialized by media */
 	char name[TIPC_MAX_BEARER_NAME];
 	struct tipc_media *media;
 	struct tipc_media_addr bcast_addr;
diff --git a/net/tipc/net.c b/net/tipc/net.c
index 0bb2323201da..04ba69a0768b 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -89,7 +89,7 @@
  *     - A spin lock to protect the registry of kernel/driver users (reg.c)
  *     - A global spin_lock (tipc_port_lock), which only task is to ensure
  *       consistency where more than one port is involved in an operation,
- *       i.e., whe a port is part of a linked list of ports.
+ *       i.e., when a port is part of a linked list of ports.
  *       There are two such lists; 'port_list', which is used for management,
  *       and 'wait_list', which is used to queue ports during congestion.
  *
diff --git a/net/tipc/node.c b/net/tipc/node.c
index e4452d55851f..10b6fa7e558e 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1711,7 +1711,7 @@ int tipc_node_xmit(struct net *net, struct sk_buff_head *list,
 }
 
 /* tipc_node_xmit_skb(): send single buffer to destination
- * Buffers sent via this functon are generally TIPC_SYSTEM_IMPORTANCE
+ * Buffers sent via this function are generally TIPC_SYSTEM_IMPORTANCE
  * messages, which will not be rejected
  * The only exception is datagram messages rerouted after secondary
  * lookup, which are rare and safe to dispose of anyway.
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 044/103] mac80211: clear sta->fast_rx when STA removed from 4-addr VLAN
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 043/103] net: tipc: Fix spelling errors in net/tipc module Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 045/103] virt_wifi: Return micros for BSS TSF values Greg Kroah-Hartman
                   ` (67 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Seevalamuthu Mariappan,
	Johannes Berg, Sasha Levin

From: Seevalamuthu Mariappan <seevalam@codeaurora.org>

[ Upstream commit dd0b45538146cb6a54d6da7663b8c3afd16ebcfd ]

In some race conditions, with more clients and traffic configuration,
below crash is seen when making the interface down. sta->fast_rx wasn't
cleared when STA gets removed from 4-addr AP_VLAN interface. The crash is
due to try accessing 4-addr AP_VLAN interface's net_device (fast_rx->dev)
which has been deleted already.

Resolve this by clearing sta->fast_rx pointer when STA removes
from a 4-addr VLAN.

[  239.449529] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[  239.449531] pgd = 80204000
...
[  239.481496] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.60 #227
[  239.481591] Hardware name: Generic DT based system
[  239.487665] task: be05b700 ti: be08e000 task.ti: be08e000
[  239.492360] PC is at get_rps_cpu+0x2d4/0x31c
[  239.497823] LR is at 0xbe08fc54
...
[  239.778574] [<80739740>] (get_rps_cpu) from [<8073cb10>] (netif_receive_skb_internal+0x8c/0xac)
[  239.786722] [<8073cb10>] (netif_receive_skb_internal) from [<8073d578>] (napi_gro_receive+0x48/0xc4)
[  239.795267] [<8073d578>] (napi_gro_receive) from [<c7b83e8c>] (ieee80211_mark_rx_ba_filtered_frames+0xbcc/0x12d4 [mac80211])
[  239.804776] [<c7b83e8c>] (ieee80211_mark_rx_ba_filtered_frames [mac80211]) from [<c7b84d4c>] (ieee80211_rx_napi+0x7b8/0x8c8 [mac8
            0211])
[  239.815857] [<c7b84d4c>] (ieee80211_rx_napi [mac80211]) from [<c7f63d7c>] (ath11k_dp_process_rx+0x7bc/0x8c8 [ath11k])
[  239.827757] [<c7f63d7c>] (ath11k_dp_process_rx [ath11k]) from [<c7f5b6c4>] (ath11k_dp_service_srng+0x2c0/0x2e0 [ath11k])
[  239.838484] [<c7f5b6c4>] (ath11k_dp_service_srng [ath11k]) from [<7f55b7dc>] (ath11k_ahb_ext_grp_napi_poll+0x20/0x84 [ath11k_ahb]
            )
[  239.849419] [<7f55b7dc>] (ath11k_ahb_ext_grp_napi_poll [ath11k_ahb]) from [<8073ce1c>] (net_rx_action+0xe0/0x28c)
[  239.860945] [<8073ce1c>] (net_rx_action) from [<80324868>] (__do_softirq+0xe4/0x228)
[  239.871269] [<80324868>] (__do_softirq) from [<80324c48>] (irq_exit+0x98/0x108)
[  239.879080] [<80324c48>] (irq_exit) from [<8035c59c>] (__handle_domain_irq+0x90/0xb4)
[  239.886114] [<8035c59c>] (__handle_domain_irq) from [<8030137c>] (gic_handle_irq+0x50/0x94)
[  239.894100] [<8030137c>] (gic_handle_irq) from [<803024c0>] (__irq_svc+0x40/0x74)

Signed-off-by: Seevalamuthu Mariappan <seevalam@codeaurora.org>
Link: https://lore.kernel.org/r/1616163532-3881-1-git-send-email-seevalam@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/mac80211/cfg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 2bf6271d9e3f..6a96deded763 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1789,8 +1789,10 @@ static int ieee80211_change_station(struct wiphy *wiphy,
 		}
 
 		if (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
-		    sta->sdata->u.vlan.sta)
+		    sta->sdata->u.vlan.sta) {
+			ieee80211_clear_fast_rx(sta);
 			RCU_INIT_POINTER(sta->sdata->u.vlan.sta, NULL);
+		}
 
 		if (test_sta_flag(sta, WLAN_STA_AUTHORIZED))
 			ieee80211_vif_dec_num_mcast(sta->sdata);
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 045/103] virt_wifi: Return micros for BSS TSF values
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 044/103] mac80211: clear sta->fast_rx when STA removed from 4-addr VLAN Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 046/103] lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS Greg Kroah-Hartman
                   ` (66 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, A. Cody Schuffelen, Johannes Berg,
	Sasha Levin

From: A. Cody Schuffelen <schuffelen@google.com>

[ Upstream commit b57aa17f07c9270e576ef7df09f142978b5a75f0 ]

cfg80211_inform_bss expects to receive a TSF value, but is given the
time since boot in nanoseconds. TSF values are expected to be at
microsecond scale rather than nanosecond scale.

Signed-off-by: A. Cody Schuffelen <schuffelen@google.com>
Link: https://lore.kernel.org/r/20210318200419.1421034-1-schuffelen@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/virt_wifi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/virt_wifi.c b/drivers/net/wireless/virt_wifi.c
index c878097f0dda..1df959532c7d 100644
--- a/drivers/net/wireless/virt_wifi.c
+++ b/drivers/net/wireless/virt_wifi.c
@@ -12,6 +12,7 @@
 #include <net/cfg80211.h>
 #include <net/rtnetlink.h>
 #include <linux/etherdevice.h>
+#include <linux/math64.h>
 #include <linux/module.h>
 
 static struct wiphy *common_wiphy;
@@ -168,11 +169,11 @@ static void virt_wifi_scan_result(struct work_struct *work)
 			     scan_result.work);
 	struct wiphy *wiphy = priv_to_wiphy(priv);
 	struct cfg80211_scan_info scan_info = { .aborted = false };
+	u64 tsf = div_u64(ktime_get_boottime_ns(), 1000);
 
 	informed_bss = cfg80211_inform_bss(wiphy, &channel_5ghz,
 					   CFG80211_BSS_FTYPE_PRESP,
-					   fake_router_bssid,
-					   ktime_get_boottime_ns(),
+					   fake_router_bssid, tsf,
 					   WLAN_CAPABILITY_ESS, 0,
 					   (void *)&ssid, sizeof(ssid),
 					   DBM_TO_MBM(-50), GFP_KERNEL);
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 046/103] lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 045/103] virt_wifi: Return micros for BSS TSF values Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 047/103] Input: s6sy761 - fix coordinate read bit shift Greg Kroah-Hartman
                   ` (65 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Julian Braha, Andreas Schwab,
	Geert Uytterhoeven, Necip Fazil Yildiran, Andrew Morton,
	Linus Torvalds, Sasha Levin

From: Julian Braha <julianbraha@gmail.com>

[ Upstream commit 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 ]

When LATENCYTOP, LOCKDEP, or FAULT_INJECTION_STACKTRACE_FILTER is
enabled and ARCH_WANT_FRAME_POINTERS is disabled, Kbuild gives a warning
such as:

  WARNING: unmet direct dependencies detected for FRAME_POINTER
    Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS [=n] || MCOUNT [=n]
    Selected by [y]:
    - LATENCYTOP [=y] && DEBUG_KERNEL [=y] && STACKTRACE_SUPPORT [=y] && PROC_FS [=y] && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86

Depending on ARCH_WANT_FRAME_POINTERS causes a recursive dependency
error.  ARCH_WANT_FRAME_POINTERS is to be selected by the architecture,
and is not supposed to be overridden by other config options.

Link: https://lkml.kernel.org/r/20210329165329.27994-1-julianbraha@gmail.com
Signed-off-by: Julian Braha <julianbraha@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Necip Fazil Yildiran <fazilyildiran@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 lib/Kconfig.debug | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c789b39ed527..dcf4a9028e16 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1302,7 +1302,7 @@ config LOCKDEP
 	bool
 	depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
 	select STACKTRACE
-	select FRAME_POINTER if !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86
+	depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86
 	select KALLSYMS
 	select KALLSYMS_ALL
 
@@ -1596,7 +1596,7 @@ config LATENCYTOP
 	depends on DEBUG_KERNEL
 	depends on STACKTRACE_SUPPORT
 	depends on PROC_FS
-	select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
+	depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86
 	select KALLSYMS
 	select KALLSYMS_ALL
 	select STACKTRACE
@@ -1849,7 +1849,7 @@ config FAULT_INJECTION_STACKTRACE_FILTER
 	depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
 	depends on !X86_64
 	select STACKTRACE
-	select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
+	depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86
 	help
 	  Provide stacktrace filter for fault-injection capabilities
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 047/103] Input: s6sy761 - fix coordinate read bit shift
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 046/103] lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:05 ` [PATCH 5.10 048/103] Input: i8042 - fix Pegatron C15B ID entry Greg Kroah-Hartman
                   ` (64 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Caleb Connolly, Andi Shyti, Dmitry Torokhov

From: Caleb Connolly <caleb@connolly.tech>

commit 30b3f68715595dee7fe4d9bd91a2252c3becdf0a upstream.

The touch coordinate register contains the following:

        byte 3             byte 2             byte 1
+--------+--------+ +-----------------+ +-----------------+
|        |        | |                 | |                 |
| X[3:0] | Y[3:0] | |     Y[11:4]     | |     X[11:4]     |
|        |        | |                 | |                 |
+--------+--------+ +-----------------+ +-----------------+

Bytes 2 and 1 need to be shifted left by 4 bits, the least significant
nibble of each is stored in byte 3. Currently they are only
being shifted by 3 causing the reported coordinates to be incorrect.

This matches downstream examples, and has been confirmed on my
device (OnePlus 7 Pro).

Fixes: 0145a7141e59 ("Input: add support for the Samsung S6SY761 touchscreen")
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
Reviewed-by: Andi Shyti <andi@etezian.org>
Link: https://lore.kernel.org/r/20210305185710.225168-1-caleb@connolly.tech
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/input/touchscreen/s6sy761.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/input/touchscreen/s6sy761.c
+++ b/drivers/input/touchscreen/s6sy761.c
@@ -145,8 +145,8 @@ static void s6sy761_report_coordinates(s
 	u8 major = event[4];
 	u8 minor = event[5];
 	u8 z = event[6] & S6SY761_MASK_Z;
-	u16 x = (event[1] << 3) | ((event[3] & S6SY761_MASK_X) >> 4);
-	u16 y = (event[2] << 3) | (event[3] & S6SY761_MASK_Y);
+	u16 x = (event[1] << 4) | ((event[3] & S6SY761_MASK_X) >> 4);
+	u16 y = (event[2] << 4) | (event[3] & S6SY761_MASK_Y);
 
 	input_mt_slot(sdata->input, tid);
 



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 048/103] Input: i8042 - fix Pegatron C15B ID entry
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 047/103] Input: s6sy761 - fix coordinate read bit shift Greg Kroah-Hartman
@ 2021-04-19 13:05 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 049/103] HID: wacom: set EV_KEY and EV_ABS only for non-HID_GENERIC type of devices Greg Kroah-Hartman
                   ` (63 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Hans de Goede,
	Marcos Paulo de Souza, Dmitry Torokhov

From: Arnd Bergmann <arnd@arndb.de>

commit daa58c8eec0a65ac8e2e77ff3ea8a233d8eec954 upstream.

The Zenbook Flip entry that was added overwrites a previous one
because of a typo:

In file included from drivers/input/serio/i8042.h:23,
                 from drivers/input/serio/i8042.c:131:
drivers/input/serio/i8042-x86ia64io.h:591:28: error: initialized field overwritten [-Werror=override-init]
  591 |                 .matches = {
      |                            ^
drivers/input/serio/i8042-x86ia64io.h:591:28: note: (near initialization for 'i8042_dmi_noselftest_table[0].matches')

Add the missing separator between the two.

Fixes: b5d6e7ab7fe7 ("Input: i8042 - add ASUS Zenbook Flip to noselftest list")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Link: https://lore.kernel.org/r/20210323130623.2302402-1-arnd@kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/input/serio/i8042-x86ia64io.h |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -588,6 +588,7 @@ static const struct dmi_system_id i8042_
 			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
 			DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */
 		},
+	}, {
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
 			DMI_MATCH(DMI_CHASSIS_TYPE, "31"), /* Convertible Notebook */



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 049/103] HID: wacom: set EV_KEY and EV_ABS only for non-HID_GENERIC type of devices
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2021-04-19 13:05 ` [PATCH 5.10 048/103] Input: i8042 - fix Pegatron C15B ID entry Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 050/103] dm verity fec: fix misaligned RS roots IO Greg Kroah-Hartman
                   ` (62 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ping Cheng, Jason Gerecke,
	Juan Garrido, Jiri Kosina

From: Ping Cheng <pinglinux@gmail.com>

commit 276559d8d02c2709281578976ca2f53bc62063d4 upstream.

Valid HID_GENERIC type of devices set EV_KEY and EV_ABS by wacom_map_usage.
When *_input_capabilities are reached, those devices should already have
their proper EV_* set. EV_KEY and EV_ABS only need to be set for
non-HID_GENERIC type of devices in *_input_capabilities.

Devices that don't support HID descitoprs will pass back to hid-input for
registration without being accidentally rejected by the introduction of
patch: "Input: refuse to register absolute devices without absinfo"

Fixes: 6ecfe51b4082 ("Input: refuse to register absolute devices without absinfo")
Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Jason Gerecke <Jason.Gerecke@wacom.com>
Tested-by: Juan Garrido <Juan.Garrido@wacom.com>
CC: stable@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/hid/wacom_wac.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -3574,8 +3574,6 @@ int wacom_setup_pen_input_capabilities(s
 {
 	struct wacom_features *features = &wacom_wac->features;
 
-	input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
-
 	if (!(features->device_type & WACOM_DEVICETYPE_PEN))
 		return -ENODEV;
 
@@ -3590,6 +3588,7 @@ int wacom_setup_pen_input_capabilities(s
 		return 0;
 	}
 
+	input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
 	__set_bit(BTN_TOUCH, input_dev->keybit);
 	__set_bit(ABS_MISC, input_dev->absbit);
 
@@ -3742,8 +3741,6 @@ int wacom_setup_touch_input_capabilities
 {
 	struct wacom_features *features = &wacom_wac->features;
 
-	input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
-
 	if (!(features->device_type & WACOM_DEVICETYPE_TOUCH))
 		return -ENODEV;
 
@@ -3756,6 +3753,7 @@ int wacom_setup_touch_input_capabilities
 		/* setup has already been done */
 		return 0;
 
+	input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
 	__set_bit(BTN_TOUCH, input_dev->keybit);
 
 	if (features->touch_max == 1) {



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 050/103] dm verity fec: fix misaligned RS roots IO
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 049/103] HID: wacom: set EV_KEY and EV_ABS only for non-HID_GENERIC type of devices Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 051/103] readdir: make sure to verify directory entry for legacy interfaces too Greg Kroah-Hartman
                   ` (61 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jaegeuk Kim, Mike Snitzer

From: Jaegeuk Kim <jaegeuk@google.com>

commit 8ca7cab82bda4eb0b8064befeeeaa38106cac637 upstream.

commit df7b59ba9245 ("dm verity: fix FEC for RS roots unaligned to
block size") introduced the possibility for misaligned roots IO
relative to the underlying device's logical block size. E.g. Android's
default RS roots=2 results in dm_bufio->block_size=1024, which causes
the following EIO if the logical block size of the device is 4096,
given v->data_dev_block_bits=12:

E sd 0    : 0:0:0: [sda] tag#30 request not aligned to the logical block size
E blk_update_request: I/O error, dev sda, sector 10368424 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
E device-mapper: verity-fec: 254:8: FEC 9244672: parity read failed (block 18056): -5

Fix this by onlu using f->roots for dm_bufio blocksize IFF it is
aligned to v->data_dev_block_bits.

Fixes: df7b59ba9245 ("dm verity: fix FEC for RS roots unaligned to block size")
Cc: stable@vger.kernel.org
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/md/dm-verity-fec.c |   11 ++++++++---
 drivers/md/dm-verity-fec.h |    1 +
 2 files changed, 9 insertions(+), 3 deletions(-)

--- a/drivers/md/dm-verity-fec.c
+++ b/drivers/md/dm-verity-fec.c
@@ -65,7 +65,7 @@ static u8 *fec_read_parity(struct dm_ver
 	u8 *res;
 
 	position = (index + rsb) * v->fec->roots;
-	block = div64_u64_rem(position, v->fec->roots << SECTOR_SHIFT, &rem);
+	block = div64_u64_rem(position, v->fec->io_size, &rem);
 	*offset = (unsigned)rem;
 
 	res = dm_bufio_read(v->fec->bufio, block, buf);
@@ -154,7 +154,7 @@ static int fec_decode_bufs(struct dm_ver
 
 		/* read the next block when we run out of parity bytes */
 		offset += v->fec->roots;
-		if (offset >= v->fec->roots << SECTOR_SHIFT) {
+		if (offset >= v->fec->io_size) {
 			dm_bufio_release(buf);
 
 			par = fec_read_parity(v, rsb, block_offset, &offset, &buf);
@@ -742,8 +742,13 @@ int verity_fec_ctr(struct dm_verity *v)
 		return -E2BIG;
 	}
 
+	if ((f->roots << SECTOR_SHIFT) & ((1 << v->data_dev_block_bits) - 1))
+		f->io_size = 1 << v->data_dev_block_bits;
+	else
+		f->io_size = v->fec->roots << SECTOR_SHIFT;
+
 	f->bufio = dm_bufio_client_create(f->dev->bdev,
-					  f->roots << SECTOR_SHIFT,
+					  f->io_size,
 					  1, 0, NULL, NULL);
 	if (IS_ERR(f->bufio)) {
 		ti->error = "Cannot initialize FEC bufio client";
--- a/drivers/md/dm-verity-fec.h
+++ b/drivers/md/dm-verity-fec.h
@@ -36,6 +36,7 @@ struct dm_verity_fec {
 	struct dm_dev *dev;	/* parity data device */
 	struct dm_bufio_client *data_bufio;	/* for data dev access */
 	struct dm_bufio_client *bufio;		/* for parity data access */
+	size_t io_size;		/* IO size for roots */
 	sector_t start;		/* parity data start in blocks */
 	sector_t blocks;	/* number of blocks covered */
 	sector_t rounds;	/* number of interleaving rounds */



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 051/103] readdir: make sure to verify directory entry for legacy interfaces too
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 050/103] dm verity fec: fix misaligned RS roots IO Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 052/103] arm64: fix inline asm in load_unaligned_zeropad() Greg Kroah-Hartman
                   ` (60 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Al Viro, Linus Torvalds

From: Linus Torvalds <torvalds@linux-foundation.org>

commit 0c93ac69407d63a85be0129aa55ffaec27ffebd3 upstream.

This does the directory entry name verification for the legacy
"fillonedir" (and compat) interface that goes all the way back to the
dark ages before we had a proper dirent, and the readdir() system call
returned just a single entry at a time.

Nobody should use this interface unless you still have binaries from
1991, but let's do it right.

This came up during discussions about unsafe_copy_to_user() and proper
checking of all the inputs to it, as the networking layer is looking to
use it in a few new places.  So let's make sure the _old_ users do it
all right and proper, before we add new ones.

See also commit 8a23eb804ca4 ("Make filldir[64]() verify the directory
entry filename is valid") which did the proper modern interfaces that
people actually use. It had a note:

    Note that I didn't bother adding the checks to any legacy interfaces
    that nobody uses.

which this now corrects.  Note that we really don't care about POSIX and
the presense of '/' in a directory entry, but verify_dirent_name() also
ends up doing the proper name length verification which is what the
input checking discussion was about.

[ Another option would be to remove the support for this particular very
  old interface: any binaries that use it are likely a.out binaries, and
  they will no longer run anyway since we removed a.out binftm support
  in commit eac616557050 ("x86: Deprecate a.out support").

  But I'm not sure which came first: getdents() or ELF support, so let's
  pretend somebody might still have a working binary that uses the
  legacy readdir() case.. ]

Link: https://lore.kernel.org/lkml/CAHk-=wjbvzCAhAtvG0d81W5o0-KT5PPTHhfJ5ieDFq+bGtgOYg@mail.gmail.com/
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/readdir.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -150,6 +150,9 @@ static int fillonedir(struct dir_context
 
 	if (buf->result)
 		return -EINVAL;
+	buf->result = verify_dirent_name(name, namlen);
+	if (buf->result < 0)
+		return buf->result;
 	d_ino = ino;
 	if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) {
 		buf->result = -EOVERFLOW;
@@ -405,6 +408,9 @@ static int compat_fillonedir(struct dir_
 
 	if (buf->result)
 		return -EINVAL;
+	buf->result = verify_dirent_name(name, namlen);
+	if (buf->result < 0)
+		return buf->result;
 	d_ino = ino;
 	if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) {
 		buf->result = -EOVERFLOW;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 052/103] arm64: fix inline asm in load_unaligned_zeropad()
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 051/103] readdir: make sure to verify directory entry for legacy interfaces too Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 053/103] arm64: alternatives: Move length validation in alternative_{insn, endif} Greg Kroah-Hartman
                   ` (59 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Peter Collingbourne, Will Deacon

From: Peter Collingbourne <pcc@google.com>

commit 185f2e5f51c2029efd9dd26cceb968a44fe053c6 upstream.

The inline asm's addr operand is marked as input-only, however in
the case where an exception is taken it may be modified by the BIC
instruction on the exception path. Fix the problem by using a temporary
register as the destination register for the BIC instruction.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Cc: stable@vger.kernel.org
Link: https://linux-review.googlesource.com/id/I84538c8a2307d567b4f45bb20b715451005f9617
Link: https://lore.kernel.org/r/20210401165110.3952103-1-pcc@google.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/include/asm/word-at-a-time.h |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/arch/arm64/include/asm/word-at-a-time.h
+++ b/arch/arm64/include/asm/word-at-a-time.h
@@ -53,7 +53,7 @@ static inline unsigned long find_zero(un
  */
 static inline unsigned long load_unaligned_zeropad(const void *addr)
 {
-	unsigned long ret, offset;
+	unsigned long ret, tmp;
 
 	/* Load word from unaligned pointer addr */
 	asm(
@@ -61,9 +61,9 @@ static inline unsigned long load_unalign
 	"2:\n"
 	"	.pushsection .fixup,\"ax\"\n"
 	"	.align 2\n"
-	"3:	and	%1, %2, #0x7\n"
-	"	bic	%2, %2, #0x7\n"
-	"	ldr	%0, [%2]\n"
+	"3:	bic	%1, %2, #0x7\n"
+	"	ldr	%0, [%1]\n"
+	"	and	%1, %2, #0x7\n"
 	"	lsl	%1, %1, #0x3\n"
 #ifndef __AARCH64EB__
 	"	lsr	%0, %0, %1\n"
@@ -73,7 +73,7 @@ static inline unsigned long load_unalign
 	"	b	2b\n"
 	"	.popsection\n"
 	_ASM_EXTABLE(1b, 3b)
-	: "=&r" (ret), "=&r" (offset)
+	: "=&r" (ret), "=&r" (tmp)
 	: "r" (addr), "Q" (*(unsigned long *)addr));
 
 	return ret;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 053/103] arm64: alternatives: Move length validation in alternative_{insn, endif}
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 052/103] arm64: fix inline asm in load_unaligned_zeropad() Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 054/103] vfio/pci: Add missing range check in vfio_pci_mmap Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nathan Chancellor, Sami Tolvanen,
	Nick Desaulniers, Catalin Marinas

From: Nathan Chancellor <nathan@kernel.org>

commit 22315a2296f4c251fa92aec45fbbae37e9301b6c upstream.

After commit 2decad92f473 ("arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is
set atomically"), LLVM's integrated assembler fails to build entry.S:

<instantiation>:5:7: error: expected assembly-time absolute expression
 .org . - (664b-663b) + (662b-661b)
      ^
<instantiation>:6:7: error: expected assembly-time absolute expression
 .org . - (662b-661b) + (664b-663b)
      ^

The root cause is LLVM's assembler has a one-pass design, meaning it
cannot figure out these instruction lengths when the .org directive is
outside of the subsection that they are in, which was changed by the
.arch_extension directive added in the above commit.

Apply the same fix from commit 966a0acce2fc ("arm64/alternatives: move
length validation inside the subsection") to the alternative_endif
macro, shuffling the .org directives so that the length validation
happen will always happen in the same subsections. alternative_insn has
not shown any issue yet but it appears that it could have the same issue
in the future so just preemptively change it.

Fixes: f7b93d42945c ("arm64/alternatives: use subsections for replacement sequences")
Cc: <stable@vger.kernel.org> # 5.8.x
Link: https://github.com/ClangBuiltLinux/linux/issues/1347
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20210414000803.662534-1-nathan@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/include/asm/alternative.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/arch/arm64/include/asm/alternative.h
+++ b/arch/arm64/include/asm/alternative.h
@@ -119,9 +119,9 @@ static inline void apply_alternatives_mo
 	.popsection
 	.subsection 1
 663:	\insn2
-664:	.previous
-	.org	. - (664b-663b) + (662b-661b)
+664:	.org	. - (664b-663b) + (662b-661b)
 	.org	. - (662b-661b) + (664b-663b)
+	.previous
 	.endif
 .endm
 
@@ -191,11 +191,11 @@ static inline void apply_alternatives_mo
  */
 .macro alternative_endif
 664:
+	.org	. - (664b-663b) + (662b-661b)
+	.org	. - (662b-661b) + (664b-663b)
 	.if .Lasm_alt_mode==0
 	.previous
 	.endif
-	.org	. - (664b-663b) + (662b-661b)
-	.org	. - (662b-661b) + (664b-663b)
 .endm
 
 /*



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 054/103] vfio/pci: Add missing range check in vfio_pci_mmap
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 053/103] arm64: alternatives: Move length validation in alternative_{insn, endif} Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 055/103] riscv: Fix spelling mistake "SPARSEMEM" to "SPARSMEM" Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Christian A. Ehrhardt, David Gibson,
	Cornelia Huck, Alex Williamson

From: Christian A. Ehrhardt <lk@c--e.de>

commit 909290786ea335366e21d7f1ed5812b90f2f0a92 upstream.

When mmaping an extra device region verify that the region index
derived from the mmap offset is valid.

Fixes: a15b1883fee1 ("vfio_pci: Allow mapping extra regions")
Cc: stable@vger.kernel.org
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
Message-Id: <20210412214124.GA241759@lisa.in-ulm.de>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/vfio/pci/vfio_pci.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -1658,6 +1658,8 @@ static int vfio_pci_mmap(void *device_da
 
 	index = vma->vm_pgoff >> (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT);
 
+	if (index >= VFIO_PCI_NUM_REGIONS + vdev->num_regions)
+		return -EINVAL;
 	if (vma->vm_end < vma->vm_start)
 		return -EINVAL;
 	if ((vma->vm_flags & VM_SHARED) == 0)
@@ -1666,7 +1668,7 @@ static int vfio_pci_mmap(void *device_da
 		int regnum = index - VFIO_PCI_NUM_REGIONS;
 		struct vfio_pci_region *region = vdev->region + regnum;
 
-		if (region && region->ops && region->ops->mmap &&
+		if (region->ops && region->ops->mmap &&
 		    (region->flags & VFIO_REGION_INFO_FLAG_MMAP))
 			return region->ops->mmap(vdev, region, vma);
 		return -EINVAL;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 055/103] riscv: Fix spelling mistake "SPARSEMEM" to "SPARSMEM"
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 054/103] vfio/pci: Add missing range check in vfio_pci_mmap Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 056/103] scsi: libsas: Reset num_scatter if libata marks qc as NODATA Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Kefeng Wang, Palmer Dabbelt

From: Kefeng Wang <wangkefeng.wang@huawei.com>

commit 199fc6b8dee7d6d50467a57e0dc7e3e1b7d59966 upstream.

There is a spelling mistake when SPARSEMEM Kconfig copy.

Fixes: a5406a7ff56e ("riscv: Correct SPARSEMEM configuration")
Cc: stable@vger.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/riscv/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -144,7 +144,7 @@ config ARCH_FLATMEM_ENABLE
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
 	depends on MMU
-	select SPARSEMEM_STATIC if 32BIT && SPARSMEM
+	select SPARSEMEM_STATIC if 32BIT && SPARSEMEM
 	select SPARSEMEM_VMEMMAP_ENABLE if 64BIT
 
 config ARCH_SELECT_MEMORY_MODEL



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 056/103] scsi: libsas: Reset num_scatter if libata marks qc as NODATA
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 055/103] riscv: Fix spelling mistake "SPARSEMEM" to "SPARSMEM" Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 057/103] ixgbe: fix unbalanced device enable/disable in suspend/resume Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Luo Jiaxing, John Garry, Jolly Shah,
	Martin K. Petersen

From: Jolly Shah <jollys@google.com>

commit 176ddd89171ddcf661862d90c5d257877f7326d6 upstream.

When the cache_type for the SCSI device is changed, the SCSI layer issues a
MODE_SELECT command. The caching mode details are communicated via a
request buffer associated with the SCSI command with data direction set as
DMA_TO_DEVICE (scsi_mode_select()). When this command reaches the libata
layer, as a part of generic initial setup, libata layer sets up the
scatterlist for the command using the SCSI command (ata_scsi_qc_new()).
This command is then translated by the libata layer into
ATA_CMD_SET_FEATURES (ata_scsi_mode_select_xlat()). The libata layer treats
this as a non-data command (ata_mselect_caching()), since it only needs an
ATA taskfile to pass the caching on/off information to the device. It does
not need the scatterlist that has been setup, so it does not perform
dma_map_sg() on the scatterlist (ata_qc_issue()). Unfortunately, when this
command reaches the libsas layer (sas_ata_qc_issue()), libsas layer sees it
as a non-data command with a scatterlist. It cannot extract the correct DMA
length since the scatterlist has not been mapped with dma_map_sg() for a
DMA operation. When this partially constructed SAS task reaches pm80xx
LLDD, it results in the following warning:

"pm80xx_chip_sata_req 6058: The sg list address
start_addr=0x0000000000000000 data_len=0x0end_addr_high=0xffffffff
end_addr_low=0xffffffff has crossed 4G boundary"

Update libsas to handle ATA non-data commands separately so num_scatter and
total_xfer_len remain 0.

Link: https://lore.kernel.org/r/20210318225632.2481291-1-jollys@google.com
Fixes: 53de092f47ff ("scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA")
Tested-by: Luo Jiaxing <luojiaxing@huawei.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Jolly Shah <jollys@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/scsi/libsas/sas_ata.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -201,18 +201,17 @@ static unsigned int sas_ata_qc_issue(str
 		memcpy(task->ata_task.atapi_packet, qc->cdb, qc->dev->cdb_len);
 		task->total_xfer_len = qc->nbytes;
 		task->num_scatter = qc->n_elem;
+		task->data_dir = qc->dma_dir;
+	} else if (qc->tf.protocol == ATA_PROT_NODATA) {
+		task->data_dir = DMA_NONE;
 	} else {
 		for_each_sg(qc->sg, sg, qc->n_elem, si)
 			xfer += sg_dma_len(sg);
 
 		task->total_xfer_len = xfer;
 		task->num_scatter = si;
-	}
-
-	if (qc->tf.protocol == ATA_PROT_NODATA)
-		task->data_dir = DMA_NONE;
-	else
 		task->data_dir = qc->dma_dir;
+	}
 	task->scatter = qc->sg;
 	task->ata_task.retry_count = 1;
 	task->task_state_flags = SAS_TASK_STATE_PENDING;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 057/103] ixgbe: fix unbalanced device enable/disable in suspend/resume
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 056/103] scsi: libsas: Reset num_scatter if libata marks qc as NODATA Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 058/103] netfilter: flowtable: fix NAT IPv6 offload mangling Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yongxin Liu, Dave Switzer, Tony Nguyen

From: Yongxin Liu <yongxin.liu@windriver.com>

commit debb9df311582c83fe369baa35fa4b92e8a9c58a upstream.

pci_disable_device() called in __ixgbe_shutdown() decreases
dev->enable_cnt by 1. pci_enable_device_mem() which increases
dev->enable_cnt by 1, was removed from ixgbe_resume() in commit
6f82b2558735 ("ixgbe: use generic power management"). This caused
unbalanced increase/decrease. So add pci_enable_device_mem() back.

Fix the following call trace.

  ixgbe 0000:17:00.1: disabling already-disabled device
  Call Trace:
   __ixgbe_shutdown+0x10a/0x1e0 [ixgbe]
   ixgbe_suspend+0x32/0x70 [ixgbe]
   pci_pm_suspend+0x87/0x160
   ? pci_pm_freeze+0xd0/0xd0
   dpm_run_callback+0x42/0x170
   __device_suspend+0x114/0x460
   async_suspend+0x1f/0xa0
   async_run_entry_fn+0x3c/0xf0
   process_one_work+0x1dd/0x410
   worker_thread+0x34/0x3f0
   ? cancel_delayed_work+0x90/0x90
   kthread+0x14c/0x170
   ? kthread_park+0x90/0x90
   ret_from_fork+0x1f/0x30

Fixes: 6f82b2558735 ("ixgbe: use generic power management")
Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6896,6 +6896,11 @@ static int __maybe_unused ixgbe_resume(s
 
 	adapter->hw.hw_addr = adapter->io_addr;
 
+	err = pci_enable_device_mem(pdev);
+	if (err) {
+		e_dev_err("Cannot enable PCI device from suspend\n");
+		return err;
+	}
 	smp_mb__before_atomic();
 	clear_bit(__IXGBE_DISABLED, &adapter->state);
 	pci_set_master(pdev);



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 058/103] netfilter: flowtable: fix NAT IPv6 offload mangling
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (56 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 057/103] ixgbe: fix unbalanced device enable/disable in suspend/resume Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 059/103] netfilter: conntrack: do not print icmpv6 as unknown via /proc Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Pablo Neira Ayuso

From: Pablo Neira Ayuso <pablo@netfilter.org>

commit 0e07e25b481aa021e4b48085ecb8a049e9614510 upstream.

Fix out-of-bound access in the address array.

Fixes: 5c27d8d76ce8 ("netfilter: nf_flow_table_offload: add IPv6 support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/netfilter/nf_flow_table_offload.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/net/netfilter/nf_flow_table_offload.c
+++ b/net/netfilter/nf_flow_table_offload.c
@@ -305,12 +305,12 @@ static void flow_offload_ipv6_mangle(str
 				     const __be32 *addr, const __be32 *mask)
 {
 	struct flow_action_entry *entry;
-	int i;
+	int i, j;
 
-	for (i = 0; i < sizeof(struct in6_addr) / sizeof(u32); i += sizeof(u32)) {
+	for (i = 0, j = 0; i < sizeof(struct in6_addr) / sizeof(u32); i += sizeof(u32), j++) {
 		entry = flow_action_entry_next(flow_rule);
 		flow_offload_mangle(entry, FLOW_ACT_MANGLE_HDR_TYPE_IP6,
-				    offset + i, &addr[i], mask);
+				    offset + i, &addr[j], mask);
 	}
 }
 



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 059/103] netfilter: conntrack: do not print icmpv6 as unknown via /proc
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (57 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 058/103] netfilter: flowtable: fix NAT IPv6 offload mangling Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 060/103] ice: Fix potential infinite loop when using u8 loop counter Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Pablo Neira Ayuso

From: Pablo Neira Ayuso <pablo@netfilter.org>

commit fbea31808ca124dd73ff6bb1e67c9af4607c3e32 upstream.

/proc/net/nf_conntrack shows icmpv6 as unknown.

Fixes: 09ec82f5af99 ("netfilter: conntrack: remove protocol name from l4proto struct")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/netfilter/nf_conntrack_standalone.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -266,6 +266,7 @@ static const char* l4proto_name(u16 prot
 	case IPPROTO_GRE: return "gre";
 	case IPPROTO_SCTP: return "sctp";
 	case IPPROTO_UDPLITE: return "udplite";
+	case IPPROTO_ICMPV6: return "icmpv6";
 	}
 
 	return "unknown";



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 060/103] ice: Fix potential infinite loop when using u8 loop counter
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (58 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 059/103] netfilter: conntrack: do not print icmpv6 as unknown via /proc Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 061/103] libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Colin Ian King, Tony Brelinski, Tony Nguyen

From: Colin Ian King <colin.king@canonical.com>

commit ef963ae427aa4669905e0a96b3bd9d44dc85db32 upstream.

A for-loop is using a u8 loop counter that is being compared to
a u32 cmp_dcbcfg->numapp to check for the end of the loop. If
cmp_dcbcfg->numapp is larger than 255 then the counter j will wrap
around to zero and hence an infinite loop occurs. Fix this by making
counter j the same type as cmp_dcbcfg->numapp.

Addresses-Coverity: ("Infinite loop")
Fixes: aeac8ce864d9 ("ice: Recognize 860 as iSCSI port in CEE mode")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/ice/ice_dcb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/intel/ice/ice_dcb.c
+++ b/drivers/net/ethernet/intel/ice/ice_dcb.c
@@ -747,8 +747,8 @@ ice_cee_to_dcb_cfg(struct ice_aqc_get_ce
 		   struct ice_port_info *pi)
 {
 	u32 status, tlv_status = le32_to_cpu(cee_cfg->tlv_status);
-	u32 ice_aqc_cee_status_mask, ice_aqc_cee_status_shift;
-	u8 i, j, err, sync, oper, app_index, ice_app_sel_type;
+	u32 ice_aqc_cee_status_mask, ice_aqc_cee_status_shift, j;
+	u8 i, err, sync, oper, app_index, ice_app_sel_type;
 	u16 app_prio = le16_to_cpu(cee_cfg->oper_app_prio);
 	u16 ice_aqc_cee_app_mask, ice_aqc_cee_app_shift;
 	struct ice_dcbx_cfg *cmp_dcbcfg, *dcbcfg;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 061/103] libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (59 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 060/103] ice: Fix potential infinite loop when using u8 loop counter Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 062/103] netfilter: bridge: add pre_exit hooks for ebtable unregistration Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shivaprasad G Bhat, Vaibhav Jain,
	Dan Williams

From: Vaibhav Jain <vaibhav@linux.ibm.com>

commit a2948b17f6b936fc52f86c0f92c46d2f91928b79 upstream.

In case a platform doesn't provide explicit flush-hints but provides an
explicit flush callback via ND_REGION_ASYNC region flag, then
nvdimm_has_flush() still returns '0' indicating that writes do not
require flushing. This happens on PPC64 with patch at [1] applied, where
'deep_flush' of a region was denied even though an explicit flush
function was provided.

Fix this by adding a condition to nvdimm_has_flush() to test for the
ND_REGION_ASYNC flag on the region and see if a 'region->flush' callback
is assigned.

Link: http://lore.kernel.org/r/161703936121.36.7260632399582101498.stgit@e1fbed493c87 [1]
Fixes: c5d4355d10d4 ("libnvdimm: nd_region flush callback support")
Reported-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Link: https://lore.kernel.org/r/20210402092555.208590-1-vaibhav@linux.ibm.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/nvdimm/region_devs.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -1239,6 +1239,11 @@ int nvdimm_has_flush(struct nd_region *n
 			|| !IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API))
 		return -ENXIO;
 
+	/* Test if an explicit flush function is defined */
+	if (test_bit(ND_REGION_ASYNC, &nd_region->flags) && nd_region->flush)
+		return 1;
+
+	/* Test if any flush hints for the region are available */
 	for (i = 0; i < nd_region->ndr_mappings; i++) {
 		struct nd_mapping *nd_mapping = &nd_region->mapping[i];
 		struct nvdimm *nvdimm = nd_mapping->nvdimm;
@@ -1249,8 +1254,8 @@ int nvdimm_has_flush(struct nd_region *n
 	}
 
 	/*
-	 * The platform defines dimm devices without hints, assume
-	 * platform persistence mechanism like ADR
+	 * The platform defines dimm devices without hints nor explicit flush,
+	 * assume platform persistence mechanism like ADR
 	 */
 	return 0;
 }



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 062/103] netfilter: bridge: add pre_exit hooks for ebtable unregistration
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (60 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 061/103] libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 063/103] netfilter: arp_tables: add pre_exit hook for table unregister Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Florian Westphal, Pablo Neira Ayuso

From: Florian Westphal <fw@strlen.de>

commit 7ee3c61dcd28bf6e290e06ad382f13511dc790e9 upstream.

Just like ip/ip6/arptables, the hooks have to be removed, then
synchronize_rcu() has to be called to make sure no more packets are being
processed before the ruleset data is released.

Place the hook unregistration in the pre_exit hook, then call the new
ebtables pre_exit function from there.

Years ago, when first netns support got added for netfilter+ebtables,
this used an older (now removed) netfilter hook unregister API, that did
a unconditional synchronize_rcu().

Now that all is done with call_rcu, ebtable_{filter,nat,broute} pernet exit
handlers may free the ebtable ruleset while packets are still in flight.

This can only happens on module removal, not during netns exit.

The new function expects the table name, not the table struct.

This is because upcoming patch set (targeting -next) will remove all
net->xt.{nat,filter,broute}_table instances, this makes it necessary
to avoid external references to those member variables.

The existing APIs will be converted, so follow the upcoming scheme of
passing name + hook type instead.

Fixes: aee12a0a3727e ("ebtables: remove nf_hook_register usage")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/netfilter_bridge/ebtables.h |    5 +++--
 net/bridge/netfilter/ebtable_broute.c     |    8 +++++++-
 net/bridge/netfilter/ebtable_filter.c     |    8 +++++++-
 net/bridge/netfilter/ebtable_nat.c        |    8 +++++++-
 net/bridge/netfilter/ebtables.c           |   30 +++++++++++++++++++++++++++---
 5 files changed, 51 insertions(+), 8 deletions(-)

--- a/include/linux/netfilter_bridge/ebtables.h
+++ b/include/linux/netfilter_bridge/ebtables.h
@@ -110,8 +110,9 @@ extern int ebt_register_table(struct net
 			      const struct ebt_table *table,
 			      const struct nf_hook_ops *ops,
 			      struct ebt_table **res);
-extern void ebt_unregister_table(struct net *net, struct ebt_table *table,
-				 const struct nf_hook_ops *);
+extern void ebt_unregister_table(struct net *net, struct ebt_table *table);
+void ebt_unregister_table_pre_exit(struct net *net, const char *tablename,
+				   const struct nf_hook_ops *ops);
 extern unsigned int ebt_do_table(struct sk_buff *skb,
 				 const struct nf_hook_state *state,
 				 struct ebt_table *table);
--- a/net/bridge/netfilter/ebtable_broute.c
+++ b/net/bridge/netfilter/ebtable_broute.c
@@ -105,14 +105,20 @@ static int __net_init broute_net_init(st
 				  &net->xt.broute_table);
 }
 
+static void __net_exit broute_net_pre_exit(struct net *net)
+{
+	ebt_unregister_table_pre_exit(net, "broute", &ebt_ops_broute);
+}
+
 static void __net_exit broute_net_exit(struct net *net)
 {
-	ebt_unregister_table(net, net->xt.broute_table, &ebt_ops_broute);
+	ebt_unregister_table(net, net->xt.broute_table);
 }
 
 static struct pernet_operations broute_net_ops = {
 	.init = broute_net_init,
 	.exit = broute_net_exit,
+	.pre_exit = broute_net_pre_exit,
 };
 
 static int __init ebtable_broute_init(void)
--- a/net/bridge/netfilter/ebtable_filter.c
+++ b/net/bridge/netfilter/ebtable_filter.c
@@ -99,14 +99,20 @@ static int __net_init frame_filter_net_i
 				  &net->xt.frame_filter);
 }
 
+static void __net_exit frame_filter_net_pre_exit(struct net *net)
+{
+	ebt_unregister_table_pre_exit(net, "filter", ebt_ops_filter);
+}
+
 static void __net_exit frame_filter_net_exit(struct net *net)
 {
-	ebt_unregister_table(net, net->xt.frame_filter, ebt_ops_filter);
+	ebt_unregister_table(net, net->xt.frame_filter);
 }
 
 static struct pernet_operations frame_filter_net_ops = {
 	.init = frame_filter_net_init,
 	.exit = frame_filter_net_exit,
+	.pre_exit = frame_filter_net_pre_exit,
 };
 
 static int __init ebtable_filter_init(void)
--- a/net/bridge/netfilter/ebtable_nat.c
+++ b/net/bridge/netfilter/ebtable_nat.c
@@ -99,14 +99,20 @@ static int __net_init frame_nat_net_init
 				  &net->xt.frame_nat);
 }
 
+static void __net_exit frame_nat_net_pre_exit(struct net *net)
+{
+	ebt_unregister_table_pre_exit(net, "nat", ebt_ops_nat);
+}
+
 static void __net_exit frame_nat_net_exit(struct net *net)
 {
-	ebt_unregister_table(net, net->xt.frame_nat, ebt_ops_nat);
+	ebt_unregister_table(net, net->xt.frame_nat);
 }
 
 static struct pernet_operations frame_nat_net_ops = {
 	.init = frame_nat_net_init,
 	.exit = frame_nat_net_exit,
+	.pre_exit = frame_nat_net_pre_exit,
 };
 
 static int __init ebtable_nat_init(void)
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1232,10 +1232,34 @@ out:
 	return ret;
 }
 
-void ebt_unregister_table(struct net *net, struct ebt_table *table,
-			  const struct nf_hook_ops *ops)
+static struct ebt_table *__ebt_find_table(struct net *net, const char *name)
+{
+	struct ebt_table *t;
+
+	mutex_lock(&ebt_mutex);
+
+	list_for_each_entry(t, &net->xt.tables[NFPROTO_BRIDGE], list) {
+		if (strcmp(t->name, name) == 0) {
+			mutex_unlock(&ebt_mutex);
+			return t;
+		}
+	}
+
+	mutex_unlock(&ebt_mutex);
+	return NULL;
+}
+
+void ebt_unregister_table_pre_exit(struct net *net, const char *name, const struct nf_hook_ops *ops)
+{
+	struct ebt_table *table = __ebt_find_table(net, name);
+
+	if (table)
+		nf_unregister_net_hooks(net, ops, hweight32(table->valid_hooks));
+}
+EXPORT_SYMBOL(ebt_unregister_table_pre_exit);
+
+void ebt_unregister_table(struct net *net, struct ebt_table *table)
 {
-	nf_unregister_net_hooks(net, ops, hweight32(table->valid_hooks));
 	__ebt_unregister_table(net, table);
 }
 



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 063/103] netfilter: arp_tables: add pre_exit hook for table unregister
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (61 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 062/103] netfilter: bridge: add pre_exit hooks for ebtable unregistration Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 064/103] libbpf: Fix potential NULL pointer dereference Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Florian Westphal, Pablo Neira Ayuso

From: Florian Westphal <fw@strlen.de>

commit d163a925ebbc6eb5b562b0f1d72c7e817aa75c40 upstream.

Same problem that also existed in iptables/ip(6)tables, when
arptable_filter is removed there is no longer a wait period before the
table/ruleset is free'd.

Unregister the hook in pre_exit, then remove the table in the exit
function.
This used to work correctly because the old nf_hook_unregister API
did unconditional synchronize_net.

The per-net hook unregister function uses call_rcu instead.

Fixes: b9e69e127397 ("netfilter: xtables: don't hook tables by default")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/netfilter_arp/arp_tables.h |    5 +++--
 net/ipv4/netfilter/arp_tables.c          |    9 +++++++--
 net/ipv4/netfilter/arptable_filter.c     |   10 +++++++++-
 3 files changed, 19 insertions(+), 5 deletions(-)

--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -52,8 +52,9 @@ extern void *arpt_alloc_initial_table(co
 int arpt_register_table(struct net *net, const struct xt_table *table,
 			const struct arpt_replace *repl,
 			const struct nf_hook_ops *ops, struct xt_table **res);
-void arpt_unregister_table(struct net *net, struct xt_table *table,
-			   const struct nf_hook_ops *ops);
+void arpt_unregister_table(struct net *net, struct xt_table *table);
+void arpt_unregister_table_pre_exit(struct net *net, struct xt_table *table,
+				    const struct nf_hook_ops *ops);
 extern unsigned int arpt_do_table(struct sk_buff *skb,
 				  const struct nf_hook_state *state,
 				  struct xt_table *table);
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -1541,10 +1541,15 @@ out_free:
 	return ret;
 }
 
-void arpt_unregister_table(struct net *net, struct xt_table *table,
-			   const struct nf_hook_ops *ops)
+void arpt_unregister_table_pre_exit(struct net *net, struct xt_table *table,
+				    const struct nf_hook_ops *ops)
 {
 	nf_unregister_net_hooks(net, ops, hweight32(table->valid_hooks));
+}
+EXPORT_SYMBOL(arpt_unregister_table_pre_exit);
+
+void arpt_unregister_table(struct net *net, struct xt_table *table)
+{
 	__arpt_unregister_table(net, table);
 }
 
--- a/net/ipv4/netfilter/arptable_filter.c
+++ b/net/ipv4/netfilter/arptable_filter.c
@@ -56,16 +56,24 @@ static int __net_init arptable_filter_ta
 	return err;
 }
 
+static void __net_exit arptable_filter_net_pre_exit(struct net *net)
+{
+	if (net->ipv4.arptable_filter)
+		arpt_unregister_table_pre_exit(net, net->ipv4.arptable_filter,
+					       arpfilter_ops);
+}
+
 static void __net_exit arptable_filter_net_exit(struct net *net)
 {
 	if (!net->ipv4.arptable_filter)
 		return;
-	arpt_unregister_table(net, net->ipv4.arptable_filter, arpfilter_ops);
+	arpt_unregister_table(net, net->ipv4.arptable_filter);
 	net->ipv4.arptable_filter = NULL;
 }
 
 static struct pernet_operations arptable_filter_net_ops = {
 	.exit = arptable_filter_net_exit,
+	.pre_exit = arptable_filter_net_pre_exit,
 };
 
 static int __init arptable_filter_init(void)



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 064/103] libbpf: Fix potential NULL pointer dereference
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (62 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 063/103] netfilter: arp_tables: add pre_exit hook for table unregister Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 065/103] net: macb: fix the restore of cmp registers Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ciara Loftus, Daniel Borkmann

From: Ciara Loftus <ciara.loftus@intel.com>

commit afd0be7299533bb2e2b09104399d8a467ecbd2c5 upstream.

Wait until after the UMEM is checked for null to dereference it.

Fixes: 43f1bc1efff1 ("libbpf: Restore umem state after socket create failure")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210408052009.7844-1-ciara.loftus@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 tools/lib/bpf/xsk.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/tools/lib/bpf/xsk.c
+++ b/tools/lib/bpf/xsk.c
@@ -703,18 +703,19 @@ int xsk_socket__create_shared(struct xsk
 			      struct xsk_ring_cons *comp,
 			      const struct xsk_socket_config *usr_config)
 {
+	bool unmap, rx_setup_done = false, tx_setup_done = false;
 	void *rx_map = NULL, *tx_map = NULL;
 	struct sockaddr_xdp sxdp = {};
 	struct xdp_mmap_offsets off;
 	struct xsk_socket *xsk;
 	struct xsk_ctx *ctx;
 	int err, ifindex;
-	bool unmap = umem->fill_save != fill;
-	bool rx_setup_done = false, tx_setup_done = false;
 
 	if (!umem || !xsk_ptr || !(rx || tx))
 		return -EFAULT;
 
+	unmap = umem->fill_save != fill;
+
 	xsk = calloc(1, sizeof(*xsk));
 	if (!xsk)
 		return -ENOMEM;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 065/103] net: macb: fix the restore of cmp registers
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (63 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 064/103] libbpf: Fix potential NULL pointer dereference Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 066/103] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Claudiu Beznea, David S. Miller

From: Claudiu Beznea <claudiu.beznea@microchip.com>

commit a714e27ea8bdee2b238748029d31472d0a65b611 upstream.

Commit a14d273ba159 ("net: macb: restore cmp registers on resume path")
introduces the restore of CMP registers on resume path. In case the IP
doesn't support type 2 screeners (zero on DCFG8 register) the
struct macb::rx_fs_list::list is not initialized and thus the
list_for_each_entry(item, &bp->rx_fs_list.list, list) loop introduced in
commit a14d273ba159 ("net: macb: restore cmp registers on resume path")
will access an uninitialized list leading to crash. Thus, initialize
the struct macb::rx_fs_list::list without taking into account if the
IP supports type 2 screeners or not.

Fixes: a14d273ba159 ("net: macb: restore cmp registers on resume path")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/cadence/macb_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3777,6 +3777,7 @@ static int macb_init(struct platform_dev
 	reg = gem_readl(bp, DCFG8);
 	bp->max_tuples = min((GEM_BFEXT(SCR2CMP, reg) / 3),
 			GEM_BFEXT(T2SCR, reg));
+	INIT_LIST_HEAD(&bp->rx_fs_list.list);
 	if (bp->max_tuples > 0) {
 		/* also needs one ethtype match to check IPv4 */
 		if (GEM_BFEXT(SCR2ETH, reg) > 0) {
@@ -3787,7 +3788,6 @@ static int macb_init(struct platform_dev
 			/* Filtering is supported in hw but don't enable it in kernel now */
 			dev->hw_features |= NETIF_F_NTUPLE;
 			/* init Rx flow definitions */
-			INIT_LIST_HEAD(&bp->rx_fs_list.list);
 			bp->rx_fs_list.count = 0;
 			spin_lock_init(&bp->rx_fs_lock);
 		} else



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 066/103] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (64 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 065/103] net: macb: fix the restore of cmp registers Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 067/103] netfilter: nft_limit: avoid possible divide error in nft_limit_init Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, wenxu, Pablo Neira Ayuso, Saeed Mahameed

From: wenxu <wenxu@ucloud.cn>

commit e3e0f9b279705154b951d579dc3d8b7041710e24 upstream.

In the nft_offload there is the mate flow_dissector with no
ingress_ifindex but with ingress_iftype that only be used
in the software. So if the mask of ingress_ifindex in meta is
0, this meta check should be bypass.

Fixes: 6d65bc64e232 ("net/mlx5e: Add mlx5e_flower_parse_meta support")
Signed-off-by: wenxu <wenxu@ucloud.cn>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2196,6 +2196,9 @@ static int mlx5e_flower_parse_meta(struc
 		return 0;
 
 	flow_rule_match_meta(rule, &match);
+	if (!match.mask->ingress_ifindex)
+		return 0;
+
 	if (match.mask->ingress_ifindex != 0xFFFFFFFF) {
 		NL_SET_ERR_MSG_MOD(extack, "Unsupported ingress ifindex mask");
 		return -EOPNOTSUPP;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 067/103] netfilter: nft_limit: avoid possible divide error in nft_limit_init
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (65 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 066/103] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 068/103] net/mlx5e: Fix setting of RS FEC mode Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eric Dumazet, syzbot,
	Pablo Neira Ayuso, Luigi Rizzo

From: Eric Dumazet <edumazet@google.com>

commit b895bdf5d643b6feb7c60856326dd4feb6981560 upstream.

div_u64() divides u64 by u32.

nft_limit_init() wants to divide u64 by u64, use the appropriate
math function (div64_u64)

divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8390 Comm: syz-executor188 Not tainted 5.12.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:div_u64_rem include/linux/math64.h:28 [inline]
RIP: 0010:div_u64 include/linux/math64.h:127 [inline]
RIP: 0010:nft_limit_init+0x2a2/0x5e0 net/netfilter/nft_limit.c:85
Code: ef 4c 01 eb 41 0f 92 c7 48 89 de e8 38 a5 22 fa 4d 85 ff 0f 85 97 02 00 00 e8 ea 9e 22 fa 4c 0f af f3 45 89 ed 31 d2 4c 89 f0 <49> f7 f5 49 89 c6 e8 d3 9e 22 fa 48 8d 7d 48 48 b8 00 00 00 00 00
RSP: 0018:ffffc90009447198 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000200000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff875152e6 RDI: 0000000000000003
RBP: ffff888020f80908 R08: 0000200000000000 R09: 0000000000000000
R10: ffffffff875152d8 R11: 0000000000000000 R12: ffffc90009447270
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  000000000097a300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200001c4 CR3: 0000000026a52000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 nf_tables_newexpr net/netfilter/nf_tables_api.c:2675 [inline]
 nft_expr_init+0x145/0x2d0 net/netfilter/nf_tables_api.c:2713
 nft_set_elem_expr_alloc+0x27/0x280 net/netfilter/nf_tables_api.c:5160
 nf_tables_newset+0x1997/0x3150 net/netfilter/nf_tables_api.c:4321
 nfnetlink_rcv_batch+0x85a/0x21b0 net/netfilter/nfnetlink.c:456
 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:580 [inline]
 nfnetlink_rcv+0x3af/0x420 net/netfilter/nfnetlink.c:598
 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:654 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:674
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Fixes: c26844eda9d4 ("netfilter: nf_tables: Fix nft limit burst handling")
Fixes: 3e0f64b7dd31 ("netfilter: nft_limit: fix packet ratelimiting")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Diagnosed-by: Luigi Rizzo <lrizzo@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/netfilter/nft_limit.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/netfilter/nft_limit.c
+++ b/net/netfilter/nft_limit.c
@@ -76,13 +76,13 @@ static int nft_limit_init(struct nft_lim
 		return -EOVERFLOW;
 
 	if (pkts) {
-		tokens = div_u64(limit->nsecs, limit->rate) * limit->burst;
+		tokens = div64_u64(limit->nsecs, limit->rate) * limit->burst;
 	} else {
 		/* The token bucket size limits the number of tokens can be
 		 * accumulated. tokens_max specifies the bucket size.
 		 * tokens_max = unit * (rate + burst) / rate.
 		 */
-		tokens = div_u64(limit->nsecs * (limit->rate + limit->burst),
+		tokens = div64_u64(limit->nsecs * (limit->rate + limit->burst),
 				 limit->rate);
 	}
 



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 068/103] net/mlx5e: Fix setting of RS FEC mode
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (66 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 067/103] netfilter: nft_limit: avoid possible divide error in nft_limit_init Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 069/103] net: davicom: Fix regulator not turned off on failed probe Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Aya Levin, Eran Ben Elisha, Saeed Mahameed

From: Aya Levin <ayal@nvidia.com>

commit 7a320c9db3e73fb6c4f9a331087df9df18767221 upstream.

Change register setting from bit number to bit mask.

Fixes: b5ede32d3329 ("net/mlx5e: Add support for FEC modes based on 50G per lane links")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Eran Ben Elisha <eranbe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/port.c |   23 +++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en/port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/port.c
@@ -387,21 +387,6 @@ enum mlx5e_fec_supported_link_mode {
 			*_policy = MLX5_GET(pplm_reg, _buf, fec_override_admin_##link);	\
 	} while (0)
 
-#define MLX5E_FEC_OVERRIDE_ADMIN_50G_POLICY(buf, policy, write, link)			\
-	do {										\
-		unsigned long policy_long;						\
-		u16 *__policy = &(policy);						\
-		bool _write = (write);							\
-											\
-		policy_long = *__policy;						\
-		if (_write && *__policy)						\
-			*__policy = find_first_bit(&policy_long,			\
-						   sizeof(policy_long) * BITS_PER_BYTE);\
-		MLX5E_FEC_OVERRIDE_ADMIN_POLICY(buf, *__policy, _write, link);		\
-		if (!_write && *__policy)						\
-			*__policy = 1 << *__policy;					\
-	} while (0)
-
 /* get/set FEC admin field for a given speed */
 static int mlx5e_fec_admin_field(u32 *pplm, u16 *fec_policy, bool write,
 				 enum mlx5e_fec_supported_link_mode link_mode)
@@ -423,16 +408,16 @@ static int mlx5e_fec_admin_field(u32 *pp
 		MLX5E_FEC_OVERRIDE_ADMIN_POLICY(pplm, *fec_policy, write, 100g);
 		break;
 	case MLX5E_FEC_SUPPORTED_LINK_MODE_50G_1X:
-		MLX5E_FEC_OVERRIDE_ADMIN_50G_POLICY(pplm, *fec_policy, write, 50g_1x);
+		MLX5E_FEC_OVERRIDE_ADMIN_POLICY(pplm, *fec_policy, write, 50g_1x);
 		break;
 	case MLX5E_FEC_SUPPORTED_LINK_MODE_100G_2X:
-		MLX5E_FEC_OVERRIDE_ADMIN_50G_POLICY(pplm, *fec_policy, write, 100g_2x);
+		MLX5E_FEC_OVERRIDE_ADMIN_POLICY(pplm, *fec_policy, write, 100g_2x);
 		break;
 	case MLX5E_FEC_SUPPORTED_LINK_MODE_200G_4X:
-		MLX5E_FEC_OVERRIDE_ADMIN_50G_POLICY(pplm, *fec_policy, write, 200g_4x);
+		MLX5E_FEC_OVERRIDE_ADMIN_POLICY(pplm, *fec_policy, write, 200g_4x);
 		break;
 	case MLX5E_FEC_SUPPORTED_LINK_MODE_400G_8X:
-		MLX5E_FEC_OVERRIDE_ADMIN_50G_POLICY(pplm, *fec_policy, write, 400g_8x);
+		MLX5E_FEC_OVERRIDE_ADMIN_POLICY(pplm, *fec_policy, write, 400g_8x);
 		break;
 	default:
 		return -EINVAL;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 069/103] net: davicom: Fix regulator not turned off on failed probe
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (67 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 068/103] net/mlx5e: Fix setting of RS FEC mode Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 070/103] net: sit: Unregister catch-all devices Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Christophe JAILLET, David S. Miller

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

commit 31457db3750c0b0ed229d836f2609fdb8a5b790e upstream.

When the probe fails, we must disable the regulator that was previously
enabled.

This patch is a follow-up to commit ac88c531a5b3
("net: davicom: Fix regulator not turned off on failed probe") which missed
one case.

Fixes: 7994fe55a4a2 ("dm9000: Add regulator and reset support to dm9000")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/davicom/dm9000.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -1474,8 +1474,10 @@ dm9000_probe(struct platform_device *pde
 
 	/* Init network device */
 	ndev = alloc_etherdev(sizeof(struct board_info));
-	if (!ndev)
-		return -ENOMEM;
+	if (!ndev) {
+		ret = -ENOMEM;
+		goto out_regulator_disable;
+	}
 
 	SET_NETDEV_DEV(ndev, &pdev->dev);
 



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 070/103] net: sit: Unregister catch-all devices
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (68 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 069/103] net: davicom: Fix regulator not turned off on failed probe Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 071/103] net: ip6_tunnel: " Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hristo Venev, David S. Miller

From: Hristo Venev <hristo@venev.name>

commit 610f8c0fc8d46e0933955ce13af3d64484a4630a upstream.

A sit interface created without a local or a remote address is linked
into the `sit_net::tunnels_wc` list of its original namespace. When
deleting a network namespace, delete the devices that have been moved.

The following script triggers a null pointer dereference if devices
linked in a deleted `sit_net` remain:

    for i in `seq 1 30`; do
        ip netns add ns-test
        ip netns exec ns-test ip link add dev veth0 type veth peer veth1
        ip netns exec ns-test ip link add dev sit$i type sit dev veth0
        ip netns exec ns-test ip link set dev sit$i netns $$
        ip netns del ns-test
    done
    for i in `seq 1 30`; do
        ip link del dev sit$i
    done

Fixes: 5e6700b3bf98f ("sit: add support of x-netns")
Signed-off-by: Hristo Venev <hristo@venev.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv6/sit.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1867,9 +1867,9 @@ static void __net_exit sit_destroy_tunne
 		if (dev->rtnl_link_ops == &sit_link_ops)
 			unregister_netdevice_queue(dev, head);
 
-	for (prio = 1; prio < 4; prio++) {
+	for (prio = 0; prio < 4; prio++) {
 		int h;
-		for (h = 0; h < IP6_SIT_HASH_SIZE; h++) {
+		for (h = 0; h < (prio ? IP6_SIT_HASH_SIZE : 1); h++) {
 			struct ip_tunnel *t;
 
 			t = rtnl_dereference(sitn->tunnels[prio][h]);



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 071/103] net: ip6_tunnel: Unregister catch-all devices
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (69 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 070/103] net: sit: Unregister catch-all devices Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 072/103] mm: ptdump: fix build failure Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hristo Venev, David S. Miller

From: Hristo Venev <hristo@venev.name>

commit 941ea91e87a6e879ed82dad4949f6234f2702bec upstream.

Similarly to the sit case, we need to remove the tunnels with no
addresses that have been moved to another network namespace.

Fixes: 0bd8762824e73 ("ip6tnl: add x-netns support")
Signed-off-by: Hristo Venev <hristo@venev.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv6/ip6_tunnel.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -2275,6 +2275,16 @@ static void __net_exit ip6_tnl_destroy_t
 			t = rtnl_dereference(t->next);
 		}
 	}
+
+	t = rtnl_dereference(ip6n->tnls_wc[0]);
+	while (t) {
+		/* If dev is in the same netns, it has already
+		 * been added to the list by the previous loop.
+		 */
+		if (!net_eq(dev_net(t->dev), net))
+			unregister_netdevice_queue(t->dev, list);
+		t = rtnl_dereference(t->next);
+	}
 }
 
 static int __net_init ip6_tnl_init_net(struct net *net)



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 072/103] mm: ptdump: fix build failure
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (70 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 071/103] net: ip6_tunnel: " Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 073/103] net: Make tcp_allowed_congestion_control readonly in non-init netns Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Christophe Leroy, Steven Price,
	Andrew Morton, Linus Torvalds

From: Christophe Leroy <christophe.leroy@csgroup.eu>

commit 458376913d86bed2fb781b4952eb6861675ef3be upstream.

READ_ONCE() cannot be used for reading PTEs.  Use ptep_get() instead, to
avoid the following errors:

    CC      mm/ptdump.o
  In file included from <command-line>:
  mm/ptdump.c: In function 'ptdump_pte_entry':
  include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_207' declared with attribute error: Unsupported access size for {READ,WRITE}_ONCE().
    320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
        |                                      ^
  include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
    301 |    prefix ## suffix();    \
        |    ^~~~~~
  include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
    320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
        |  ^~~~~~~~~~~~~~~~~~~
  include/asm-generic/rwonce.h:36:2: note: in expansion of macro 'compiletime_assert'
     36 |  compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
        |  ^~~~~~~~~~~~~~~~~~
  include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
     49 |  compiletime_assert_rwonce_type(x);    \
        |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  mm/ptdump.c:114:14: note: in expansion of macro 'READ_ONCE'
    114 |  pte_t val = READ_ONCE(*pte);
        |              ^~~~~~~~~
  make[2]: *** [mm/ptdump.o] Error 1

See commit 481e980a7c19 ("mm: Allow arches to provide ptep_get()") and
commit c0e1c8c22beb ("powerpc/8xx: Provide ptep_get() with 16k pages")
for details.

Link: https://lkml.kernel.org/r/912b349e2bcaa88939904815ca0af945740c6bd4.1618478922.git.christophe.leroy@csgroup.eu
Fixes: 30d621f6723b ("mm: add generic ptdump")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Steven Price <steven.price@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 mm/ptdump.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/ptdump.c
+++ b/mm/ptdump.c
@@ -108,7 +108,7 @@ static int ptdump_pte_entry(pte_t *pte,
 			    unsigned long next, struct mm_walk *walk)
 {
 	struct ptdump_state *st = walk->private;
-	pte_t val = READ_ONCE(*pte);
+	pte_t val = ptep_get(pte);
 
 	if (st->effective_prot)
 		st->effective_prot(st, 4, pte_val(val));



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 073/103] net: Make tcp_allowed_congestion_control readonly in non-init netns
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (71 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 072/103] mm: ptdump: fix build failure Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 074/103] i40e: fix the panic when running bpf in xdpdrv mode Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jonathon Reinhart, David S. Miller

From: Jonathon Reinhart <jonathon.reinhart@gmail.com>

commit 97684f0970f6e112926de631fdd98d9693c7e5c1 upstream.

Currently, tcp_allowed_congestion_control is global and writable;
writing to it in any net namespace will leak into all other net
namespaces.

tcp_available_congestion_control and tcp_allowed_congestion_control are
the only sysctls in ipv4_net_table (the per-netns sysctl table) with a
NULL data pointer; their handlers (proc_tcp_available_congestion_control
and proc_allowed_congestion_control) have no other way of referencing a
struct net. Thus, they operate globally.

Because ipv4_net_table does not use designated initializers, there is no
easy way to fix up this one "bad" table entry. However, the data pointer
updating logic shouldn't be applied to NULL pointers anyway, so we
instead force these entries to be read-only.

These sysctls used to exist in ipv4_table (init-net only), but they were
moved to the per-net ipv4_net_table, presumably without realizing that
tcp_allowed_congestion_control was writable and thus introduced a leak.

Because the intent of that commit was only to know (i.e. read) "which
congestion algorithms are available or allowed", this read-only solution
should be sufficient.

The logic added in recent commit
31c4d2f160eb: ("net: Ensure net namespace isolation of sysctls")
does not and cannot check for NULL data pointers, because
other table entries (e.g. /proc/sys/net/netfilter/nf_log/) have
.data=NULL but use other methods (.extra2) to access the struct net.

Fixes: 9cb8e048e5d9 ("net/ipv4/sysctl: show tcp_{allowed, available}_congestion_control in non-initial netns")
Signed-off-by: Jonathon Reinhart <jonathon.reinhart@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv4/sysctl_net_ipv4.c |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -1369,9 +1369,19 @@ static __net_init int ipv4_sysctl_init_n
 		if (!table)
 			goto err_alloc;
 
-		/* Update the variables to point into the current struct net */
-		for (i = 0; i < ARRAY_SIZE(ipv4_net_table) - 1; i++)
-			table[i].data += (void *)net - (void *)&init_net;
+		for (i = 0; i < ARRAY_SIZE(ipv4_net_table) - 1; i++) {
+			if (table[i].data) {
+				/* Update the variables to point into
+				 * the current struct net
+				 */
+				table[i].data += (void *)net - (void *)&init_net;
+			} else {
+				/* Entries without data pointer are global;
+				 * Make them read-only in non-init_net ns
+				 */
+				table[i].mode &= ~0222;
+			}
+		}
 	}
 
 	net->ipv4.ipv4_hdr = register_net_sysctl(net, "net/ipv4", table);



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 074/103] i40e: fix the panic when running bpf in xdpdrv mode
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (72 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 073/103] net: Make tcp_allowed_congestion_control readonly in non-init netns Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 075/103] ethtool: pause: make sure we init driver stats Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shujin Li, Jason Xing,
	Jesse Brandeburg, Jesper Dangaard Brouer, David S. Miller

From: Jason Xing <xingwanli@kuaishou.com>

commit 4e39a072a6a0fc422ba7da5e4336bdc295d70211 upstream.

Fix this panic by adding more rules to calculate the value of @rss_size_max
which could be used in allocating the queues when bpf is loaded, which,
however, could cause the failure and then trigger the NULL pointer of
vsi->rx_rings. Prio to this fix, the machine doesn't care about how many
cpus are online and then allocates 256 queues on the machine with 32 cpus
online actually.

Once the load of bpf begins, the log will go like this "failed to get
tracking for 256 queues for VSI 0 err -12" and this "setup of MAIN VSI
failed".

Thus, I attach the key information of the crash-log here.

BUG: unable to handle kernel NULL pointer dereference at
0000000000000000
RIP: 0010:i40e_xdp+0xdd/0x1b0 [i40e]
Call Trace:
[2160294.717292]  ? i40e_reconfig_rss_queues+0x170/0x170 [i40e]
[2160294.717666]  dev_xdp_install+0x4f/0x70
[2160294.718036]  dev_change_xdp_fd+0x11f/0x230
[2160294.718380]  ? dev_disable_lro+0xe0/0xe0
[2160294.718705]  do_setlink+0xac7/0xe70
[2160294.719035]  ? __nla_parse+0xed/0x120
[2160294.719365]  rtnl_newlink+0x73b/0x860

Fixes: 41c445ff0f48 ("i40e: main driver core")
Co-developed-by: Shujin Li <lishujin@kuaishou.com>
Signed-off-by: Shujin Li <lishujin@kuaishou.com>
Signed-off-by: Jason Xing <xingwanli@kuaishou.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -11863,6 +11863,7 @@ static int i40e_sw_init(struct i40e_pf *
 {
 	int err = 0;
 	int size;
+	u16 pow;
 
 	/* Set default capability flags */
 	pf->flags = I40E_FLAG_RX_CSUM_ENABLED |
@@ -11881,6 +11882,11 @@ static int i40e_sw_init(struct i40e_pf *
 	pf->rss_table_size = pf->hw.func_caps.rss_table_size;
 	pf->rss_size_max = min_t(int, pf->rss_size_max,
 				 pf->hw.func_caps.num_tx_qp);
+
+	/* find the next higher power-of-2 of num cpus */
+	pow = roundup_pow_of_two(num_online_cpus());
+	pf->rss_size_max = min_t(int, pf->rss_size_max, pow);
+
 	if (pf->hw.func_caps.rss) {
 		pf->flags |= I40E_FLAG_RSS_ENABLED;
 		pf->alloc_rss_size = min_t(int, pf->rss_size_max,



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 075/103] ethtool: pause: make sure we init driver stats
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (73 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 074/103] i40e: fix the panic when running bpf in xdpdrv mode Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 076/103] ia64: remove duplicate entries in generic_defconfig Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jakub Kicinski, David S. Miller

From: Jakub Kicinski <kuba@kernel.org>

commit 16756d3e77ad58cd07e36cbed724aa13ae5a0278 upstream.

The intention was for pause statistics to not be reported
when driver does not have the relevant callback (only
report an empty netlink nest). What happens currently
we report all 0s instead. Make sure statistics are
initialized to "not set" (which is -1) so the dumping
code skips them.

Fixes: 9a27a33027f2 ("ethtool: add standard pause stats")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ethtool/pause.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/net/ethtool/pause.c
+++ b/net/ethtool/pause.c
@@ -38,16 +38,16 @@ static int pause_prepare_data(const stru
 	if (!dev->ethtool_ops->get_pauseparam)
 		return -EOPNOTSUPP;
 
+	ethtool_stats_init((u64 *)&data->pausestat,
+			   sizeof(data->pausestat) / 8);
+
 	ret = ethnl_ops_begin(dev);
 	if (ret < 0)
 		return ret;
 	dev->ethtool_ops->get_pauseparam(dev, &data->pauseparam);
 	if (req_base->flags & ETHTOOL_FLAG_STATS &&
-	    dev->ethtool_ops->get_pause_stats) {
-		ethtool_stats_init((u64 *)&data->pausestat,
-				   sizeof(data->pausestat) / 8);
+	    dev->ethtool_ops->get_pause_stats)
 		dev->ethtool_ops->get_pause_stats(dev, &data->pausestat);
-	}
 	ethnl_ops_complete(dev);
 
 	return 0;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 076/103] ia64: remove duplicate entries in generic_defconfig
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (74 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 075/103] ethtool: pause: make sure we init driver stats Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 077/103] ia64: tools: remove inclusion of ia64-specific version of errno.h header Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Randy Dunlap, Geert Uytterhoeven,
	Christoph Hellwig, Tony Luck, Fenghua Yu, Andrew Morton,
	Linus Torvalds

From: Randy Dunlap <rdunlap@infradead.org>

commit 19d000d93303e05bd7b1326e3de9df05a41b25b5 upstream.

Fix ia64 generic_defconfig duplicate entries, as warned by:

  arch/ia64/configs/generic_defconfig: warning: override: reassigning to symbol ATA:  => 58
  arch/ia64/configs/generic_defconfig: warning: override: reassigning to symbol ATA_PIIX:  => 59

These 2 symbols still have the same value as in the removed lines.

Link: https://lkml.kernel.org/r/20210411020255.18052-1-rdunlap@infradead.org
Fixes: c331649e6371 ("ia64: Use libata instead of the legacy ide driver in defconfigs")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/ia64/configs/generic_defconfig |    2 --
 1 file changed, 2 deletions(-)

--- a/arch/ia64/configs/generic_defconfig
+++ b/arch/ia64/configs/generic_defconfig
@@ -55,8 +55,6 @@ CONFIG_CHR_DEV_SG=m
 CONFIG_SCSI_FC_ATTRS=y
 CONFIG_SCSI_SYM53C8XX_2=y
 CONFIG_SCSI_QLOGIC_1280=y
-CONFIG_ATA=y
-CONFIG_ATA_PIIX=y
 CONFIG_SATA_VITESSE=y
 CONFIG_MD=y
 CONFIG_BLK_DEV_MD=m



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 077/103] ia64: tools: remove inclusion of ia64-specific version of errno.h header
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (75 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 076/103] ia64: remove duplicate entries in generic_defconfig Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 078/103] ibmvnic: avoid calling napi_disable() twice Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, John Paul Adrian Glaubitz,
	Andrew Morton, Linus Torvalds

From: John Paul Adrian Glaubitz <glaubitz () physik ! fu-berlin ! de>

commit 17786fea414393813b56e33a1a01b2dfa03c0915 upstream.

There is no longer an ia64-specific version of the errno.h header below
arch/ia64/include/uapi/asm/, so trying to build tools/bpf fails with:

    CC       /usr/src/linux/tools/bpf/bpftool/btf_dumper.o
  In file included from /usr/src/linux/tools/include/linux/err.h:8,
                   from btf_dumper.c:11:
  /usr/src/linux/tools/include/uapi/asm/errno.h:13:10: fatal error: ../../../arch/ia64/include/uapi/asm/errno.h: No such file or directory
     13 | #include "../../../arch/ia64/include/uapi/asm/errno.h"
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

Thus, just remove the inclusion of the ia64-specific errno.h so that the
build will use the generic errno.h header on this target which was used
there anyway as the ia64-specific errno.h was just a wrapper for the
generic header.

Fixes: c25f867ddd00 ("ia64: remove unneeded uapi asm-generic wrappers")
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 tools/include/uapi/asm/errno.h |    2 --
 1 file changed, 2 deletions(-)

--- a/tools/include/uapi/asm/errno.h
+++ b/tools/include/uapi/asm/errno.h
@@ -9,8 +9,6 @@
 #include "../../../arch/alpha/include/uapi/asm/errno.h"
 #elif defined(__mips__)
 #include "../../../arch/mips/include/uapi/asm/errno.h"
-#elif defined(__ia64__)
-#include "../../../arch/ia64/include/uapi/asm/errno.h"
 #elif defined(__xtensa__)
 #include "../../../arch/xtensa/include/uapi/asm/errno.h"
 #else



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 078/103] ibmvnic: avoid calling napi_disable() twice
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (76 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 077/103] ia64: tools: remove inclusion of ia64-specific version of errno.h header Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 079/103] ibmvnic: remove duplicate napi_schedule call in do_reset function Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Falcon, Lijun Pan, David S. Miller

From: Lijun Pan <lijunp213@gmail.com>

commit 0775ebc4cf8554bdcd2c212669a0868ab68df5c0 upstream.

__ibmvnic_open calls napi_disable without checking whether NAPI polling
has already been disabled or not. This could cause napi_disable
being called twice, which could generate deadlock. For example,
the first napi_disable will spin until NAPI_STATE_SCHED is cleared
by napi_complete_done, then set it again.
When napi_disable is called the second time, it will loop infinitely
because no dev->poll will be running to clear NAPI_STATE_SCHED.

To prevent above scenario from happening, call ibmvnic_napi_disable()
which checks if napi is disabled or not before calling napi_disable.

Fixes: bfc32f297337 ("ibmvnic: Move resource initialization to its own routine")
Suggested-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: Lijun Pan <lijunp213@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/ibm/ibmvnic.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1159,8 +1159,7 @@ static int __ibmvnic_open(struct net_dev
 
 	rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_UP);
 	if (rc) {
-		for (i = 0; i < adapter->req_rx_queues; i++)
-			napi_disable(&adapter->napi[i]);
+		ibmvnic_napi_disable(adapter);
 		release_resources(adapter);
 		return rc;
 	}



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 079/103] ibmvnic: remove duplicate napi_schedule call in do_reset function
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (77 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 078/103] ibmvnic: avoid calling napi_disable() twice Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 080/103] ibmvnic: remove duplicate napi_schedule call in open function Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Lijun Pan, David S. Miller

From: Lijun Pan <lijunp213@gmail.com>

commit d3a6abccbd272aea7dc2c6f984bb5a2c11278e44 upstream.

During adapter reset, do_reset/do_hard_reset calls ibmvnic_open(),
which will calls napi_schedule if previous state is VNIC_CLOSED
(i.e, the reset case, and "ifconfig down" case). So there is no need
for do_reset to call napi_schedule again at the end of the function
though napi_schedule will neglect the request if napi is already
scheduled.

Fixes: ed651a10875f ("ibmvnic: Updated reset handling")
Signed-off-by: Lijun Pan <lijunp213@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/ibm/ibmvnic.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1941,7 +1941,7 @@ static int do_reset(struct ibmvnic_adapt
 	u64 old_num_rx_queues, old_num_tx_queues;
 	u64 old_num_rx_slots, old_num_tx_slots;
 	struct net_device *netdev = adapter->netdev;
-	int i, rc;
+	int rc;
 
 	netdev_dbg(adapter->netdev,
 		   "[S:%d FOP:%d] Reset reason %d, reset_state %d\n",
@@ -2087,10 +2087,6 @@ static int do_reset(struct ibmvnic_adapt
 	/* refresh device's multicast list */
 	ibmvnic_set_multi(netdev);
 
-	/* kick napi */
-	for (i = 0; i < adapter->req_rx_queues; i++)
-		napi_schedule(&adapter->napi[i]);
-
 	if (adapter->reset_reason == VNIC_RESET_FAILOVER ||
 	    adapter->reset_reason == VNIC_RESET_MOBILITY) {
 		call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 080/103] ibmvnic: remove duplicate napi_schedule call in open function
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (78 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 079/103] ibmvnic: remove duplicate napi_schedule call in do_reset function Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 081/103] ch_ktls: Fix kernel panic Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Lijun Pan, David S. Miller

From: Lijun Pan <lijunp213@gmail.com>

commit 7c451f3ef676c805a4b77a743a01a5c21a250a73 upstream.

Remove the unnecessary napi_schedule() call in __ibmvnic_open() since
interrupt_rx() calls napi_schedule_prep/__napi_schedule during every
receive interrupt.

Fixes: ed651a10875f ("ibmvnic: Updated reset handling")
Signed-off-by: Lijun Pan <lijunp213@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/ibm/ibmvnic.c |    5 -----
 1 file changed, 5 deletions(-)

--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1166,11 +1166,6 @@ static int __ibmvnic_open(struct net_dev
 
 	netif_tx_start_all_queues(netdev);
 
-	if (prev_state == VNIC_CLOSED) {
-		for (i = 0; i < adapter->req_rx_queues; i++)
-			napi_schedule(&adapter->napi[i]);
-	}
-
 	adapter->state = VNIC_OPEN;
 	return rc;
 }



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 081/103] ch_ktls: Fix kernel panic
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (79 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 080/103] ibmvnic: remove duplicate napi_schedule call in open function Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 082/103] ch_ktls: fix device connection close Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vinay Kumar Yadav, Rohit Maheshwari,
	David S. Miller

From: Vinay Kumar Yadav <vinay.yadav@chelsio.com>

commit 1a73e427b824133940c2dd95ebe26b6dce1cbf10 upstream.

Taking page refcount is not ideal and causes kernel panic
sometimes. It's better to take tx_ctx lock for the complete
skb transmit, to avoid page cleanup if ACK received in middle.

Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c |   24 ++--------
 1 file changed, 5 insertions(+), 19 deletions(-)

--- a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
@@ -2015,12 +2015,11 @@ static int chcr_ktls_xmit(struct sk_buff
 	 * we will send the complete record again.
 	 */
 
+	spin_lock_irqsave(&tx_ctx->base.lock, flags);
+
 	do {
-		int i;
 
 		cxgb4_reclaim_completed_tx(adap, &q->q, true);
-		/* lock taken */
-		spin_lock_irqsave(&tx_ctx->base.lock, flags);
 		/* fetch the tls record */
 		record = tls_get_record(&tx_ctx->base, tcp_seq,
 					&tx_info->record_no);
@@ -2079,11 +2078,11 @@ static int chcr_ktls_xmit(struct sk_buff
 						    tls_end_offset, skb_offset,
 						    0);
 
-			spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
 			if (ret) {
 				/* free the refcount taken earlier */
 				if (tls_end_offset < data_len)
 					dev_kfree_skb_any(skb);
+				spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
 				goto out;
 			}
 
@@ -2093,16 +2092,6 @@ static int chcr_ktls_xmit(struct sk_buff
 			continue;
 		}
 
-		/* increase page reference count of the record, so that there
-		 * won't be any chance of page free in middle if in case stack
-		 * receives ACK and try to delete the record.
-		 */
-		for (i = 0; i < record->num_frags; i++)
-			__skb_frag_ref(&record->frags[i]);
-		/* lock cleared */
-		spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
-
-
 		/* if a tls record is finishing in this SKB */
 		if (tls_end_offset <= data_len) {
 			ret = chcr_end_part_handler(tx_info, skb, record,
@@ -2127,13 +2116,9 @@ static int chcr_ktls_xmit(struct sk_buff
 			data_len = 0;
 		}
 
-		/* clear the frag ref count which increased locally before */
-		for (i = 0; i < record->num_frags; i++) {
-			/* clear the frag ref count */
-			__skb_frag_unref(&record->frags[i]);
-		}
 		/* if any failure, come out from the loop. */
 		if (ret) {
+			spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
 			if (th->fin)
 				dev_kfree_skb_any(skb);
 
@@ -2148,6 +2133,7 @@ static int chcr_ktls_xmit(struct sk_buff
 
 	} while (data_len > 0);
 
+	spin_unlock_irqrestore(&tx_ctx->base.lock, flags);
 	atomic64_inc(&port_stats->ktls_tx_encrypted_packets);
 	atomic64_add(skb_data_len, &port_stats->ktls_tx_encrypted_bytes);
 



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 082/103] ch_ktls: fix device connection close
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (80 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 081/103] ch_ktls: Fix kernel panic Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 083/103] ch_ktls: tcb close causes tls connection failure Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vinay Kumar Yadav, Rohit Maheshwari,
	David S. Miller

From: Vinay Kumar Yadav <vinay.yadav@chelsio.com>

commit bc16efd2430652f894ae34b1de5eccc3bf0d2810 upstream.

When sge queue is full and chcr_ktls_xmit_wr_complete()
returns failure, skb is not freed if it is not the last tls record in
this skb, causes refcount never gets freed and tls_dev_del()
never gets called on this connection.

Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
@@ -1740,7 +1740,9 @@ static int chcr_end_part_handler(struct
 				 struct sge_eth_txq *q, u32 skb_offset,
 				 u32 tls_end_offset, bool last_wr)
 {
+	bool free_skb_if_tx_fails = false;
 	struct sk_buff *nskb = NULL;
+
 	/* check if it is a complete record */
 	if (tls_end_offset == record->len) {
 		nskb = skb;
@@ -1763,6 +1765,8 @@ static int chcr_end_part_handler(struct
 
 		if (last_wr)
 			dev_kfree_skb_any(skb);
+		else
+			free_skb_if_tx_fails = true;
 
 		last_wr = true;
 
@@ -1774,6 +1778,8 @@ static int chcr_end_part_handler(struct
 				       record->num_frags,
 				       (last_wr && tcp_push_no_fin),
 				       mss)) {
+		if (free_skb_if_tx_fails)
+			dev_kfree_skb_any(skb);
 		goto out;
 	}
 	tx_info->prev_seq = record->end_seq;



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 083/103] ch_ktls: tcb close causes tls connection failure
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (81 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 082/103] ch_ktls: fix device connection close Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 084/103] ch_ktls: do not send snd_una update to TCB in middle Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vinay Kumar Yadav, Rohit Maheshwari,
	David S. Miller

From: Vinay Kumar Yadav <vinay.yadav@chelsio.com>

commit 21d8c25e3f4b9052a471ced8f47b531956eb9963 upstream.

HW doesn't need marking TCB closed. This TCB state change
sometimes causes problem to the new connection which gets
the same tid.

Fixes: 34aba2c45024 ("cxgb4/chcr : Register to tls add and del callback")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c |   19 ----------
 1 file changed, 19 deletions(-)

--- a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
@@ -355,18 +355,6 @@ static int chcr_set_tcb_field(struct chc
 }
 
 /*
- * chcr_ktls_mark_tcb_close: mark tcb state to CLOSE
- * @tx_info - driver specific tls info.
- * return: NET_TX_OK/NET_XMIT_DROP.
- */
-static int chcr_ktls_mark_tcb_close(struct chcr_ktls_info *tx_info)
-{
-	return chcr_set_tcb_field(tx_info, TCB_T_STATE_W,
-				  TCB_T_STATE_V(TCB_T_STATE_M),
-				  CHCR_TCB_STATE_CLOSED, 1);
-}
-
-/*
  * chcr_ktls_dev_del:  call back for tls_dev_del.
  * Remove the tid and l2t entry and close the connection.
  * it per connection basis.
@@ -400,8 +388,6 @@ static void chcr_ktls_dev_del(struct net
 
 	/* clear tid */
 	if (tx_info->tid != -1) {
-		/* clear tcb state and then release tid */
-		chcr_ktls_mark_tcb_close(tx_info);
 		cxgb4_remove_tid(&tx_info->adap->tids, tx_info->tx_chan,
 				 tx_info->tid, tx_info->ip_family);
 	}
@@ -579,7 +565,6 @@ static int chcr_ktls_dev_add(struct net_
 	return 0;
 
 free_tid:
-	chcr_ktls_mark_tcb_close(tx_info);
 #if IS_ENABLED(CONFIG_IPV6)
 	/* clear clip entry */
 	if (tx_info->ip_family == AF_INET6)
@@ -677,10 +662,6 @@ static int chcr_ktls_cpl_act_open_rpl(st
 	if (tx_info->pending_close) {
 		spin_unlock(&tx_info->lock);
 		if (!status) {
-			/* it's a late success, tcb status is establised,
-			 * mark it close.
-			 */
-			chcr_ktls_mark_tcb_close(tx_info);
 			cxgb4_remove_tid(&tx_info->adap->tids, tx_info->tx_chan,
 					 tid, tx_info->ip_family);
 		}



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 084/103] ch_ktls: do not send snd_una update to TCB in middle
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (82 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 083/103] ch_ktls: tcb close causes tls connection failure Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 085/103] gro: ensure frag0 meets IP header alignment Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vinay Kumar Yadav, Rohit Maheshwari,
	David S. Miller

From: Vinay Kumar Yadav <vinay.yadav@chelsio.com>

commit e8a4155567b3c903f49cbf89b8017e9cc22c4fe4 upstream.

snd_una update should not be done when the same skb is being
sent out.chcr_short_record_handler() sends it again even
though SND_UNA update is already sent for the skb in
chcr_ktls_xmit(), which causes mismatch in un-acked
TCP seq number, later causes problem in sending out
complete record.

Fixes: 429765a149f1 ("chcr: handle partial end part of a record")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c |   53 ----------
 1 file changed, 53 deletions(-)

--- a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
@@ -1650,54 +1650,6 @@ static void chcr_ktls_copy_record_in_skb
 }
 
 /*
- * chcr_ktls_update_snd_una:  Reset the SEND_UNA. It will be done to avoid
- * sending the same segment again. It will discard the segment which is before
- * the current tx max.
- * @tx_info - driver specific tls info.
- * @q - TX queue.
- * return: NET_TX_OK/NET_XMIT_DROP.
- */
-static int chcr_ktls_update_snd_una(struct chcr_ktls_info *tx_info,
-				    struct sge_eth_txq *q)
-{
-	struct fw_ulptx_wr *wr;
-	unsigned int ndesc;
-	int credits;
-	void *pos;
-	u32 len;
-
-	len = sizeof(*wr) + roundup(CHCR_SET_TCB_FIELD_LEN, 16);
-	ndesc = DIV_ROUND_UP(len, 64);
-
-	credits = chcr_txq_avail(&q->q) - ndesc;
-	if (unlikely(credits < 0)) {
-		chcr_eth_txq_stop(q);
-		return NETDEV_TX_BUSY;
-	}
-
-	pos = &q->q.desc[q->q.pidx];
-
-	wr = pos;
-	/* ULPTX wr */
-	wr->op_to_compl = htonl(FW_WR_OP_V(FW_ULPTX_WR));
-	wr->cookie = 0;
-	/* fill len in wr field */
-	wr->flowid_len16 = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(len, 16)));
-
-	pos += sizeof(*wr);
-
-	pos = chcr_write_cpl_set_tcb_ulp(tx_info, q, tx_info->tid, pos,
-					 TCB_SND_UNA_RAW_W,
-					 TCB_SND_UNA_RAW_V(TCB_SND_UNA_RAW_M),
-					 TCB_SND_UNA_RAW_V(0), 0);
-
-	chcr_txq_advance(&q->q, ndesc);
-	cxgb4_ring_tx_db(tx_info->adap, &q->q, ndesc);
-
-	return 0;
-}
-
-/*
  * chcr_end_part_handler: This handler will handle the record which
  * is complete or if record's end part is received. T6 adapter has a issue that
  * it can't send out TAG with partial record so if its an end part then we have
@@ -1897,11 +1849,6 @@ static int chcr_short_record_handler(str
 			/* reset tcp_seq as per the prior_data_required len */
 			tcp_seq -= prior_data_len;
 		}
-		/* reset snd una, so the middle record won't send the already
-		 * sent part.
-		 */
-		if (chcr_ktls_update_snd_una(tx_info, q))
-			goto out;
 		atomic64_inc(&tx_info->adap->ch_ktls_stats.ktls_tx_middle_pkts);
 	} else {
 		atomic64_inc(&tx_info->adap->ch_ktls_stats.ktls_tx_start_pkts);



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 085/103] gro: ensure frag0 meets IP header alignment
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (83 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 084/103] ch_ktls: do not send snd_una update to TCB in middle Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 086/103] ARM: OMAP2+: Fix warning for omap_init_time_of() Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eric Dumazet, Guenter Roeck,
	Xuan Zhuo, Michael S. Tsirkin, Jason Wang, David S. Miller

From: Eric Dumazet <edumazet@google.com>

commit 38ec4944b593fd90c5ef42aaaa53e66ae5769d04 upstream.

After commit 0f6925b3e8da ("virtio_net: Do not pull payload in skb->head")
Guenter Roeck reported one failure in his tests using sh architecture.

After much debugging, we have been able to spot silent unaligned accesses
in inet_gro_receive()

The issue at hand is that upper networking stacks assume their header
is word-aligned. Low level drivers are supposed to reserve NET_IP_ALIGN
bytes before the Ethernet header to make that happen.

This patch hardens skb_gro_reset_offset() to not allow frag0 fast-path
if the fragment is not properly aligned.

Some arches like x86, arm64 and powerpc do not care and define NET_IP_ALIGN
as 0, this extra check will be a NOP for them.

Note that if frag0 is not used, GRO will call pskb_may_pull()
as many times as needed to pull network and transport headers.

Fixes: 0f6925b3e8da ("virtio_net: Do not pull payload in skb->head")
Fixes: 78a478d0efd9 ("gro: Inline skb_gro_header and cache frag0 virtual address")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/core/dev.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5867,7 +5867,8 @@ static void skb_gro_reset_offset(struct
 	NAPI_GRO_CB(skb)->frag0_len = 0;
 
 	if (!skb_headlen(skb) && pinfo->nr_frags &&
-	    !PageHighMem(skb_frag_page(frag0))) {
+	    !PageHighMem(skb_frag_page(frag0)) &&
+	    (!NET_IP_ALIGN || !(skb_frag_off(frag0) & 3))) {
 		NAPI_GRO_CB(skb)->frag0 = skb_frag_address(frag0);
 		NAPI_GRO_CB(skb)->frag0_len = min_t(unsigned int,
 						    skb_frag_size(frag0),



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 086/103] ARM: OMAP2+: Fix warning for omap_init_time_of()
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (84 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 085/103] gro: ensure frag0 meets IP header alignment Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 087/103] ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range() Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, kernel test robot, Tony Lindgren,
	Sasha Levin

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit a3efe3f6d0eb64363f74af4b0e8ba6d19415cef2 ]

Fix warning: no previous prototype for 'omap_init_time_of'.

Fixes: e69b4e1a7577 ("ARM: OMAP2+: Add omap_init_time_of()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/mach-omap2/board-generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 7290f033fd2d..1610c567a6a3 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -33,7 +33,7 @@ static void __init __maybe_unused omap_generic_init(void)
 }
 
 /* Clocks are needed early, see drivers/clocksource for the rest */
-void __init __maybe_unused omap_init_time_of(void)
+static void __init __maybe_unused omap_init_time_of(void)
 {
 	omap_clk_init();
 	timer_probe();
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 087/103] ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range()
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (85 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 086/103] ARM: OMAP2+: Fix warning for omap_init_time_of() Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 088/103] ARM: footbridge: fix PCI interrupt mapping Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vladimir Murzin, Mike Rapoport,
	Russell King, Sasha Levin

From: Vladimir Murzin <vladimir.murzin@arm.com>

[ Upstream commit 45c2f70cba3a7eff34574103b2e2b901a5f771aa ]

for_each_mem_range() uses a loop variable, yet looking into code it is
not just iteration counter but more complex entity which encodes
information about memblock. Thus condition i == 0 looks fragile.
Indeed, it broke boot of R-class platforms since it never took i == 0
path (due to i was set to 1). Fix that with restoring original flag
check.

Fixes: b10d6bca8720 ("arch, drivers: replace for_each_membock() with for_each_mem_range()")
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/mm/pmsa-v7.c | 4 +++-
 arch/arm/mm/pmsa-v8.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/pmsa-v7.c b/arch/arm/mm/pmsa-v7.c
index 88950e41a3a9..59d916ccdf25 100644
--- a/arch/arm/mm/pmsa-v7.c
+++ b/arch/arm/mm/pmsa-v7.c
@@ -235,6 +235,7 @@ void __init pmsav7_adjust_lowmem_bounds(void)
 	phys_addr_t mem_end;
 	phys_addr_t reg_start, reg_end;
 	unsigned int mem_max_regions;
+	bool first = true;
 	int num;
 	u64 i;
 
@@ -263,7 +264,7 @@ void __init pmsav7_adjust_lowmem_bounds(void)
 #endif
 
 	for_each_mem_range(i, &reg_start, &reg_end) {
-		if (i == 0) {
+		if (first) {
 			phys_addr_t phys_offset = PHYS_OFFSET;
 
 			/*
@@ -275,6 +276,7 @@ void __init pmsav7_adjust_lowmem_bounds(void)
 			mem_start = reg_start;
 			mem_end = reg_end;
 			specified_mem_size = mem_end - mem_start;
+			first = false;
 		} else {
 			/*
 			 * memblock auto merges contiguous blocks, remove
diff --git a/arch/arm/mm/pmsa-v8.c b/arch/arm/mm/pmsa-v8.c
index 2de019f7503e..8359748a19a1 100644
--- a/arch/arm/mm/pmsa-v8.c
+++ b/arch/arm/mm/pmsa-v8.c
@@ -95,10 +95,11 @@ void __init pmsav8_adjust_lowmem_bounds(void)
 {
 	phys_addr_t mem_end;
 	phys_addr_t reg_start, reg_end;
+	bool first = true;
 	u64 i;
 
 	for_each_mem_range(i, &reg_start, &reg_end) {
-		if (i == 0) {
+		if (first) {
 			phys_addr_t phys_offset = PHYS_OFFSET;
 
 			/*
@@ -107,6 +108,7 @@ void __init pmsav8_adjust_lowmem_bounds(void)
 			if (reg_start != phys_offset)
 				panic("First memory bank must be contiguous from PHYS_OFFSET");
 			mem_end = reg_end;
+			first = false;
 		} else {
 			/*
 			 * memblock auto merges contiguous blocks, remove
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 088/103] ARM: footbridge: fix PCI interrupt mapping
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (86 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 087/103] ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range() Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 089/103] ARM: OMAP2+: Fix uninitialized sr_inst Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Russell King, Sasha Levin

From: Russell King <rmk+kernel@armlinux.org.uk>

[ Upstream commit 30e3b4f256b4e366a61658c294f6a21b8626dda7 ]

Since commit 30fdfb929e82 ("PCI: Add a call to pci_assign_irq() in
pci_device_probe()"), the PCI code will call the IRQ mapping function
whenever a PCI driver is probed. If these are marked as __init, this
causes an oops if a PCI driver is loaded or bound after the kernel has
initialised.

Fixes: 30fdfb929e82 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/mach-footbridge/cats-pci.c      | 4 ++--
 arch/arm/mach-footbridge/ebsa285-pci.c   | 4 ++--
 arch/arm/mach-footbridge/netwinder-pci.c | 2 +-
 arch/arm/mach-footbridge/personal-pci.c  | 5 ++---
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-footbridge/cats-pci.c b/arch/arm/mach-footbridge/cats-pci.c
index 0b2fd7e2e9b4..90b1e9be430e 100644
--- a/arch/arm/mach-footbridge/cats-pci.c
+++ b/arch/arm/mach-footbridge/cats-pci.c
@@ -15,14 +15,14 @@
 #include <asm/mach-types.h>
 
 /* cats host-specific stuff */
-static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
+static int irqmap_cats[] = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
 
 static u8 cats_no_swizzle(struct pci_dev *dev, u8 *pin)
 {
 	return 0;
 }
 
-static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+static int cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	if (dev->irq >= 255)
 		return -1;	/* not a valid interrupt. */
diff --git a/arch/arm/mach-footbridge/ebsa285-pci.c b/arch/arm/mach-footbridge/ebsa285-pci.c
index 6f28aaa9ca79..c3f280d08fa7 100644
--- a/arch/arm/mach-footbridge/ebsa285-pci.c
+++ b/arch/arm/mach-footbridge/ebsa285-pci.c
@@ -14,9 +14,9 @@
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
 
-static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
+static int irqmap_ebsa285[] = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
 
-static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+static int ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	if (dev->vendor == PCI_VENDOR_ID_CONTAQ &&
 	    dev->device == PCI_DEVICE_ID_CONTAQ_82C693)
diff --git a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footbridge/netwinder-pci.c
index 9473aa0305e5..e8304392074b 100644
--- a/arch/arm/mach-footbridge/netwinder-pci.c
+++ b/arch/arm/mach-footbridge/netwinder-pci.c
@@ -18,7 +18,7 @@
  * We now use the slot ID instead of the device identifiers to select
  * which interrupt is routed where.
  */
-static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+static int netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	switch (slot) {
 	case 0:  /* host bridge */
diff --git a/arch/arm/mach-footbridge/personal-pci.c b/arch/arm/mach-footbridge/personal-pci.c
index 4391e433a4b2..9d19aa98a663 100644
--- a/arch/arm/mach-footbridge/personal-pci.c
+++ b/arch/arm/mach-footbridge/personal-pci.c
@@ -14,13 +14,12 @@
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
 
-static int irqmap_personal_server[] __initdata = {
+static int irqmap_personal_server[] = {
 	IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0,
 	IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI
 };
 
-static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot,
-	u8 pin)
+static int personal_server_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	unsigned char line;
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 089/103] ARM: OMAP2+: Fix uninitialized sr_inst
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (87 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 088/103] ARM: footbridge: fix PCI interrupt mapping Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 090/103] arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, kernel test robot, Tony Lindgren,
	Sasha Levin

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit fc85dc42a38405099f97aa2af709fe9504a82508 ]

Fix uninitialized sr_inst.

Fixes: fbfa463be8dc ("ARM: OMAP2+: Fix smartreflex init regression after dropping legacy data")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/mach-omap2/sr_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c
index 17b66f0d0dee..605925684b0a 100644
--- a/arch/arm/mach-omap2/sr_device.c
+++ b/arch/arm/mach-omap2/sr_device.c
@@ -188,7 +188,7 @@ static const char * const dra7_sr_instances[] = {
 
 int __init omap_devinit_smartreflex(void)
 {
-	const char * const *sr_inst;
+	const char * const *sr_inst = NULL;
 	int i, nr_sr = 0;
 
 	if (soc_is_omap44xx()) {
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 090/103] arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (88 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 089/103] ARM: OMAP2+: Fix uninitialized sr_inst Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 091/103] arm64: dts: allwinner: h6: beelink-gs1: Remove ext. 32 kHz osc reference Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ashley, Andre Przywara,
	Maxime Ripard, Sasha Levin

From: Andre Przywara <andre.przywara@arm.com>

[ Upstream commit 3dd4ce4185df6798dcdcc3669bddb35899d7d5e1 ]

Commit 941432d00768 ("arm64: dts: allwinner: Drop non-removable from
SoPine/LTS SD card") enabled the card detect GPIO for the SOPine module,
along the way with the Pine64-LTS, which share the same base .dtsi.

However while both boards indeed have a working CD GPIO on PF6, the
polarity is different: the SOPine modules uses a "push-pull" socket,
which has an active-high switch, while the Pine64-LTS use the more
traditional push-push socket and the common active-low switch.

Fix the polarity in the sopine.dtsi, and overwrite it in the LTS
board .dts, to make the SD card work again on systems using SOPine
modules.

Fixes: 941432d00768 ("arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card")
Reported-by: Ashley <contact@victorianfox.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20210316144219.5973-1-andre.przywara@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi    | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
index 302e24be0a31..a1f621b388fe 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
@@ -8,3 +8,7 @@
 	compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
 		     "allwinner,sun50i-a64";
 };
+
+&mmc0 {
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 push-push switch */
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
index 3402cec87035..df62044ff7a7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
@@ -34,7 +34,7 @@
 	vmmc-supply = <&reg_dcdc1>;
 	disable-wp;
 	bus-width = <4>;
-	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 push-pull switch */
 	status = "okay";
 };
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 091/103] arm64: dts: allwinner: h6: beelink-gs1: Remove ext. 32 kHz osc reference
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (89 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 090/103] arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 092/103] bpf: Use correct permission flag for mixed signed bounds arithmetic Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jernej Skrabec,
	Clément Péron, Maxime Ripard, Sasha Levin

From: Jernej Skrabec <jernej.skrabec@siol.net>

[ Upstream commit 7a2f6e69e9c1060a7a09c1f8322ccb8d942b3078 ]

Although every Beelink GS1 seems to have external 32768 Hz oscillator,
it works only on one from four tested. There are more reports of RTC
issues elsewhere, like Armbian forum.

One Beelink GS1 owner read RTC osc status register on Android which
shipped with the box. Reported value indicated problems with external
oscillator.

In order to fix RTC and related issues (HDMI-CEC and suspend/resume with
Crust) on all boards, switch to internal oscillator.

Fixes: 32507b868119 ("arm64: dts: allwinner: h6: Move ext. oscillator to board DTs")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Tested-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20210330184218.279738-1-jernej.skrabec@siol.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 7c9dbde645b5..e8163c572dab 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -289,10 +289,6 @@
 	vcc-pm-supply = <&reg_aldo1>;
 };
 
-&rtc {
-	clocks = <&ext_osc32k>;
-};
-
 &spdif {
 	status = "okay";
 };
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 092/103] bpf: Use correct permission flag for mixed signed bounds arithmetic
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (90 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 091/103] arm64: dts: allwinner: h6: beelink-gs1: Remove ext. 32 kHz osc reference Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 093/103] KVM: VMX: Convert vcpu_vmx.exit_reason to a union Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daniel Borkmann, John Fastabend,
	Alexei Starovoitov, Sasha Levin

From: Daniel Borkmann <daniel@iogearbox.net>

[ Upstream commit 9601148392520e2e134936e76788fc2a6371e7be ]

We forbid adding unknown scalars with mixed signed bounds due to the
spectre v1 masking mitigation. Hence this also needs bypass_spec_v1
flag instead of allow_ptr_leaks.

Fixes: 2c78ee898d8f ("bpf: Implement CAP_BPF")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/bpf/verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 12cd2997f982..2eaefd9c4152 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -5522,7 +5522,7 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
 			dst, reg_type_str[ptr_reg->type]);
 		return -EACCES;
 	case PTR_TO_MAP_VALUE:
-		if (!env->allow_ptr_leaks && !known && (smin_val < 0) != (smax_val < 0)) {
+		if (!env->env->bypass_spec_v1 && !known && (smin_val < 0) != (smax_val < 0)) {
 			verbose(env, "R%d has unknown scalar with mixed signed bounds, pointer arithmetic with it prohibited for !root\n",
 				off_reg == dst_reg ? dst : src);
 			return -EACCES;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 093/103] KVM: VMX: Convert vcpu_vmx.exit_reason to a union
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (91 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 092/103] bpf: Use correct permission flag for mixed signed bounds arithmetic Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 094/103] KVM: VMX: Dont use vcpu->run->internal.ndata as an array index Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Xiaoyao Li, Sean Christopherson,
	Chenyi Qiang, Paolo Bonzini, Sasha Levin

From: Sean Christopherson <sean.j.christopherson@intel.com>

[ Upstream commit 8e53324021645f820a01bf8aa745711c802c8542 ]

Convert vcpu_vmx.exit_reason from a u32 to a union (of size u32).  The
full VM_EXIT_REASON field is comprised of a 16-bit basic exit reason in
bits 15:0, and single-bit modifiers in bits 31:16.

Historically, KVM has only had to worry about handling the "failed
VM-Entry" modifier, which could only be set in very specific flows and
required dedicated handling.  I.e. manually stripping the FAILED_VMENTRY
bit was a somewhat viable approach.  But even with only a single bit to
worry about, KVM has had several bugs related to comparing a basic exit
reason against the full exit reason store in vcpu_vmx.

Upcoming Intel features, e.g. SGX, will add new modifier bits that can
be set on more or less any VM-Exit, as opposed to the significantly more
restricted FAILED_VMENTRY, i.e. correctly handling everything in one-off
flows isn't scalable.  Tracking exit reason in a union forces code to
explicitly choose between consuming the full exit reason and the basic
exit, and is a convenient way to document and access the modifiers.

No functional change intended.

Cc: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
Message-Id: <20201106090315.18606-2-chenyi.qiang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/kvm/vmx/nested.c | 42 +++++++++++++++---------
 arch/x86/kvm/vmx/vmx.c    | 68 ++++++++++++++++++++-------------------
 arch/x86/kvm/vmx/vmx.h    | 25 +++++++++++++-
 3 files changed, 86 insertions(+), 49 deletions(-)

diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index f3eca4526778..15532feb19f1 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -3329,7 +3329,11 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
 	struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
 	enum vm_entry_failure_code entry_failure_code;
 	bool evaluate_pending_interrupts;
-	u32 exit_reason, failed_index;
+	union vmx_exit_reason exit_reason = {
+		.basic = EXIT_REASON_INVALID_STATE,
+		.failed_vmentry = 1,
+	};
+	u32 failed_index;
 
 	if (kvm_check_request(KVM_REQ_TLB_FLUSH_CURRENT, vcpu))
 		kvm_vcpu_flush_tlb_current(vcpu);
@@ -3381,7 +3385,7 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
 
 		if (nested_vmx_check_guest_state(vcpu, vmcs12,
 						 &entry_failure_code)) {
-			exit_reason = EXIT_REASON_INVALID_STATE;
+			exit_reason.basic = EXIT_REASON_INVALID_STATE;
 			vmcs12->exit_qualification = entry_failure_code;
 			goto vmentry_fail_vmexit;
 		}
@@ -3392,7 +3396,7 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
 		vcpu->arch.tsc_offset += vmcs12->tsc_offset;
 
 	if (prepare_vmcs02(vcpu, vmcs12, &entry_failure_code)) {
-		exit_reason = EXIT_REASON_INVALID_STATE;
+		exit_reason.basic = EXIT_REASON_INVALID_STATE;
 		vmcs12->exit_qualification = entry_failure_code;
 		goto vmentry_fail_vmexit_guest_mode;
 	}
@@ -3402,7 +3406,7 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
 						   vmcs12->vm_entry_msr_load_addr,
 						   vmcs12->vm_entry_msr_load_count);
 		if (failed_index) {
-			exit_reason = EXIT_REASON_MSR_LOAD_FAIL;
+			exit_reason.basic = EXIT_REASON_MSR_LOAD_FAIL;
 			vmcs12->exit_qualification = failed_index;
 			goto vmentry_fail_vmexit_guest_mode;
 		}
@@ -3470,7 +3474,7 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
 		return NVMX_VMENTRY_VMEXIT;
 
 	load_vmcs12_host_state(vcpu, vmcs12);
-	vmcs12->vm_exit_reason = exit_reason | VMX_EXIT_REASONS_FAILED_VMENTRY;
+	vmcs12->vm_exit_reason = exit_reason.full;
 	if (enable_shadow_vmcs || vmx->nested.hv_evmcs)
 		vmx->nested.need_vmcs12_to_shadow_sync = true;
 	return NVMX_VMENTRY_VMEXIT;
@@ -5533,7 +5537,12 @@ static int handle_vmfunc(struct kvm_vcpu *vcpu)
 	return kvm_skip_emulated_instruction(vcpu);
 
 fail:
-	nested_vmx_vmexit(vcpu, vmx->exit_reason,
+	/*
+	 * This is effectively a reflected VM-Exit, as opposed to a synthesized
+	 * nested VM-Exit.  Pass the original exit reason, i.e. don't hardcode
+	 * EXIT_REASON_VMFUNC as the exit reason.
+	 */
+	nested_vmx_vmexit(vcpu, vmx->exit_reason.full,
 			  vmx_get_intr_info(vcpu),
 			  vmx_get_exit_qual(vcpu));
 	return 1;
@@ -5601,7 +5610,8 @@ static bool nested_vmx_exit_handled_io(struct kvm_vcpu *vcpu,
  * MSR bitmap. This may be the case even when L0 doesn't use MSR bitmaps.
  */
 static bool nested_vmx_exit_handled_msr(struct kvm_vcpu *vcpu,
-	struct vmcs12 *vmcs12, u32 exit_reason)
+					struct vmcs12 *vmcs12,
+					union vmx_exit_reason exit_reason)
 {
 	u32 msr_index = kvm_rcx_read(vcpu);
 	gpa_t bitmap;
@@ -5615,7 +5625,7 @@ static bool nested_vmx_exit_handled_msr(struct kvm_vcpu *vcpu,
 	 * First we need to figure out which of the four to use:
 	 */
 	bitmap = vmcs12->msr_bitmap;
-	if (exit_reason == EXIT_REASON_MSR_WRITE)
+	if (exit_reason.basic == EXIT_REASON_MSR_WRITE)
 		bitmap += 2048;
 	if (msr_index >= 0xc0000000) {
 		msr_index -= 0xc0000000;
@@ -5752,11 +5762,12 @@ static bool nested_vmx_exit_handled_mtf(struct vmcs12 *vmcs12)
  * Return true if L0 wants to handle an exit from L2 regardless of whether or not
  * L1 wants the exit.  Only call this when in is_guest_mode (L2).
  */
-static bool nested_vmx_l0_wants_exit(struct kvm_vcpu *vcpu, u32 exit_reason)
+static bool nested_vmx_l0_wants_exit(struct kvm_vcpu *vcpu,
+				     union vmx_exit_reason exit_reason)
 {
 	u32 intr_info;
 
-	switch ((u16)exit_reason) {
+	switch ((u16)exit_reason.basic) {
 	case EXIT_REASON_EXCEPTION_NMI:
 		intr_info = vmx_get_intr_info(vcpu);
 		if (is_nmi(intr_info))
@@ -5812,12 +5823,13 @@ static bool nested_vmx_l0_wants_exit(struct kvm_vcpu *vcpu, u32 exit_reason)
  * Return 1 if L1 wants to intercept an exit from L2.  Only call this when in
  * is_guest_mode (L2).
  */
-static bool nested_vmx_l1_wants_exit(struct kvm_vcpu *vcpu, u32 exit_reason)
+static bool nested_vmx_l1_wants_exit(struct kvm_vcpu *vcpu,
+				     union vmx_exit_reason exit_reason)
 {
 	struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
 	u32 intr_info;
 
-	switch ((u16)exit_reason) {
+	switch ((u16)exit_reason.basic) {
 	case EXIT_REASON_EXCEPTION_NMI:
 		intr_info = vmx_get_intr_info(vcpu);
 		if (is_nmi(intr_info))
@@ -5936,7 +5948,7 @@ static bool nested_vmx_l1_wants_exit(struct kvm_vcpu *vcpu, u32 exit_reason)
 bool nested_vmx_reflect_vmexit(struct kvm_vcpu *vcpu)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
-	u32 exit_reason = vmx->exit_reason;
+	union vmx_exit_reason exit_reason = vmx->exit_reason;
 	unsigned long exit_qual;
 	u32 exit_intr_info;
 
@@ -5955,7 +5967,7 @@ bool nested_vmx_reflect_vmexit(struct kvm_vcpu *vcpu)
 		goto reflect_vmexit;
 	}
 
-	trace_kvm_nested_vmexit(exit_reason, vcpu, KVM_ISA_VMX);
+	trace_kvm_nested_vmexit(exit_reason.full, vcpu, KVM_ISA_VMX);
 
 	/* If L0 (KVM) wants the exit, it trumps L1's desires. */
 	if (nested_vmx_l0_wants_exit(vcpu, exit_reason))
@@ -5981,7 +5993,7 @@ bool nested_vmx_reflect_vmexit(struct kvm_vcpu *vcpu)
 	exit_qual = vmx_get_exit_qual(vcpu);
 
 reflect_vmexit:
-	nested_vmx_vmexit(vcpu, exit_reason, exit_intr_info, exit_qual);
+	nested_vmx_vmexit(vcpu, exit_reason.full, exit_intr_info, exit_qual);
 	return true;
 }
 
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 82af43e14b09..0b229282dd50 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -1578,7 +1578,7 @@ static int skip_emulated_instruction(struct kvm_vcpu *vcpu)
 	 * i.e. we end up advancing IP with some random value.
 	 */
 	if (!static_cpu_has(X86_FEATURE_HYPERVISOR) ||
-	    to_vmx(vcpu)->exit_reason != EXIT_REASON_EPT_MISCONFIG) {
+	    to_vmx(vcpu)->exit_reason.basic != EXIT_REASON_EPT_MISCONFIG) {
 		orig_rip = kvm_rip_read(vcpu);
 		rip = orig_rip + vmcs_read32(VM_EXIT_INSTRUCTION_LEN);
 #ifdef CONFIG_X86_64
@@ -5687,7 +5687,7 @@ static void vmx_get_exit_info(struct kvm_vcpu *vcpu, u64 *info1, u64 *info2,
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
 
 	*info1 = vmx_get_exit_qual(vcpu);
-	if (!(vmx->exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY)) {
+	if (!(vmx->exit_reason.failed_vmentry)) {
 		*info2 = vmx->idt_vectoring_info;
 		*intr_info = vmx_get_intr_info(vcpu);
 		if (is_exception_with_error_code(*intr_info))
@@ -5931,8 +5931,9 @@ void dump_vmcs(void)
 static int vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
-	u32 exit_reason = vmx->exit_reason;
+	union vmx_exit_reason exit_reason = vmx->exit_reason;
 	u32 vectoring_info = vmx->idt_vectoring_info;
+	u16 exit_handler_index;
 
 	/*
 	 * Flush logged GPAs PML buffer, this will make dirty_bitmap more
@@ -5974,11 +5975,11 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
 			return 1;
 	}
 
-	if (exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) {
+	if (exit_reason.failed_vmentry) {
 		dump_vmcs();
 		vcpu->run->exit_reason = KVM_EXIT_FAIL_ENTRY;
 		vcpu->run->fail_entry.hardware_entry_failure_reason
-			= exit_reason;
+			= exit_reason.full;
 		vcpu->run->fail_entry.cpu = vcpu->arch.last_vmentry_cpu;
 		return 0;
 	}
@@ -6000,18 +6001,18 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
 	 * will cause infinite loop.
 	 */
 	if ((vectoring_info & VECTORING_INFO_VALID_MASK) &&
-			(exit_reason != EXIT_REASON_EXCEPTION_NMI &&
-			exit_reason != EXIT_REASON_EPT_VIOLATION &&
-			exit_reason != EXIT_REASON_PML_FULL &&
-			exit_reason != EXIT_REASON_APIC_ACCESS &&
-			exit_reason != EXIT_REASON_TASK_SWITCH)) {
+	    (exit_reason.basic != EXIT_REASON_EXCEPTION_NMI &&
+	     exit_reason.basic != EXIT_REASON_EPT_VIOLATION &&
+	     exit_reason.basic != EXIT_REASON_PML_FULL &&
+	     exit_reason.basic != EXIT_REASON_APIC_ACCESS &&
+	     exit_reason.basic != EXIT_REASON_TASK_SWITCH)) {
 		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
 		vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV;
 		vcpu->run->internal.ndata = 3;
 		vcpu->run->internal.data[0] = vectoring_info;
-		vcpu->run->internal.data[1] = exit_reason;
+		vcpu->run->internal.data[1] = exit_reason.full;
 		vcpu->run->internal.data[2] = vcpu->arch.exit_qualification;
-		if (exit_reason == EXIT_REASON_EPT_MISCONFIG) {
+		if (exit_reason.basic == EXIT_REASON_EPT_MISCONFIG) {
 			vcpu->run->internal.ndata++;
 			vcpu->run->internal.data[3] =
 				vmcs_read64(GUEST_PHYSICAL_ADDRESS);
@@ -6043,38 +6044,39 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
 	if (exit_fastpath != EXIT_FASTPATH_NONE)
 		return 1;
 
-	if (exit_reason >= kvm_vmx_max_exit_handlers)
+	if (exit_reason.basic >= kvm_vmx_max_exit_handlers)
 		goto unexpected_vmexit;
 #ifdef CONFIG_RETPOLINE
-	if (exit_reason == EXIT_REASON_MSR_WRITE)
+	if (exit_reason.basic == EXIT_REASON_MSR_WRITE)
 		return kvm_emulate_wrmsr(vcpu);
-	else if (exit_reason == EXIT_REASON_PREEMPTION_TIMER)
+	else if (exit_reason.basic == EXIT_REASON_PREEMPTION_TIMER)
 		return handle_preemption_timer(vcpu);
-	else if (exit_reason == EXIT_REASON_INTERRUPT_WINDOW)
+	else if (exit_reason.basic == EXIT_REASON_INTERRUPT_WINDOW)
 		return handle_interrupt_window(vcpu);
-	else if (exit_reason == EXIT_REASON_EXTERNAL_INTERRUPT)
+	else if (exit_reason.basic == EXIT_REASON_EXTERNAL_INTERRUPT)
 		return handle_external_interrupt(vcpu);
-	else if (exit_reason == EXIT_REASON_HLT)
+	else if (exit_reason.basic == EXIT_REASON_HLT)
 		return kvm_emulate_halt(vcpu);
-	else if (exit_reason == EXIT_REASON_EPT_MISCONFIG)
+	else if (exit_reason.basic == EXIT_REASON_EPT_MISCONFIG)
 		return handle_ept_misconfig(vcpu);
 #endif
 
-	exit_reason = array_index_nospec(exit_reason,
-					 kvm_vmx_max_exit_handlers);
-	if (!kvm_vmx_exit_handlers[exit_reason])
+	exit_handler_index = array_index_nospec((u16)exit_reason.basic,
+						kvm_vmx_max_exit_handlers);
+	if (!kvm_vmx_exit_handlers[exit_handler_index])
 		goto unexpected_vmexit;
 
-	return kvm_vmx_exit_handlers[exit_reason](vcpu);
+	return kvm_vmx_exit_handlers[exit_handler_index](vcpu);
 
 unexpected_vmexit:
-	vcpu_unimpl(vcpu, "vmx: unexpected exit reason 0x%x\n", exit_reason);
+	vcpu_unimpl(vcpu, "vmx: unexpected exit reason 0x%x\n",
+		    exit_reason.full);
 	dump_vmcs();
 	vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
 	vcpu->run->internal.suberror =
 			KVM_INTERNAL_ERROR_UNEXPECTED_EXIT_REASON;
 	vcpu->run->internal.ndata = 2;
-	vcpu->run->internal.data[0] = exit_reason;
+	vcpu->run->internal.data[0] = exit_reason.full;
 	vcpu->run->internal.data[1] = vcpu->arch.last_vmentry_cpu;
 	return 0;
 }
@@ -6393,9 +6395,9 @@ static void vmx_handle_exit_irqoff(struct kvm_vcpu *vcpu)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
 
-	if (vmx->exit_reason == EXIT_REASON_EXTERNAL_INTERRUPT)
+	if (vmx->exit_reason.basic == EXIT_REASON_EXTERNAL_INTERRUPT)
 		handle_external_interrupt_irqoff(vcpu);
-	else if (vmx->exit_reason == EXIT_REASON_EXCEPTION_NMI)
+	else if (vmx->exit_reason.basic == EXIT_REASON_EXCEPTION_NMI)
 		handle_exception_nmi_irqoff(vmx);
 }
 
@@ -6583,7 +6585,7 @@ void noinstr vmx_update_host_rsp(struct vcpu_vmx *vmx, unsigned long host_rsp)
 
 static fastpath_t vmx_exit_handlers_fastpath(struct kvm_vcpu *vcpu)
 {
-	switch (to_vmx(vcpu)->exit_reason) {
+	switch (to_vmx(vcpu)->exit_reason.basic) {
 	case EXIT_REASON_MSR_WRITE:
 		return handle_fastpath_set_msr_irqoff(vcpu);
 	case EXIT_REASON_PREEMPTION_TIMER:
@@ -6782,17 +6784,17 @@ static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu)
 	vmx->idt_vectoring_info = 0;
 
 	if (unlikely(vmx->fail)) {
-		vmx->exit_reason = 0xdead;
+		vmx->exit_reason.full = 0xdead;
 		return EXIT_FASTPATH_NONE;
 	}
 
-	vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);
-	if (unlikely((u16)vmx->exit_reason == EXIT_REASON_MCE_DURING_VMENTRY))
+	vmx->exit_reason.full = vmcs_read32(VM_EXIT_REASON);
+	if (unlikely((u16)vmx->exit_reason.basic == EXIT_REASON_MCE_DURING_VMENTRY))
 		kvm_machine_check();
 
-	trace_kvm_exit(vmx->exit_reason, vcpu, KVM_ISA_VMX);
+	trace_kvm_exit(vmx->exit_reason.full, vcpu, KVM_ISA_VMX);
 
-	if (unlikely(vmx->exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY))
+	if (unlikely(vmx->exit_reason.failed_vmentry))
 		return EXIT_FASTPATH_NONE;
 
 	vmx->loaded_vmcs->launched = 1;
diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h
index f6f66e5c6510..ae3a89ac0600 100644
--- a/arch/x86/kvm/vmx/vmx.h
+++ b/arch/x86/kvm/vmx/vmx.h
@@ -70,6 +70,29 @@ struct pt_desc {
 	struct pt_ctx guest;
 };
 
+union vmx_exit_reason {
+	struct {
+		u32	basic			: 16;
+		u32	reserved16		: 1;
+		u32	reserved17		: 1;
+		u32	reserved18		: 1;
+		u32	reserved19		: 1;
+		u32	reserved20		: 1;
+		u32	reserved21		: 1;
+		u32	reserved22		: 1;
+		u32	reserved23		: 1;
+		u32	reserved24		: 1;
+		u32	reserved25		: 1;
+		u32	reserved26		: 1;
+		u32	enclave_mode		: 1;
+		u32	smi_pending_mtf		: 1;
+		u32	smi_from_vmx_root	: 1;
+		u32	reserved30		: 1;
+		u32	failed_vmentry		: 1;
+	};
+	u32 full;
+};
+
 /*
  * The nested_vmx structure is part of vcpu_vmx, and holds information we need
  * for correct emulation of VMX (i.e., nested VMX) on this vcpu.
@@ -244,7 +267,7 @@ struct vcpu_vmx {
 	int vpid;
 	bool emulation_required;
 
-	u32 exit_reason;
+	union vmx_exit_reason exit_reason;
 
 	/* Posted interrupt descriptor */
 	struct pi_desc pi_desc;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 094/103] KVM: VMX: Dont use vcpu->run->internal.ndata as an array index
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (92 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 093/103] KVM: VMX: Convert vcpu_vmx.exit_reason to a union Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 095/103] r8169: tweak max read request size for newer chips also in jumbo mtu mode Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Reiji Watanabe, Jim Mattson,
	Paolo Bonzini, Sasha Levin

From: Reiji Watanabe <reijiw@google.com>

[ Upstream commit 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a ]

__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access.  Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set it to outside the
bounds of the array).
So, it is not safe that __vmx_handle_exit() uses the 'ndata' that way.

Fixes: 1aa561b1a4c0 ("kvm: x86: Add "last CPU" to some KVM_EXIT information")
Signed-off-by: Reiji Watanabe <reijiw@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Message-Id: <20210413154739.490299-1-reijiw@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/kvm/vmx/vmx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 0b229282dd50..f8835cabf29f 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -6006,19 +6006,19 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
 	     exit_reason.basic != EXIT_REASON_PML_FULL &&
 	     exit_reason.basic != EXIT_REASON_APIC_ACCESS &&
 	     exit_reason.basic != EXIT_REASON_TASK_SWITCH)) {
+		int ndata = 3;
+
 		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
 		vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV;
-		vcpu->run->internal.ndata = 3;
 		vcpu->run->internal.data[0] = vectoring_info;
 		vcpu->run->internal.data[1] = exit_reason.full;
 		vcpu->run->internal.data[2] = vcpu->arch.exit_qualification;
 		if (exit_reason.basic == EXIT_REASON_EPT_MISCONFIG) {
-			vcpu->run->internal.ndata++;
-			vcpu->run->internal.data[3] =
+			vcpu->run->internal.data[ndata++] =
 				vmcs_read64(GUEST_PHYSICAL_ADDRESS);
 		}
-		vcpu->run->internal.data[vcpu->run->internal.ndata++] =
-			vcpu->arch.last_vmentry_cpu;
+		vcpu->run->internal.data[ndata++] = vcpu->arch.last_vmentry_cpu;
+		vcpu->run->internal.ndata = ndata;
 		return 0;
 	}
 
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 095/103] r8169: tweak max read request size for newer chips also in jumbo mtu mode
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (93 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 094/103] KVM: VMX: Dont use vcpu->run->internal.ndata as an array index Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 096/103] r8169: dont advertise pause in jumbo mode Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Heiner Kallweit, Jakub Kicinski, Sasha Levin

From: Heiner Kallweit <hkallweit1@gmail.com>

[ Upstream commit 5e00e16cb98935bcf06f51931876d898c226f65c ]

So far we don't increase the max read request size if we switch to
jumbo mode before bringing up the interface for the first time.
Let's change this.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/realtek/r8169_main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index d634da20b4f9..f981aa899c82 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2378,13 +2378,14 @@ static void r8168b_1_hw_jumbo_disable(struct rtl8169_private *tp)
 static void rtl_jumbo_config(struct rtl8169_private *tp)
 {
 	bool jumbo = tp->dev->mtu > ETH_DATA_LEN;
+	int readrq = 4096;
 
 	rtl_unlock_config_regs(tp);
 	switch (tp->mac_version) {
 	case RTL_GIGA_MAC_VER_12:
 	case RTL_GIGA_MAC_VER_17:
 		if (jumbo) {
-			pcie_set_readrq(tp->pci_dev, 512);
+			readrq = 512;
 			r8168b_1_hw_jumbo_enable(tp);
 		} else {
 			r8168b_1_hw_jumbo_disable(tp);
@@ -2392,7 +2393,7 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)
 		break;
 	case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_26:
 		if (jumbo) {
-			pcie_set_readrq(tp->pci_dev, 512);
+			readrq = 512;
 			r8168c_hw_jumbo_enable(tp);
 		} else {
 			r8168c_hw_jumbo_disable(tp);
@@ -2417,8 +2418,8 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)
 	}
 	rtl_lock_config_regs(tp);
 
-	if (!jumbo && pci_is_pcie(tp->pci_dev) && tp->supports_gmii)
-		pcie_set_readrq(tp->pci_dev, 4096);
+	if (pci_is_pcie(tp->pci_dev) && tp->supports_gmii)
+		pcie_set_readrq(tp->pci_dev, readrq);
 }
 
 DECLARE_RTL_COND(rtl_chipcmd_cond)
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 096/103] r8169: dont advertise pause in jumbo mode
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (94 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 095/103] r8169: tweak max read request size for newer chips also in jumbo mtu mode Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 097/103] bpf: Ensure off_reg has no mixed signed bounds for all types Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Roman Mamedov, Heiner Kallweit,
	David S. Miller, Sasha Levin

From: Heiner Kallweit <hkallweit1@gmail.com>

[ Upstream commit 453a77894efa4d9b6ef9644d74b9419c47ac427c ]

It has been reported [0] that using pause frames in jumbo mode impacts
performance. There's no available chip documentation, but vendor
drivers r8168 and r8125 don't advertise pause in jumbo mode. So let's
do the same, according to Roman it fixes the issue.

[0] https://bugzilla.kernel.org/show_bug.cgi?id=212617

Fixes: 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")
Reported-by: Roman Mamedov <rm+bko@romanrm.net>
Tested-by: Roman Mamedov <rm+bko@romanrm.net>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index f981aa899c82..3bb36f4a984e 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2420,6 +2420,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)
 
 	if (pci_is_pcie(tp->pci_dev) && tp->supports_gmii)
 		pcie_set_readrq(tp->pci_dev, readrq);
+
+	/* Chip doesn't support pause in jumbo mode */
+	linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT,
+			 tp->phydev->advertising, !jumbo);
+	linkmode_mod_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
+			 tp->phydev->advertising, !jumbo);
+	phy_start_aneg(tp->phydev);
 }
 
 DECLARE_RTL_COND(rtl_chipcmd_cond)
@@ -4711,8 +4718,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp)
 	if (!tp->supports_gmii)
 		phy_set_max_speed(phydev, SPEED_100);
 
-	phy_support_asym_pause(phydev);
-
 	phy_attached_info(phydev);
 
 	return 0;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 097/103] bpf: Ensure off_reg has no mixed signed bounds for all types
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (95 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 096/103] r8169: dont advertise pause in jumbo mode Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 098/103] bpf: Move off_reg into sanitize_ptr_alu Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daniel Borkmann, John Fastabend,
	Alexei Starovoitov, Sasha Levin

From: Daniel Borkmann <daniel@iogearbox.net>

[ Upstream commit 24c109bb1537c12c02aeed2d51a347b4d6a9b76e ]

The mixed signed bounds check really belongs into retrieve_ptr_limit()
instead of outside of it in adjust_ptr_min_max_vals(). The reason is
that this check is not tied to PTR_TO_MAP_VALUE only, but to all pointer
types that we handle in retrieve_ptr_limit() and given errors from the latter
propagate back to adjust_ptr_min_max_vals() and lead to rejection of the
program, it's a better place to reside to avoid anything slipping through
for future types. The reason why we must reject such off_reg is that we
otherwise would not be able to derive a mask, see details in 9d7eceede769
("bpf: restrict unknown scalars of mixed signed bounds for unprivileged").

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/bpf/verifier.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 2eaefd9c4152..a2a74b7ed2c6 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -5329,12 +5329,18 @@ static struct bpf_insn_aux_data *cur_aux(struct bpf_verifier_env *env)
 }
 
 static int retrieve_ptr_limit(const struct bpf_reg_state *ptr_reg,
-			      u32 *ptr_limit, u8 opcode, bool off_is_neg)
+			      const struct bpf_reg_state *off_reg,
+			      u32 *ptr_limit, u8 opcode)
 {
+	bool off_is_neg = off_reg->smin_value < 0;
 	bool mask_to_left = (opcode == BPF_ADD &&  off_is_neg) ||
 			    (opcode == BPF_SUB && !off_is_neg);
 	u32 off, max;
 
+	if (!tnum_is_const(off_reg->var_off) &&
+	    (off_reg->smin_value < 0) != (off_reg->smax_value < 0))
+		return -EACCES;
+
 	switch (ptr_reg->type) {
 	case PTR_TO_STACK:
 		/* Offset 0 is out-of-bounds, but acceptable start for the
@@ -5427,7 +5433,7 @@ static int sanitize_ptr_alu(struct bpf_verifier_env *env,
 	alu_state |= ptr_is_dst_reg ?
 		     BPF_ALU_SANITIZE_SRC : BPF_ALU_SANITIZE_DST;
 
-	err = retrieve_ptr_limit(ptr_reg, &alu_limit, opcode, off_is_neg);
+	err = retrieve_ptr_limit(ptr_reg, off_reg, &alu_limit, opcode);
 	if (err < 0)
 		return err;
 
@@ -5472,8 +5478,8 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
 	    smin_ptr = ptr_reg->smin_value, smax_ptr = ptr_reg->smax_value;
 	u64 umin_val = off_reg->umin_value, umax_val = off_reg->umax_value,
 	    umin_ptr = ptr_reg->umin_value, umax_ptr = ptr_reg->umax_value;
-	u32 dst = insn->dst_reg, src = insn->src_reg;
 	u8 opcode = BPF_OP(insn->code);
+	u32 dst = insn->dst_reg;
 	int ret;
 
 	dst_reg = &regs[dst];
@@ -5521,13 +5527,6 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
 		verbose(env, "R%d pointer arithmetic on %s prohibited\n",
 			dst, reg_type_str[ptr_reg->type]);
 		return -EACCES;
-	case PTR_TO_MAP_VALUE:
-		if (!env->env->bypass_spec_v1 && !known && (smin_val < 0) != (smax_val < 0)) {
-			verbose(env, "R%d has unknown scalar with mixed signed bounds, pointer arithmetic with it prohibited for !root\n",
-				off_reg == dst_reg ? dst : src);
-			return -EACCES;
-		}
-		fallthrough;
 	default:
 		break;
 	}
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 098/103] bpf: Move off_reg into sanitize_ptr_alu
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (96 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 097/103] bpf: Ensure off_reg has no mixed signed bounds for all types Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 099/103] ARM: 9071/1: uprobes: Dont hook on thumb instructions Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daniel Borkmann, John Fastabend,
	Alexei Starovoitov, Sasha Levin

From: Daniel Borkmann <daniel@iogearbox.net>

[ Upstream commit 6f55b2f2a1178856c19bbce2f71449926e731914 ]

Small refactor to drag off_reg into sanitize_ptr_alu(), so we later on can
use off_reg for generalizing some of the checks for all pointer types.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/bpf/verifier.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index a2a74b7ed2c6..6b562828dd49 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -5407,11 +5407,12 @@ static int sanitize_val_alu(struct bpf_verifier_env *env,
 static int sanitize_ptr_alu(struct bpf_verifier_env *env,
 			    struct bpf_insn *insn,
 			    const struct bpf_reg_state *ptr_reg,
-			    struct bpf_reg_state *dst_reg,
-			    bool off_is_neg)
+			    const struct bpf_reg_state *off_reg,
+			    struct bpf_reg_state *dst_reg)
 {
 	struct bpf_verifier_state *vstate = env->cur_state;
 	struct bpf_insn_aux_data *aux = cur_aux(env);
+	bool off_is_neg = off_reg->smin_value < 0;
 	bool ptr_is_dst_reg = ptr_reg == dst_reg;
 	u8 opcode = BPF_OP(insn->code);
 	u32 alu_state, alu_limit;
@@ -5546,7 +5547,7 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
 
 	switch (opcode) {
 	case BPF_ADD:
-		ret = sanitize_ptr_alu(env, insn, ptr_reg, dst_reg, smin_val < 0);
+		ret = sanitize_ptr_alu(env, insn, ptr_reg, off_reg, dst_reg);
 		if (ret < 0) {
 			verbose(env, "R%d tried to add from different maps, paths, or prohibited types\n", dst);
 			return ret;
@@ -5601,7 +5602,7 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
 		}
 		break;
 	case BPF_SUB:
-		ret = sanitize_ptr_alu(env, insn, ptr_reg, dst_reg, smin_val < 0);
+		ret = sanitize_ptr_alu(env, insn, ptr_reg, off_reg, dst_reg);
 		if (ret < 0) {
 			verbose(env, "R%d tried to sub from different maps, paths, or prohibited types\n", dst);
 			return ret;
-- 
2.30.2




^ permalink raw reply related	[flat|nested] 125+ messages in thread

* [PATCH 5.10 099/103] ARM: 9071/1: uprobes: Dont hook on thumb instructions
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (97 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 098/103] bpf: Move off_reg into sanitize_ptr_alu Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 100/103] arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Fredrik Strupe, Russell King

From: Fredrik Strupe <fredrik@strupe.net>

commit d2f7eca60b29006285d57c7035539e33300e89e5 upstream.

Since uprobes is not supported for thumb, check that the thumb bit is
not set when matching the uprobes instruction hooks.

The Arm UDF instructions used for uprobes triggering
(UPROBE_SWBP_ARM_INSN and UPROBE_SS_ARM_INSN) coincidentally share the
same encoding as a pair of unallocated 32-bit thumb instructions (not
UDF) when the condition code is 0b1111 (0xf). This in effect makes it
possible to trigger the uprobes functionality from thumb, and at that
using two unallocated instructions which are not permanently undefined.

Signed-off-by: Fredrik Strupe <fredrik@strupe.net>
Cc: stable@vger.kernel.org
Fixes: c7edc9e326d5 ("ARM: add uprobes support")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/probes/uprobes/core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/arm/probes/uprobes/core.c
+++ b/arch/arm/probes/uprobes/core.c
@@ -204,7 +204,7 @@ unsigned long uprobe_get_swbp_addr(struc
 static struct undef_hook uprobes_arm_break_hook = {
 	.instr_mask	= 0x0fffffff,
 	.instr_val	= (UPROBE_SWBP_ARM_INSN & 0x0fffffff),
-	.cpsr_mask	= MODE_MASK,
+	.cpsr_mask	= (PSR_T_BIT | MODE_MASK),
 	.cpsr_val	= USR_MODE,
 	.fn		= uprobe_trap_handler,
 };
@@ -212,7 +212,7 @@ static struct undef_hook uprobes_arm_bre
 static struct undef_hook uprobes_arm_ss_hook = {
 	.instr_mask	= 0x0fffffff,
 	.instr_val	= (UPROBE_SS_ARM_INSN & 0x0fffffff),
-	.cpsr_mask	= MODE_MASK,
+	.cpsr_mask	= (PSR_T_BIT | MODE_MASK),
 	.cpsr_val	= USR_MODE,
 	.fn		= uprobe_trap_handler,
 };



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 100/103] arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (98 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 099/103] ARM: 9071/1: uprobes: Dont hook on thumb instructions Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 101/103] bpf: Rework ptr_limit into alu_limit and add common error path Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Catalin Marinas, Will Deacon,
	Vincenzo Frascino, Mark Rutland

From: Catalin Marinas <catalin.marinas@arm.com>

commit 2decad92f4731fac9755a083fcfefa66edb7d67d upstream.

The entry from EL0 code checks the TFSRE0_EL1 register for any
asynchronous tag check faults in user space and sets the
TIF_MTE_ASYNC_FAULT flag. This is not done atomically, potentially
racing with another CPU calling set_tsk_thread_flag().

Replace the non-atomic ORR+STR with an STSET instruction. While STSET
requires ARMv8.1 and an assembler that understands LSE atomics, the MTE
feature is part of ARMv8.5 and already requires an updated assembler.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Fixes: 637ec831ea4f ("arm64: mte: Handle synchronous and asynchronous tag check faults")
Cc: <stable@vger.kernel.org> # 5.10.x
Reported-by: Will Deacon <will@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20210409173710.18582-1-catalin.marinas@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm64/Kconfig        |    6 +++++-
 arch/arm64/kernel/entry.S |   10 ++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)

--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1390,10 +1390,13 @@ config ARM64_PAN
 	 The feature is detected at runtime, and will remain as a 'nop'
 	 instruction if the cpu does not implement the feature.
 
+config AS_HAS_LSE_ATOMICS
+	def_bool $(as-instr,.arch_extension lse)
+
 config ARM64_LSE_ATOMICS
 	bool
 	default ARM64_USE_LSE_ATOMICS
-	depends on $(as-instr,.arch_extension lse)
+	depends on AS_HAS_LSE_ATOMICS
 
 config ARM64_USE_LSE_ATOMICS
 	bool "Atomic instructions"
@@ -1667,6 +1670,7 @@ config ARM64_MTE
 	bool "Memory Tagging Extension support"
 	default y
 	depends on ARM64_AS_HAS_MTE && ARM64_TAGGED_ADDR_ABI
+	depends on AS_HAS_LSE_ATOMICS
 	select ARCH_USES_HIGH_VMA_FLAGS
 	help
 	  Memory Tagging (part of the ARMv8.5 Extensions) provides
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -148,16 +148,18 @@ alternative_cb_end
 	.endm
 
 	/* Check for MTE asynchronous tag check faults */
-	.macro check_mte_async_tcf, flgs, tmp
+	.macro check_mte_async_tcf, tmp, ti_flags
 #ifdef CONFIG_ARM64_MTE
+	.arch_extension lse
 alternative_if_not ARM64_MTE
 	b	1f
 alternative_else_nop_endif
 	mrs_s	\tmp, SYS_TFSRE0_EL1
 	tbz	\tmp, #SYS_TFSR_EL1_TF0_SHIFT, 1f
 	/* Asynchronous TCF occurred for TTBR0 access, set the TI flag */
-	orr	\flgs, \flgs, #_TIF_MTE_ASYNC_FAULT
-	str	\flgs, [tsk, #TSK_TI_FLAGS]
+	mov	\tmp, #_TIF_MTE_ASYNC_FAULT
+	add	\ti_flags, tsk, #TSK_TI_FLAGS
+	stset	\tmp, [\ti_flags]
 	msr_s	SYS_TFSRE0_EL1, xzr
 1:
 #endif
@@ -207,7 +209,7 @@ alternative_else_nop_endif
 	disable_step_tsk x19, x20
 
 	/* Check for asynchronous tag check faults in user space */
-	check_mte_async_tcf x19, x22
+	check_mte_async_tcf x22, x23
 	apply_ssbd 1, x22, x23
 
 	ptrauth_keys_install_kernel tsk, x20, x22, x23



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 101/103] bpf: Rework ptr_limit into alu_limit and add common error path
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (99 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 100/103] arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 102/103] bpf: Improve verifier error messages for users Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daniel Borkmann, John Fastabend,
	Alexei Starovoitov

From: Daniel Borkmann <daniel@iogearbox.net>

commit b658bbb844e28f1862867f37e8ca11a8e2aa94a3 upstream.

Small refactor with no semantic changes in order to consolidate the max
ptr_limit boundary check.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/bpf/verifier.c |   21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -5330,12 +5330,12 @@ static struct bpf_insn_aux_data *cur_aux
 
 static int retrieve_ptr_limit(const struct bpf_reg_state *ptr_reg,
 			      const struct bpf_reg_state *off_reg,
-			      u32 *ptr_limit, u8 opcode)
+			      u32 *alu_limit, u8 opcode)
 {
 	bool off_is_neg = off_reg->smin_value < 0;
 	bool mask_to_left = (opcode == BPF_ADD &&  off_is_neg) ||
 			    (opcode == BPF_SUB && !off_is_neg);
-	u32 off, max;
+	u32 off, max = 0, ptr_limit = 0;
 
 	if (!tnum_is_const(off_reg->var_off) &&
 	    (off_reg->smin_value < 0) != (off_reg->smax_value < 0))
@@ -5352,22 +5352,27 @@ static int retrieve_ptr_limit(const stru
 		 */
 		off = ptr_reg->off + ptr_reg->var_off.value;
 		if (mask_to_left)
-			*ptr_limit = MAX_BPF_STACK + off;
+			ptr_limit = MAX_BPF_STACK + off;
 		else
-			*ptr_limit = -off - 1;
-		return *ptr_limit >= max ? -ERANGE : 0;
+			ptr_limit = -off - 1;
+		break;
 	case PTR_TO_MAP_VALUE:
 		max = ptr_reg->map_ptr->value_size;
 		if (mask_to_left) {
-			*ptr_limit = ptr_reg->umax_value + ptr_reg->off;
+			ptr_limit = ptr_reg->umax_value + ptr_reg->off;
 		} else {
 			off = ptr_reg->smin_value + ptr_reg->off;
-			*ptr_limit = ptr_reg->map_ptr->value_size - off - 1;
+			ptr_limit = ptr_reg->map_ptr->value_size - off - 1;
 		}
-		return *ptr_limit >= max ? -ERANGE : 0;
+		break;
 	default:
 		return -EINVAL;
 	}
+
+	if (ptr_limit >= max)
+		return -ERANGE;
+	*alu_limit = ptr_limit;
+	return 0;
 }
 
 static bool can_skip_alu_sanitation(const struct bpf_verifier_env *env,



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 102/103] bpf: Improve verifier error messages for users
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (100 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 101/103] bpf: Rework ptr_limit into alu_limit and add common error path Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 13:06 ` [PATCH 5.10 103/103] bpf: Move sanitize_val_alu out of op switch Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daniel Borkmann, John Fastabend,
	Alexei Starovoitov

From: Daniel Borkmann <daniel@iogearbox.net>

commit a6aaece00a57fa6f22575364b3903dfbccf5345d upstream.

Consolidate all error handling and provide more user-friendly error messages
from sanitize_ptr_alu() and sanitize_val_alu().

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/bpf/verifier.c |   86 ++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 63 insertions(+), 23 deletions(-)

--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -5328,6 +5328,14 @@ static struct bpf_insn_aux_data *cur_aux
 	return &env->insn_aux_data[env->insn_idx];
 }
 
+enum {
+	REASON_BOUNDS	= -1,
+	REASON_TYPE	= -2,
+	REASON_PATHS	= -3,
+	REASON_LIMIT	= -4,
+	REASON_STACK	= -5,
+};
+
 static int retrieve_ptr_limit(const struct bpf_reg_state *ptr_reg,
 			      const struct bpf_reg_state *off_reg,
 			      u32 *alu_limit, u8 opcode)
@@ -5339,7 +5347,7 @@ static int retrieve_ptr_limit(const stru
 
 	if (!tnum_is_const(off_reg->var_off) &&
 	    (off_reg->smin_value < 0) != (off_reg->smax_value < 0))
-		return -EACCES;
+		return REASON_BOUNDS;
 
 	switch (ptr_reg->type) {
 	case PTR_TO_STACK:
@@ -5366,11 +5374,11 @@ static int retrieve_ptr_limit(const stru
 		}
 		break;
 	default:
-		return -EINVAL;
+		return REASON_TYPE;
 	}
 
 	if (ptr_limit >= max)
-		return -ERANGE;
+		return REASON_LIMIT;
 	*alu_limit = ptr_limit;
 	return 0;
 }
@@ -5390,7 +5398,7 @@ static int update_alu_sanitation_state(s
 	if (aux->alu_state &&
 	    (aux->alu_state != alu_state ||
 	     aux->alu_limit != alu_limit))
-		return -EACCES;
+		return REASON_PATHS;
 
 	/* Corresponding fixup done in fixup_bpf_calls(). */
 	aux->alu_state = alu_state;
@@ -5463,7 +5471,46 @@ do_sim:
 	ret = push_stack(env, env->insn_idx + 1, env->insn_idx, true);
 	if (!ptr_is_dst_reg && ret)
 		*dst_reg = tmp;
-	return !ret ? -EFAULT : 0;
+	return !ret ? REASON_STACK : 0;
+}
+
+static int sanitize_err(struct bpf_verifier_env *env,
+			const struct bpf_insn *insn, int reason,
+			const struct bpf_reg_state *off_reg,
+			const struct bpf_reg_state *dst_reg)
+{
+	static const char *err = "pointer arithmetic with it prohibited for !root";
+	const char *op = BPF_OP(insn->code) == BPF_ADD ? "add" : "sub";
+	u32 dst = insn->dst_reg, src = insn->src_reg;
+
+	switch (reason) {
+	case REASON_BOUNDS:
+		verbose(env, "R%d has unknown scalar with mixed signed bounds, %s\n",
+			off_reg == dst_reg ? dst : src, err);
+		break;
+	case REASON_TYPE:
+		verbose(env, "R%d has pointer with unsupported alu operation, %s\n",
+			off_reg == dst_reg ? src : dst, err);
+		break;
+	case REASON_PATHS:
+		verbose(env, "R%d tried to %s from different maps, paths or scalars, %s\n",
+			dst, op, err);
+		break;
+	case REASON_LIMIT:
+		verbose(env, "R%d tried to %s beyond pointer bounds, %s\n",
+			dst, op, err);
+		break;
+	case REASON_STACK:
+		verbose(env, "R%d could not be pushed for speculative verification, %s\n",
+			dst, err);
+		break;
+	default:
+		verbose(env, "verifier internal error: unknown reason (%d)\n",
+			reason);
+		break;
+	}
+
+	return -EACCES;
 }
 
 /* Handles arithmetic on a pointer and a scalar: computes new min/max and var_off.
@@ -5553,10 +5600,9 @@ static int adjust_ptr_min_max_vals(struc
 	switch (opcode) {
 	case BPF_ADD:
 		ret = sanitize_ptr_alu(env, insn, ptr_reg, off_reg, dst_reg);
-		if (ret < 0) {
-			verbose(env, "R%d tried to add from different maps, paths, or prohibited types\n", dst);
-			return ret;
-		}
+		if (ret < 0)
+			return sanitize_err(env, insn, ret, off_reg, dst_reg);
+
 		/* We can take a fixed offset as long as it doesn't overflow
 		 * the s32 'off' field
 		 */
@@ -5608,10 +5654,9 @@ static int adjust_ptr_min_max_vals(struc
 		break;
 	case BPF_SUB:
 		ret = sanitize_ptr_alu(env, insn, ptr_reg, off_reg, dst_reg);
-		if (ret < 0) {
-			verbose(env, "R%d tried to sub from different maps, paths, or prohibited types\n", dst);
-			return ret;
-		}
+		if (ret < 0)
+			return sanitize_err(env, insn, ret, off_reg, dst_reg);
+
 		if (dst_reg == off_reg) {
 			/* scalar -= pointer.  Creates an unknown scalar */
 			verbose(env, "R%d tried to subtract pointer from scalar\n",
@@ -6301,9 +6346,8 @@ static int adjust_scalar_min_max_vals(st
 	s32 s32_min_val, s32_max_val;
 	u32 u32_min_val, u32_max_val;
 	u64 insn_bitness = (BPF_CLASS(insn->code) == BPF_ALU64) ? 64 : 32;
-	u32 dst = insn->dst_reg;
-	int ret;
 	bool alu32 = (BPF_CLASS(insn->code) != BPF_ALU64);
+	int ret;
 
 	smin_val = src_reg.smin_value;
 	smax_val = src_reg.smax_value;
@@ -6362,20 +6406,16 @@ static int adjust_scalar_min_max_vals(st
 	switch (opcode) {
 	case BPF_ADD:
 		ret = sanitize_val_alu(env, insn);
-		if (ret < 0) {
-			verbose(env, "R%d tried to add from different pointers or scalars\n", dst);
-			return ret;
-		}
+		if (ret < 0)
+			return sanitize_err(env, insn, ret, NULL, NULL);
 		scalar32_min_max_add(dst_reg, &src_reg);
 		scalar_min_max_add(dst_reg, &src_reg);
 		dst_reg->var_off = tnum_add(dst_reg->var_off, src_reg.var_off);
 		break;
 	case BPF_SUB:
 		ret = sanitize_val_alu(env, insn);
-		if (ret < 0) {
-			verbose(env, "R%d tried to sub from different pointers or scalars\n", dst);
-			return ret;
-		}
+		if (ret < 0)
+			return sanitize_err(env, insn, ret, NULL, NULL);
 		scalar32_min_max_sub(dst_reg, &src_reg);
 		scalar_min_max_sub(dst_reg, &src_reg);
 		dst_reg->var_off = tnum_sub(dst_reg->var_off, src_reg.var_off);



^ permalink raw reply	[flat|nested] 125+ messages in thread

* [PATCH 5.10 103/103] bpf: Move sanitize_val_alu out of op switch
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (101 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 102/103] bpf: Improve verifier error messages for users Greg Kroah-Hartman
@ 2021-04-19 13:06 ` Greg Kroah-Hartman
  2021-04-19 17:27 ` [PATCH 5.10 000/103] 5.10.32-rc1 review Fox Chen
                   ` (8 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-19 13:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daniel Borkmann, John Fastabend,
	Alexei Starovoitov

From: Daniel Borkmann <daniel@iogearbox.net>

commit f528819334881fd622fdadeddb3f7edaed8b7c9b upstream.

Add a small sanitize_needed() helper function and move sanitize_val_alu()
out of the main opcode switch. In upcoming work, we'll move sanitize_ptr_alu()
as well out of its opcode switch so this helps to streamline both.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/bpf/verifier.c |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -5417,6 +5417,11 @@ static int sanitize_val_alu(struct bpf_v
 	return update_alu_sanitation_state(aux, BPF_ALU_NON_POINTER, 0);
 }
 
+static bool sanitize_needed(u8 opcode)
+{
+	return opcode == BPF_ADD || opcode == BPF_SUB;
+}
+
 static int sanitize_ptr_alu(struct bpf_verifier_env *env,
 			    struct bpf_insn *insn,
 			    const struct bpf_reg_state *ptr_reg,
@@ -6389,6 +6394,12 @@ static int adjust_scalar_min_max_vals(st
 		return 0;
 	}
 
+	if (sanitize_needed(opcode)) {
+		ret = sanitize_val_alu(env, insn);
+		if (ret < 0)
+			return sanitize_err(env, insn, ret, NULL, NULL);
+	}
+
 	/* Calculate sign/unsigned bounds and tnum for alu32 and alu64 bit ops.
 	 * There are two classes of instructions: The first class we track both
 	 * alu32 and alu64 sign/unsigned bounds independently this provides the
@@ -6405,17 +6416,11 @@ static int adjust_scalar_min_max_vals(st
 	 */
 	switch (opcode) {
 	case BPF_ADD:
-		ret = sanitize_val_alu(env, insn);
-		if (ret < 0)
-			return sanitize_err(env, insn, ret, NULL, NULL);
 		scalar32_min_max_add(dst_reg, &src_reg);
 		scalar_min_max_add(dst_reg, &src_reg);
 		dst_reg->var_off = tnum_add(dst_reg->var_off, src_reg.var_off);
 		break;
 	case BPF_SUB:
-		ret = sanitize_val_alu(env, insn);
-		if (ret < 0)
-			return sanitize_err(env, insn, ret, NULL, NULL);
 		scalar32_min_max_sub(dst_reg, &src_reg);
 		scalar_min_max_sub(dst_reg, &src_reg);
 		dst_reg->var_off = tnum_sub(dst_reg->var_off, src_reg.var_off);



^ permalink raw reply	[flat|nested] 125+ messages in thread

* RE: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (102 preceding siblings ...)
  2021-04-19 13:06 ` [PATCH 5.10 103/103] bpf: Move sanitize_val_alu out of op switch Greg Kroah-Hartman
@ 2021-04-19 17:27 ` Fox Chen
  2021-04-19 19:16   ` Patrick Mccormick
  2021-04-19 21:07 ` Florian Fainelli
                   ` (7 subsequent siblings)
  111 siblings, 1 reply; 125+ messages in thread
From: Fox Chen @ 2021-04-19 17:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, stable, Fox Chen

On Mon, 19 Apr 2021 15:05:11 +0200, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> This is the start of the stable review cycle for the 5.10.32 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

5.10.32-rc1 Successfully Compiled and booted on my Raspberry PI 4b (8g) (bcm2711)
                
Tested-by: Fox Chen <foxhlchen@gmail.com>


^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 17:27 ` [PATCH 5.10 000/103] 5.10.32-rc1 review Fox Chen
@ 2021-04-19 19:16   ` Patrick Mccormick
  2021-04-23 15:10     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 125+ messages in thread
From: Patrick Mccormick @ 2021-04-19 19:16 UTC (permalink / raw)
  To: Fox Chen
  Cc: linux-kernel, Greg Kroah-Hartman, torvalds, akpm, linux, shuah,
	patches, lkft-triage, pavel, jonathanh, f.fainelli, stable

We ran tests on this kernel:

commit 32f5704a0a4f7dcc8aa74a49dbcce359d758f6d5 (HEAD -> rc/linux-5.10.y)
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Apr 15 16:44:09 2021 +0200

    Linux 5.10.31-rc1

No problems found.

Hardware tested on:

model name : Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz

Specific tests ran:

ok 1 ltp.py:LTP.test_nptl
ok 2 ltp.py:LTP.test_math
ok 3 ltp.py:LTP.test_dio
ok 4 ltp.py:LTP.test_io
ok 5 ltp.py:LTP.test_power_management_tests
ok 6 ltp.py:LTP.test_can
ok 7 ltp.py:LTP.test_input
ok 8 ltp.py:LTP.test_hugetlb
ok 9 ltp.py:LTP.test_ipc
ok 10 ltp.py:LTP.test_uevent
ok 11 ltp.py:LTP.test_smoketest
ok 12 ltp.py:LTP.test_containers
ok 13 ltp.py:LTP.test_filecaps
ok 14 ltp.py:LTP.test_sched
ok 15 ltp.py:LTP.test_hyperthreading
ok 16 ltp.py:LTP.test_cap_bounds
ok 17 kpatch.sh
ok 18 perf.py:PerfNonPriv.test_perf_help
ok 19 perf.py:PerfNonPriv.test_perf_version
ok 20 perf.py:PerfNonPriv.test_perf_list
ok 21 perf.py:PerfPriv.test_perf_record
ok 22 perf.py:PerfPriv.test_perf_cmd_kallsyms
ok 23 perf.py:PerfPriv.test_perf_cmd_annotate
ok 24 perf.py:PerfPriv.test_perf_cmd_evlist
ok 25 perf.py:PerfPriv.test_perf_cmd_script
ok 26 perf.py:PerfPriv.test_perf_stat
ok 27 perf.py:PerfPriv.test_perf_bench
ok 28 kselftest.py:kselftest.test_sysctl
ok 29 kselftest.py:kselftest.test_size
ok 30 kselftest.py:kselftest.test_sync
ok 31 kselftest.py:kselftest.test_capabilities
ok 32 kselftest.py:kselftest.test_x86
ok 33 kselftest.py:kselftest.test_pidfd
ok 34 kselftest.py:kselftest.test_membarrier
ok 35 kselftest.py:kselftest.test_sigaltstack
ok 36 kselftest.py:kselftest.test_tmpfs
ok 37 kselftest.py:kselftest.test_user
ok 38 kselftest.py:kselftest.test_sched
ok 39 kselftest.py:kselftest.test_timens
ok 40 kselftest.py:kselftest.test_timers

Tested-By: Patrick McCormick <pmccormick@digitalocean.com>

On Mon, Apr 19, 2021 at 10:27 AM Fox Chen <foxhlchen@gmail.com> wrote:
>
> On Mon, 19 Apr 2021 15:05:11 +0200, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > This is the start of the stable review cycle for the 5.10.32 release.
> > There are 103 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> > Anything received after that time might be too late.
> >
> > The whole patch series can be found in one patch at:
> >       https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> > or in the git tree and branch at:
> >       git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
> >
>
> 5.10.32-rc1 Successfully Compiled and booted on my Raspberry PI 4b (8g) (bcm2711)
>
> Tested-by: Fox Chen <foxhlchen@gmail.com>
>

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (103 preceding siblings ...)
  2021-04-19 17:27 ` [PATCH 5.10 000/103] 5.10.32-rc1 review Fox Chen
@ 2021-04-19 21:07 ` Florian Fainelli
  2021-04-23 15:11   ` Greg Kroah-Hartman
  2021-04-19 21:30 ` Pavel Machek
                   ` (6 subsequent siblings)
  111 siblings, 1 reply; 125+ messages in thread
From: Florian Fainelli @ 2021-04-19 21:07 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, lkft-triage, pavel,
	jonathanh, stable



On 4/19/2021 6:05 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.32 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h

On ARCH_BRCMSTB, using 32-bit and 64-bit ARM kernels:

Tested-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 042/103] net/rds: Avoid potential use after free in rds_send_remove_from_sock
  2021-04-19 13:05 ` [PATCH 5.10 042/103] net/rds: Avoid potential use after free in rds_send_remove_from_sock Greg Kroah-Hartman
@ 2021-04-19 21:29   ` Pavel Machek
  2021-04-20  7:21     ` Greg Kroah-Hartman
  2021-04-20  7:13   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 125+ messages in thread
From: Pavel Machek @ 2021-04-19 21:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Aditya Pakki, Santosh Shilimkar,
	David S. Miller, Sasha Levin

[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]

Hi!

> [ Upstream commit 0c85a7e87465f2d4cbc768e245f4f45b2f299b05 ]
> 
> In case of rs failure in rds_send_remove_from_sock(), the 'rm' resource
> is freed and later under spinlock, causing potential use-after-free.
> Set the free pointer to NULL to avoid undefined behavior.

This patch is crazy. Take a look at Message-ID:
<20210419084953.GA28564@amd>. Or just look at the patch :-).

Best regards,
								Pavel
> +++ b/net/rds/message.c
> @@ -180,6 +180,7 @@ void rds_message_put(struct rds_message *rm)
>  		rds_message_purge(rm);
>  
>  		kfree(rm);
> +		rm = NULL;
>  	}
>  }
>  EXPORT_SYMBOL_GPL(rds_message_put);
> diff --git a/net/rds/send.c b/net/rds/send.c
> index 985d0b7713ac..fe5264b9d4b3 100644
> --- a/net/rds/send.c
> +++ b/net/rds/send.c
> @@ -665,7 +665,7 @@ static void rds_send_remove_from_sock(struct list_head *messages, int status)
>  unlock_and_drop:
>  		spin_unlock_irqrestore(&rm->m_rs_lock, flags);
>  		rds_message_put(rm);
> -		if (was_on_sock)
> +		if (was_on_sock && rm)
>  			rds_message_put(rm);
>  	}
>  

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (104 preceding siblings ...)
  2021-04-19 21:07 ` Florian Fainelli
@ 2021-04-19 21:30 ` Pavel Machek
  2021-04-23 15:11   ` Greg Kroah-Hartman
  2021-04-20  0:08 ` Shuah Khan
                   ` (5 subsequent siblings)
  111 siblings, 1 reply; 125+ messages in thread
From: Pavel Machek @ 2021-04-19 21:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	pavel, jonathanh, f.fainelli, stable

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

Hi!

> This is the start of the stable review cycle for the 5.10.32 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> Anything received after that time might be too late.

CIP testing did not find any problems here:

https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y

Tested-by: Pavel Machek (CIP) <pavel@denx.de>

Best regards,
                                                                Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 043/103] net: tipc: Fix spelling errors in net/tipc module
  2021-04-19 13:05 ` [PATCH 5.10 043/103] net: tipc: Fix spelling errors in net/tipc module Greg Kroah-Hartman
@ 2021-04-19 21:32   ` Pavel Machek
  2021-04-20  7:34     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 125+ messages in thread
From: Pavel Machek @ 2021-04-19 21:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Hulk Robot, Zheng Yongjun, David S. Miller,
	Sasha Levin

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

Hi!

> [ Upstream commit a79ace4b312953c5835fafb12adc3cb6878b26bd ]
> 
> These patches fix a series of spelling errors in net/tipc module.

This should not be in -stable, it just cleans up comments.

Best regards,
								Pavel
								
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (105 preceding siblings ...)
  2021-04-19 21:30 ` Pavel Machek
@ 2021-04-20  0:08 ` Shuah Khan
  2021-04-20  6:13 ` Jon Hunter
                   ` (4 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Shuah Khan @ 2021-04-20  0:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, lkft-triage, pavel,
	jonathanh, f.fainelli, stable, Shuah Khan

On 4/19/21 7:05 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.32 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

Compiled and booted on my test system. No dmesg regressions.

Tested-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (106 preceding siblings ...)
  2021-04-20  0:08 ` Shuah Khan
@ 2021-04-20  6:13 ` Jon Hunter
  2021-04-20  6:50 ` Naresh Kamboju
                   ` (3 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Jon Hunter @ 2021-04-20  6:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, stable, linux-tegra

On Mon, 19 Apr 2021 15:05:11 +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.32 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h

All tests passing for Tegra ...

Test results for stable-v5.10:
    12 builds:	12 pass, 0 fail
    28 boots:	28 pass, 0 fail
    70 tests:	70 pass, 0 fail

Linux version:	5.10.32-rc1-gbcedd92af6e5
Boards tested:	tegra124-jetson-tk1, tegra186-p2771-0000,
                tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
                tegra20-ventana, tegra210-p2371-2180,
                tegra210-p3450-0000, tegra30-cardhu-a04

Tested-by: Jon Hunter <jonathanh@nvidia.com>

Jon

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (107 preceding siblings ...)
  2021-04-20  6:13 ` Jon Hunter
@ 2021-04-20  6:50 ` Naresh Kamboju
  2021-04-20  9:15 ` Sudip Mukherjee
                   ` (2 subsequent siblings)
  111 siblings, 0 replies; 125+ messages in thread
From: Naresh Kamboju @ 2021-04-20  6:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: open list, Shuah Khan, Florian Fainelli, patches, lkft-triage,
	Jon Hunter, linux-stable, Pavel Machek, Andrew Morton,
	Linus Torvalds, Guenter Roeck

On Mon, 19 Apr 2021 at 18:49, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 5.10.32 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
>         https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> or in the git tree and branch at:
>         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h


Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>

## Build
* kernel: 5.10.32-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git branch: linux-5.10.y
* git commit: bcedd92af6e5899132429d20a9322b12afec2188
* git describe: v5.10.31-104-gbcedd92af6e5
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.31-104-gbcedd92af6e5

## No regressions (compared to v5.10.31-56-g86a799ba8d60)

## No fixes (compared to v5.10.31-56-g86a799ba8d60)

## Test result summary
 total: 69955, pass: 58611, fail: 1787, skip: 9326, xfail: 231,

## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 192 total, 192 passed, 0 failed
* arm64: 26 total, 26 passed, 0 failed
* dragonboard-410c: 1 total, 1 passed, 0 failed
* hi6220-hikey: 1 total, 1 passed, 0 failed
* i386: 25 total, 25 passed, 0 failed
* juno-r2: 1 total, 1 passed, 0 failed
* mips: 45 total, 45 passed, 0 failed
* parisc: 9 total, 9 passed, 0 failed
* powerpc: 27 total, 27 passed, 0 failed
* riscv: 21 total, 21 passed, 0 failed
* s390: 18 total, 18 passed, 0 failed
* sh: 18 total, 18 passed, 0 failed
* sparc: 9 total, 9 passed, 0 failed
* x15: 1 total, 1 passed, 0 failed
* x86: 1 total, 1 passed, 0 failed
* x86_64: 26 total, 26 passed, 0 failed

## Test suites summary
* fwts
* igt-gpu-tools
* install-android-platform-tools-r2600
* kselftest-
* kselftest-android
* kselftest-bpf
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-lkdtm
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-vsyscall-mode-native-
* kselftest-vsyscall-mode-none-
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-controllers-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-tracing-tests
* network-basic-tests
* perf
* rcutorture
* ssuite
* v4l2-compliance

--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 042/103] net/rds: Avoid potential use after free in rds_send_remove_from_sock
  2021-04-19 13:05 ` [PATCH 5.10 042/103] net/rds: Avoid potential use after free in rds_send_remove_from_sock Greg Kroah-Hartman
  2021-04-19 21:29   ` Pavel Machek
@ 2021-04-20  7:13   ` Greg Kroah-Hartman
  1 sibling, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-20  7:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: stable, Aditya Pakki, Santosh Shilimkar, David S. Miller, Sasha Levin

On Mon, Apr 19, 2021 at 03:05:53PM +0200, Greg Kroah-Hartman wrote:
> From: Aditya Pakki <pakki001@umn.edu>
> 
> [ Upstream commit 0c85a7e87465f2d4cbc768e245f4f45b2f299b05 ]
> 
> In case of rs failure in rds_send_remove_from_sock(), the 'rm' resource
> is freed and later under spinlock, causing potential use-after-free.
> Set the free pointer to NULL to avoid undefined behavior.
> 
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
>  net/rds/message.c | 1 +
>  net/rds/send.c    | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/rds/message.c b/net/rds/message.c
> index 799034e0f513..4fc66ff0f1ec 100644
> --- a/net/rds/message.c
> +++ b/net/rds/message.c
> @@ -180,6 +180,7 @@ void rds_message_put(struct rds_message *rm)
>  		rds_message_purge(rm);
>  
>  		kfree(rm);
> +		rm = NULL;
>  	}
>  }
>  EXPORT_SYMBOL_GPL(rds_message_put);
> diff --git a/net/rds/send.c b/net/rds/send.c
> index 985d0b7713ac..fe5264b9d4b3 100644
> --- a/net/rds/send.c
> +++ b/net/rds/send.c
> @@ -665,7 +665,7 @@ static void rds_send_remove_from_sock(struct list_head *messages, int status)
>  unlock_and_drop:
>  		spin_unlock_irqrestore(&rm->m_rs_lock, flags);
>  		rds_message_put(rm);
> -		if (was_on_sock)
> +		if (was_on_sock && rm)
>  			rds_message_put(rm);
>  	}
>  
> -- 
> 2.30.2
> 
> 
> 

Ah crap, I will go drop this stuff.

I also will strongly recommend that all maintainers blacklist umn.edu
patches at this point in time, as it is obvious that a professor there
is operating a sociological experiment on Linux kernel maintainers and
is wasting our time.

This is not ok.

greg k-h

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 042/103] net/rds: Avoid potential use after free in rds_send_remove_from_sock
  2021-04-19 21:29   ` Pavel Machek
@ 2021-04-20  7:21     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-20  7:21 UTC (permalink / raw)
  To: Pavel Machek
  Cc: linux-kernel, stable, Aditya Pakki, Santosh Shilimkar,
	David S. Miller, Sasha Levin

On Mon, Apr 19, 2021 at 11:29:30PM +0200, Pavel Machek wrote:
> Hi!
> 
> > [ Upstream commit 0c85a7e87465f2d4cbc768e245f4f45b2f299b05 ]
> > 
> > In case of rs failure in rds_send_remove_from_sock(), the 'rm' resource
> > is freed and later under spinlock, causing potential use-after-free.
> > Set the free pointer to NULL to avoid undefined behavior.
> 
> This patch is crazy. Take a look at Message-ID:
> <20210419084953.GA28564@amd>. Or just look at the patch :-).

You are correct, everything submitted from this author and domain
recently was done as a "research project" to see if they could mess with
kernel maintainers and slip in pointless changes to the kernel.

Not acceptable at all...

greg k-h

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 043/103] net: tipc: Fix spelling errors in net/tipc module
  2021-04-19 21:32   ` Pavel Machek
@ 2021-04-20  7:34     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-20  7:34 UTC (permalink / raw)
  To: Pavel Machek
  Cc: linux-kernel, stable, Hulk Robot, Zheng Yongjun, David S. Miller,
	Sasha Levin

On Mon, Apr 19, 2021 at 11:32:47PM +0200, Pavel Machek wrote:
> Hi!
> 
> > [ Upstream commit a79ace4b312953c5835fafb12adc3cb6878b26bd ]
> > 
> > These patches fix a series of spelling errors in net/tipc module.
> 
> This should not be in -stable, it just cleans up comments.

Agreed, now dropped, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (108 preceding siblings ...)
  2021-04-20  6:50 ` Naresh Kamboju
@ 2021-04-20  9:15 ` Sudip Mukherjee
  2021-04-23 15:12   ` Greg Kroah-Hartman
  2021-04-20 11:54 ` Andrei Rabusov
  2021-04-21  6:20 ` Samuel Zou
  111 siblings, 1 reply; 125+ messages in thread
From: Sudip Mukherjee @ 2021-04-20  9:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	pavel, jonathanh, f.fainelli, stable

Hi Greg,

On Mon, Apr 19, 2021 at 03:05:11PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.32 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> Anything received after that time might be too late.

Build test:
mips (gcc version 10.3.1 20210419): 63 configs -> no new failure
arm (gcc version 10.3.1 20210419): 105 configs -> no new failure
x86_64 (gcc version 10.2.1 20210110): 2 configs -> no failure

Boot test:
x86_64: Booted on my test laptop. No regression.
x86_64: Booted on qemu. No regression.
arm: Booted on rpi3b. No regression.

Tested-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>


--
Regards
Sudip

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (109 preceding siblings ...)
  2021-04-20  9:15 ` Sudip Mukherjee
@ 2021-04-20 11:54 ` Andrei Rabusov
  2021-04-23 15:12   ` Greg Kroah-Hartman
  2021-04-21  6:20 ` Samuel Zou
  111 siblings, 1 reply; 125+ messages in thread
From: Andrei Rabusov @ 2021-04-20 11:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	pavel, jonathanh, f.fainelli, stable

On Mon, Apr 19, 2021 at 03:05:11PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.32 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h

On my i686 (gcc 10.3) I found no issues with the new rc

Selftest results [ok/not ok]: [1435/81]

Tested-by: Andrei Rabusov <a.rabusov@tum.de>

^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
                   ` (110 preceding siblings ...)
  2021-04-20 11:54 ` Andrei Rabusov
@ 2021-04-21  6:20 ` Samuel Zou
  2021-04-23 15:13   ` Greg Kroah-Hartman
  111 siblings, 1 reply; 125+ messages in thread
From: Samuel Zou @ 2021-04-21  6:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, lkft-triage, pavel,
	jonathanh, f.fainelli, stable



On 2021/4/19 21:05, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.10.32 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> or in the git tree and branch at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

Tested on arm64 and x86 for 5.10.32-rc1,

Kernel repo:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Branch: linux-5.10.y
Version: 5.10.32-rc1
Commit: bcedd92af6e5899132429d20a9322b12afec2188
Compiler: gcc version 7.3.0 (GCC)

arm64:
--------------------------------------------------------------------
Testcase Result Summary:
total: 5764
passed: 5764
failed: 0
timeout: 0
--------------------------------------------------------------------

x86:
--------------------------------------------------------------------
Testcase Result Summary:
total: 5764
passed: 5764
failed: 0
timeout: 0
--------------------------------------------------------------------

Tested-by: Hulk Robot <hulkrobot@huawei.com>


^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 19:16   ` Patrick Mccormick
@ 2021-04-23 15:10     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-23 15:10 UTC (permalink / raw)
  To: Patrick Mccormick
  Cc: Fox Chen, linux-kernel, torvalds, akpm, linux, shuah, patches,
	lkft-triage, pavel, jonathanh, f.fainelli, stable

On Mon, Apr 19, 2021 at 12:16:19PM -0700, Patrick Mccormick wrote:
> We ran tests on this kernel:
> 
> commit 32f5704a0a4f7dcc8aa74a49dbcce359d758f6d5 (HEAD -> rc/linux-5.10.y)
> Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Date:   Thu Apr 15 16:44:09 2021 +0200
> 
>     Linux 5.10.31-rc1
> 
> No problems found.
> 
> Hardware tested on:
> 
> model name : Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz
> 
> Specific tests ran:
> 
> ok 1 ltp.py:LTP.test_nptl
> ok 2 ltp.py:LTP.test_math
> ok 3 ltp.py:LTP.test_dio
> ok 4 ltp.py:LTP.test_io
> ok 5 ltp.py:LTP.test_power_management_tests
> ok 6 ltp.py:LTP.test_can
> ok 7 ltp.py:LTP.test_input
> ok 8 ltp.py:LTP.test_hugetlb
> ok 9 ltp.py:LTP.test_ipc
> ok 10 ltp.py:LTP.test_uevent
> ok 11 ltp.py:LTP.test_smoketest
> ok 12 ltp.py:LTP.test_containers
> ok 13 ltp.py:LTP.test_filecaps
> ok 14 ltp.py:LTP.test_sched
> ok 15 ltp.py:LTP.test_hyperthreading
> ok 16 ltp.py:LTP.test_cap_bounds
> ok 17 kpatch.sh
> ok 18 perf.py:PerfNonPriv.test_perf_help
> ok 19 perf.py:PerfNonPriv.test_perf_version
> ok 20 perf.py:PerfNonPriv.test_perf_list
> ok 21 perf.py:PerfPriv.test_perf_record
> ok 22 perf.py:PerfPriv.test_perf_cmd_kallsyms
> ok 23 perf.py:PerfPriv.test_perf_cmd_annotate
> ok 24 perf.py:PerfPriv.test_perf_cmd_evlist
> ok 25 perf.py:PerfPriv.test_perf_cmd_script
> ok 26 perf.py:PerfPriv.test_perf_stat
> ok 27 perf.py:PerfPriv.test_perf_bench
> ok 28 kselftest.py:kselftest.test_sysctl
> ok 29 kselftest.py:kselftest.test_size
> ok 30 kselftest.py:kselftest.test_sync
> ok 31 kselftest.py:kselftest.test_capabilities
> ok 32 kselftest.py:kselftest.test_x86
> ok 33 kselftest.py:kselftest.test_pidfd
> ok 34 kselftest.py:kselftest.test_membarrier
> ok 35 kselftest.py:kselftest.test_sigaltstack
> ok 36 kselftest.py:kselftest.test_tmpfs
> ok 37 kselftest.py:kselftest.test_user
> ok 38 kselftest.py:kselftest.test_sched
> ok 39 kselftest.py:kselftest.test_timens
> ok 40 kselftest.py:kselftest.test_timers
> 
> Tested-By: Patrick McCormick <pmccormick@digitalocean.com>

Thanks for testing and letting me know.

greg k-h


^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 21:07 ` Florian Fainelli
@ 2021-04-23 15:11   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-23 15:11 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	pavel, jonathanh, stable

On Mon, Apr 19, 2021 at 02:07:38PM -0700, Florian Fainelli wrote:
> 
> 
> On 4/19/2021 6:05 AM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 5.10.32 release.
> > There are 103 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> > 
> > Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> > Anything received after that time might be too late.
> > 
> > The whole patch series can be found in one patch at:
> > 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> > or in the git tree and branch at:
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> 
> On ARCH_BRCMSTB, using 32-bit and 64-bit ARM kernels:
> 
> Tested-by: Florian Fainelli <f.fainelli@gmail.com>
> -- 
> Florian

Thanks for testing and letting me know.

greg k-h


^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-19 21:30 ` Pavel Machek
@ 2021-04-23 15:11   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-23 15:11 UTC (permalink / raw)
  To: Pavel Machek
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	jonathanh, f.fainelli, stable

On Mon, Apr 19, 2021 at 11:30:37PM +0200, Pavel Machek wrote:
> Hi!
> 
> > This is the start of the stable review cycle for the 5.10.32 release.
> > There are 103 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> > 
> > Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> > Anything received after that time might be too late.
> 
> CIP testing did not find any problems here:
> 
> https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y
> 
> Tested-by: Pavel Machek (CIP) <pavel@denx.de>
> 
> Best regards,
>                                                                 Pavel
> -- 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


Thanks for testing and letting me know.

greg k-h


^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-20  9:15 ` Sudip Mukherjee
@ 2021-04-23 15:12   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-23 15:12 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	pavel, jonathanh, f.fainelli, stable

On Tue, Apr 20, 2021 at 10:15:41AM +0100, Sudip Mukherjee wrote:
> Hi Greg,
> 
> On Mon, Apr 19, 2021 at 03:05:11PM +0200, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 5.10.32 release.
> > There are 103 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> > 
> > Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> > Anything received after that time might be too late.
> 
> Build test:
> mips (gcc version 10.3.1 20210419): 63 configs -> no new failure
> arm (gcc version 10.3.1 20210419): 105 configs -> no new failure
> x86_64 (gcc version 10.2.1 20210110): 2 configs -> no failure
> 
> Boot test:
> x86_64: Booted on my test laptop. No regression.
> x86_64: Booted on qemu. No regression.
> arm: Booted on rpi3b. No regression.
> 
> Tested-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> 
> 
> --
> Regards
> Sudip

Thanks for testing and letting me know.

greg k-h


^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-20 11:54 ` Andrei Rabusov
@ 2021-04-23 15:12   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-23 15:12 UTC (permalink / raw)
  To: Andrei Rabusov
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	pavel, jonathanh, f.fainelli, stable

On Tue, Apr 20, 2021 at 01:54:15PM +0200, Andrei Rabusov wrote:
> On Mon, Apr 19, 2021 at 03:05:11PM +0200, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 5.10.32 release.
> > There are 103 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> > 
> > Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> > Anything received after that time might be too late.
> > 
> > The whole patch series can be found in one patch at:
> > 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> > or in the git tree and branch at:
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> 
> On my i686 (gcc 10.3) I found no issues with the new rc
> 
> Selftest results [ok/not ok]: [1435/81]
> 
> Tested-by: Andrei Rabusov <a.rabusov@tum.de>

Thanks for testing and letting me know.

greg k-h


^ permalink raw reply	[flat|nested] 125+ messages in thread

* Re: [PATCH 5.10 000/103] 5.10.32-rc1 review
  2021-04-21  6:20 ` Samuel Zou
@ 2021-04-23 15:13   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 125+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-23 15:13 UTC (permalink / raw)
  To: Samuel Zou
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches, lkft-triage,
	pavel, jonathanh, f.fainelli, stable

On Wed, Apr 21, 2021 at 02:20:59PM +0800, Samuel Zou wrote:
> 
> 
> On 2021/4/19 21:05, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 5.10.32 release.
> > There are 103 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> > 
> > Responses should be made by Wed, 21 Apr 2021 13:05:09 +0000.
> > Anything received after that time might be too late.
> > 
> > The whole patch series can be found in one patch at:
> > 	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.32-rc1.gz
> > or in the git tree and branch at:
> > 	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> Tested on arm64 and x86 for 5.10.32-rc1,
> 
> Kernel repo:
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> Branch: linux-5.10.y
> Version: 5.10.32-rc1
> Commit: bcedd92af6e5899132429d20a9322b12afec2188
> Compiler: gcc version 7.3.0 (GCC)
> 
> arm64:
> --------------------------------------------------------------------
> Testcase Result Summary:
> total: 5764
> passed: 5764
> failed: 0
> timeout: 0
> --------------------------------------------------------------------
> 
> x86:
> --------------------------------------------------------------------
> Testcase Result Summary:
> total: 5764
> passed: 5764
> failed: 0
> timeout: 0
> --------------------------------------------------------------------
> 
> Tested-by: Hulk Robot <hulkrobot@huawei.com>
> 

Thanks for testing and letting me know.

greg k-h


^ permalink raw reply	[flat|nested] 125+ messages in thread

end of thread, other threads:[~2021-04-23 15:13 UTC | newest]

Thread overview: 125+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 13:05 [PATCH 5.10 000/103] 5.10.32-rc1 review Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 001/103] net/sctp: fix race condition in sctp_destroy_sock Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 002/103] mtd: rawnand: mtk: Fix WAITRDY break condition and timeout Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 003/103] Input: nspire-keypad - enable interrupts only when opened Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 004/103] gpio: sysfs: Obey valid_mask Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 005/103] dmaengine: idxd: Fix clobbering of SWERR overflow bit on writeback Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 006/103] dmaengine: idxd: fix delta_rec and crc size field for completion record Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 007/103] dmaengine: idxd: fix opcap sysfs attribute output Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 008/103] dmaengine: idxd: fix wq size store permission state Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 009/103] dmaengine: dw: Make it dependent to HAS_IOMEM Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 010/103] dmaengine: Fix a double free in dma_async_device_register Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 011/103] dmaengine: plx_dma: add a missing put_device() on error path Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 012/103] dmaengine: idxd: fix wq cleanup of WQCFG registers Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 013/103] ACPI: x86: Call acpi_boot_table_init() after acpi_table_upgrade() Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 014/103] ARM: dts: Drop duplicate sha2md5_fck to fix clk_disable race Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 015/103] ARM: dts: Fix moving mmc devices with aliases for omap4 & 5 Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 016/103] lockdep: Add a missing initialization hint to the "INFO: Trying to register non-static key" message Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 017/103] arc: kernel: Return -EFAULT if copy_to_user() fails Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 018/103] iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd() Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 019/103] xfrm: BEET mode doesnt support fragments for inner packets Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 020/103] ASoC: max98373: Changed amp shutdown register as volatile Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 021/103] ASoC: max98373: Added 30ms turn on/off time delay Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 022/103] gpu/xen: Fix a use after free in xen_drm_drv_init Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 023/103] neighbour: Disregard DEAD dst in neigh_update Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 024/103] ARM: keystone: fix integer overflow warning Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 025/103] ARM: omap1: fix building with clang IAS Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 026/103] drm/msm: Fix a5xx/a6xx timestamps Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 027/103] ASoC: fsl_esai: Fix TDM slot setup for I2S mode Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 028/103] scsi: scsi_transport_srp: Dont block target in SRP_PORT_LOST state Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 029/103] iwlwifi: add support for Qu with AX201 device Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 030/103] net: ieee802154: stop dump llsec keys for monitors Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 031/103] net: ieee802154: forbid monitor for add llsec key Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 032/103] net: ieee802154: forbid monitor for del " Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 033/103] net: ieee802154: stop dump llsec devs for monitors Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 034/103] net: ieee802154: forbid monitor for add llsec dev Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 035/103] net: ieee802154: forbid monitor for del " Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 036/103] net: ieee802154: stop dump llsec devkeys for monitors Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 037/103] net: ieee802154: forbid monitor for add llsec devkey Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 038/103] net: ieee802154: forbid monitor for del " Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 039/103] net: ieee802154: stop dump llsec seclevels for monitors Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 040/103] net: ieee802154: forbid monitor for add llsec seclevel Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 041/103] pcnet32: Use pci_resource_len to validate PCI resource Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 042/103] net/rds: Avoid potential use after free in rds_send_remove_from_sock Greg Kroah-Hartman
2021-04-19 21:29   ` Pavel Machek
2021-04-20  7:21     ` Greg Kroah-Hartman
2021-04-20  7:13   ` Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 043/103] net: tipc: Fix spelling errors in net/tipc module Greg Kroah-Hartman
2021-04-19 21:32   ` Pavel Machek
2021-04-20  7:34     ` Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 044/103] mac80211: clear sta->fast_rx when STA removed from 4-addr VLAN Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 045/103] virt_wifi: Return micros for BSS TSF values Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 046/103] lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 047/103] Input: s6sy761 - fix coordinate read bit shift Greg Kroah-Hartman
2021-04-19 13:05 ` [PATCH 5.10 048/103] Input: i8042 - fix Pegatron C15B ID entry Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 049/103] HID: wacom: set EV_KEY and EV_ABS only for non-HID_GENERIC type of devices Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 050/103] dm verity fec: fix misaligned RS roots IO Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 051/103] readdir: make sure to verify directory entry for legacy interfaces too Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 052/103] arm64: fix inline asm in load_unaligned_zeropad() Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 053/103] arm64: alternatives: Move length validation in alternative_{insn, endif} Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 054/103] vfio/pci: Add missing range check in vfio_pci_mmap Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 055/103] riscv: Fix spelling mistake "SPARSEMEM" to "SPARSMEM" Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 056/103] scsi: libsas: Reset num_scatter if libata marks qc as NODATA Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 057/103] ixgbe: fix unbalanced device enable/disable in suspend/resume Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 058/103] netfilter: flowtable: fix NAT IPv6 offload mangling Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 059/103] netfilter: conntrack: do not print icmpv6 as unknown via /proc Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 060/103] ice: Fix potential infinite loop when using u8 loop counter Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 061/103] libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 062/103] netfilter: bridge: add pre_exit hooks for ebtable unregistration Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 063/103] netfilter: arp_tables: add pre_exit hook for table unregister Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 064/103] libbpf: Fix potential NULL pointer dereference Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 065/103] net: macb: fix the restore of cmp registers Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 066/103] net/mlx5e: fix ingress_ifindex check in mlx5e_flower_parse_meta Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 067/103] netfilter: nft_limit: avoid possible divide error in nft_limit_init Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 068/103] net/mlx5e: Fix setting of RS FEC mode Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 069/103] net: davicom: Fix regulator not turned off on failed probe Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 070/103] net: sit: Unregister catch-all devices Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 071/103] net: ip6_tunnel: " Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 072/103] mm: ptdump: fix build failure Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 073/103] net: Make tcp_allowed_congestion_control readonly in non-init netns Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 074/103] i40e: fix the panic when running bpf in xdpdrv mode Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 075/103] ethtool: pause: make sure we init driver stats Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 076/103] ia64: remove duplicate entries in generic_defconfig Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 077/103] ia64: tools: remove inclusion of ia64-specific version of errno.h header Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 078/103] ibmvnic: avoid calling napi_disable() twice Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 079/103] ibmvnic: remove duplicate napi_schedule call in do_reset function Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 080/103] ibmvnic: remove duplicate napi_schedule call in open function Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 081/103] ch_ktls: Fix kernel panic Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 082/103] ch_ktls: fix device connection close Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 083/103] ch_ktls: tcb close causes tls connection failure Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 084/103] ch_ktls: do not send snd_una update to TCB in middle Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 085/103] gro: ensure frag0 meets IP header alignment Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 086/103] ARM: OMAP2+: Fix warning for omap_init_time_of() Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 087/103] ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range() Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 088/103] ARM: footbridge: fix PCI interrupt mapping Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 089/103] ARM: OMAP2+: Fix uninitialized sr_inst Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 090/103] arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 091/103] arm64: dts: allwinner: h6: beelink-gs1: Remove ext. 32 kHz osc reference Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 092/103] bpf: Use correct permission flag for mixed signed bounds arithmetic Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 093/103] KVM: VMX: Convert vcpu_vmx.exit_reason to a union Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 094/103] KVM: VMX: Dont use vcpu->run->internal.ndata as an array index Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 095/103] r8169: tweak max read request size for newer chips also in jumbo mtu mode Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 096/103] r8169: dont advertise pause in jumbo mode Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 097/103] bpf: Ensure off_reg has no mixed signed bounds for all types Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 098/103] bpf: Move off_reg into sanitize_ptr_alu Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 099/103] ARM: 9071/1: uprobes: Dont hook on thumb instructions Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 100/103] arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 101/103] bpf: Rework ptr_limit into alu_limit and add common error path Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 102/103] bpf: Improve verifier error messages for users Greg Kroah-Hartman
2021-04-19 13:06 ` [PATCH 5.10 103/103] bpf: Move sanitize_val_alu out of op switch Greg Kroah-Hartman
2021-04-19 17:27 ` [PATCH 5.10 000/103] 5.10.32-rc1 review Fox Chen
2021-04-19 19:16   ` Patrick Mccormick
2021-04-23 15:10     ` Greg Kroah-Hartman
2021-04-19 21:07 ` Florian Fainelli
2021-04-23 15:11   ` Greg Kroah-Hartman
2021-04-19 21:30 ` Pavel Machek
2021-04-23 15:11   ` Greg Kroah-Hartman
2021-04-20  0:08 ` Shuah Khan
2021-04-20  6:13 ` Jon Hunter
2021-04-20  6:50 ` Naresh Kamboju
2021-04-20  9:15 ` Sudip Mukherjee
2021-04-23 15:12   ` Greg Kroah-Hartman
2021-04-20 11:54 ` Andrei Rabusov
2021-04-23 15:12   ` Greg Kroah-Hartman
2021-04-21  6:20 ` Samuel Zou
2021-04-23 15:13   ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.