]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
4 years agoMerge remote-tracking branch 'sunxi/sunxi/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:37 +0000 (09:59 +1000)]
Merge remote-tracking branch 'sunxi/sunxi/for-next'

4 years agoMerge remote-tracking branch 'stm32/stm32-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:37 +0000 (09:59 +1000)]
Merge remote-tracking branch 'stm32/stm32-next'

4 years agoMerge remote-tracking branch 'scmi/for-linux-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:36 +0000 (09:59 +1000)]
Merge remote-tracking branch 'scmi/for-linux-next'

4 years agoMerge remote-tracking branch 'samsung-krzk/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:35 +0000 (09:59 +1000)]
Merge remote-tracking branch 'samsung-krzk/for-next'

4 years agoMerge remote-tracking branch 'rockchip/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:34 +0000 (09:59 +1000)]
Merge remote-tracking branch 'rockchip/for-next'

4 years agoMerge remote-tracking branch 'reset/reset/next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:34 +0000 (09:59 +1000)]
Merge remote-tracking branch 'reset/reset/next'

4 years agoMerge remote-tracking branch 'renesas/next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:33 +0000 (09:59 +1000)]
Merge remote-tracking branch 'renesas/next'

4 years agoMerge remote-tracking branch 'raspberrypi/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:33 +0000 (09:59 +1000)]
Merge remote-tracking branch 'raspberrypi/for-next'

# Conflicts:
# arch/arm/boot/dts/bcm2711.dtsi

4 years agoMerge remote-tracking branch 'qcom/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:30 +0000 (09:59 +1000)]
Merge remote-tracking branch 'qcom/for-next'

4 years agoMerge remote-tracking branch 'omap/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:29 +0000 (09:59 +1000)]
Merge remote-tracking branch 'omap/for-next'

4 years agoMerge remote-tracking branch 'mvebu/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:28 +0000 (09:59 +1000)]
Merge remote-tracking branch 'mvebu/for-next'

4 years agoMerge remote-tracking branch 'mediatek/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:27 +0000 (09:59 +1000)]
Merge remote-tracking branch 'mediatek/for-next'

4 years agoMerge remote-tracking branch 'keystone/next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:27 +0000 (09:59 +1000)]
Merge remote-tracking branch 'keystone/next'

4 years agoMerge remote-tracking branch 'imx-mxs/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:26 +0000 (09:59 +1000)]
Merge remote-tracking branch 'imx-mxs/for-next'

4 years agoMerge remote-tracking branch 'drivers-memory/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:25 +0000 (09:59 +1000)]
Merge remote-tracking branch 'drivers-memory/for-next'

4 years agoMerge remote-tracking branch 'at91/at91-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:25 +0000 (09:59 +1000)]
Merge remote-tracking branch 'at91/at91-next'

4 years agoMerge remote-tracking branch 'aspeed/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:23 +0000 (09:59 +1000)]
Merge remote-tracking branch 'aspeed/for-next'

4 years agoMerge remote-tracking branch 'amlogic/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:22 +0000 (09:59 +1000)]
Merge remote-tracking branch 'amlogic/for-next'

4 years agoMerge remote-tracking branch 'actions/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:21 +0000 (09:59 +1000)]
Merge remote-tracking branch 'actions/for-next'

4 years agoMerge remote-tracking branch 'arm64/for-next/core'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:20 +0000 (09:59 +1000)]
Merge remote-tracking branch 'arm64/for-next/core'

4 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:59:19 +0000 (09:59 +1000)]
Merge remote-tracking branch 'arm/for-next'

4 years agoMerge remote-tracking branch 'asm-generic/master'
Stephen Rothwell [Wed, 2 Jun 2021 23:47:01 +0000 (09:47 +1000)]
Merge remote-tracking branch 'asm-generic/master'

4 years agoMerge remote-tracking branch 'compiler-attributes/compiler-attributes'
Stephen Rothwell [Wed, 2 Jun 2021 23:32:21 +0000 (09:32 +1000)]
Merge remote-tracking branch 'compiler-attributes/compiler-attributes'

4 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Wed, 2 Jun 2021 23:20:21 +0000 (09:20 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

4 years agoMerge remote-tracking branch 'kspp-gustavo/for-next/kspp'
Stephen Rothwell [Wed, 2 Jun 2021 23:18:14 +0000 (09:18 +1000)]
Merge remote-tracking branch 'kspp-gustavo/for-next/kspp'

4 years agoMerge remote-tracking branch 'drm-misc-fixes/for-linux-next-fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:29 +0000 (09:12 +1000)]
Merge remote-tracking branch 'drm-misc-fixes/for-linux-next-fixes'

4 years agoMerge remote-tracking branch 'kunit-fixes/kunit-fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:28 +0000 (09:12 +1000)]
Merge remote-tracking branch 'kunit-fixes/kunit-fixes'

4 years agoMerge remote-tracking branch 'gpio-brgl-fixes/gpio/for-current'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:27 +0000 (09:12 +1000)]
Merge remote-tracking branch 'gpio-brgl-fixes/gpio/for-current'

4 years agoMerge remote-tracking branch 'pidfd-fixes/fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:26 +0000 (09:12 +1000)]
Merge remote-tracking branch 'pidfd-fixes/fixes'

4 years agoMerge remote-tracking branch 'risc-v-fixes/fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:25 +0000 (09:12 +1000)]
Merge remote-tracking branch 'risc-v-fixes/fixes'

4 years agoMerge remote-tracking branch 'rtc-fixes/rtc-fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:24 +0000 (09:12 +1000)]
Merge remote-tracking branch 'rtc-fixes/rtc-fixes'

4 years agoMerge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:23 +0000 (09:12 +1000)]
Merge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'

4 years agoMerge remote-tracking branch 'scsi-fixes/fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:23 +0000 (09:12 +1000)]
Merge remote-tracking branch 'scsi-fixes/fixes'

4 years agoMerge remote-tracking branch 'drivers-x86-fixes/fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:22 +0000 (09:12 +1000)]
Merge remote-tracking branch 'drivers-x86-fixes/fixes'

4 years agoMerge remote-tracking branch 'vfs-fixes/fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:20 +0000 (09:12 +1000)]
Merge remote-tracking branch 'vfs-fixes/fixes'

4 years agoMerge remote-tracking branch 'btrfs-fixes/next-fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:20 +0000 (09:12 +1000)]
Merge remote-tracking branch 'btrfs-fixes/next-fixes'

4 years agoMerge remote-tracking branch 'nvdimm-fixes/libnvdimm-fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:18 +0000 (09:12 +1000)]
Merge remote-tracking branch 'nvdimm-fixes/libnvdimm-fixes'

4 years agoMerge remote-tracking branch 'omap-fixes/fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:17 +0000 (09:12 +1000)]
Merge remote-tracking branch 'omap-fixes/fixes'

4 years agoMerge remote-tracking branch 'v4l-dvb-fixes/fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:17 +0000 (09:12 +1000)]
Merge remote-tracking branch 'v4l-dvb-fixes/fixes'

4 years agoMerge remote-tracking branch 'dmaengine-fixes/fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:16 +0000 (09:12 +1000)]
Merge remote-tracking branch 'dmaengine-fixes/fixes'

4 years agoMerge remote-tracking branch 'vfio-fixes/for-linus'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:15 +0000 (09:12 +1000)]
Merge remote-tracking branch 'vfio-fixes/for-linus'

4 years agoMerge remote-tracking branch 'ide/master'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:06 +0000 (09:12 +1000)]
Merge remote-tracking branch 'ide/master'

4 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:05 +0000 (09:12 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

4 years agoMerge remote-tracking branch 'iio-fixes/fixes-togreg'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:04 +0000 (09:12 +1000)]
Merge remote-tracking branch 'iio-fixes/fixes-togreg'

4 years agoMerge remote-tracking branch 'phy/fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:04 +0000 (09:12 +1000)]
Merge remote-tracking branch 'phy/fixes'

4 years agoMerge remote-tracking branch 'usb-chipidea-fixes/for-usb-fixes'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:03 +0000 (09:12 +1000)]
Merge remote-tracking branch 'usb-chipidea-fixes/for-usb-fixes'

4 years agoMerge remote-tracking branch 'usb-serial-fixes/usb-linus'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:03 +0000 (09:12 +1000)]
Merge remote-tracking branch 'usb-serial-fixes/usb-linus'

4 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:02 +0000 (09:12 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

4 years agoMerge remote-tracking branch 'pci-current/for-linus'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:02 +0000 (09:12 +1000)]
Merge remote-tracking branch 'pci-current/for-linus'

4 years agoMerge remote-tracking branch 'spi-fixes/for-linus'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:02 +0000 (09:12 +1000)]
Merge remote-tracking branch 'spi-fixes/for-linus'

4 years agoMerge remote-tracking branch 'regulator-fixes/for-linus'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:01 +0000 (09:12 +1000)]
Merge remote-tracking branch 'regulator-fixes/for-linus'

4 years agoMerge remote-tracking branch 'sound-asoc-fixes/for-linus'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:01 +0000 (09:12 +1000)]
Merge remote-tracking branch 'sound-asoc-fixes/for-linus'

4 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Wed, 2 Jun 2021 23:12:00 +0000 (09:12 +1000)]
Merge remote-tracking branch 'sound-current/for-linus'

4 years agoMerge remote-tracking branch 'mac80211/master'
Stephen Rothwell [Wed, 2 Jun 2021 23:11:59 +0000 (09:11 +1000)]
Merge remote-tracking branch 'mac80211/master'

4 years agoMerge remote-tracking branch 'wireless-drivers/master'
Stephen Rothwell [Wed, 2 Jun 2021 23:11:59 +0000 (09:11 +1000)]
Merge remote-tracking branch 'wireless-drivers/master'

4 years agoMerge remote-tracking branch 'netfilter/master'
Stephen Rothwell [Wed, 2 Jun 2021 23:11:59 +0000 (09:11 +1000)]
Merge remote-tracking branch 'netfilter/master'

4 years agoMerge remote-tracking branch 'ipsec/master'
Stephen Rothwell [Wed, 2 Jun 2021 23:11:57 +0000 (09:11 +1000)]
Merge remote-tracking branch 'ipsec/master'

4 years agoMerge remote-tracking branch 'bpf/master'
Stephen Rothwell [Wed, 2 Jun 2021 23:11:57 +0000 (09:11 +1000)]
Merge remote-tracking branch 'bpf/master'

4 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Wed, 2 Jun 2021 23:11:56 +0000 (09:11 +1000)]
Merge remote-tracking branch 'net/master'

4 years agoMerge branch 'for-next/scmi' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Sudeep Holla [Wed, 2 Jun 2021 20:54:52 +0000 (21:54 +0100)]
Merge branch 'for-next/scmi' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into for-linux-next

* 'for-next/scmi' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Reset Rx buffer to max size during async commands
  firmware: arm_scmi: Add SMCCC discovery dependency in Kconfig
  firmware: arm_scmi: Add clock management to the SCMI power domain

4 years agoMerge tag 'arm-ffa-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Sudeep Holla [Wed, 2 Jun 2021 20:54:39 +0000 (21:54 +0100)]
Merge tag 'arm-ffa-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into for-linux-next

Arm Firmware Framework for ARMv8-A(FFA) interface driver

The Arm FFA specification describes a software architecture to
leverages the virtualization extension to isolate software images
provided by an ecosystem of vendors from each other and describes
interfaces that standardize communication between the various software
images including communication between images in the Secure world and
Normal world. Any Hypervisor could use the FFA interfaces to enable
communication between VMs it manages.

The Hypervisor a.k.a Partition managers in FFA terminology can assign
system resources(Memory regions, Devices, CPU cycles) to the partitions
and manage isolation amongst them.

This is the initial and minimal support for the FFA interface to enable
communication between secure partitions and the normal world OS.

* tag 'arm-ffa-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Add support for MEM_* interfaces
  firmware: arm_ffa: Setup in-kernel users of FFA partitions
  firmware: arm_ffa: Add support for SMCCC as transport to FFA driver
  firmware: arm_ffa: Add initial Arm FFA driver support
  firmware: arm_ffa: Add initial FFA bus support for device enumeration
  arm64: smccc: Add support for SMCCCv1.2 extended input/output registers

4 years agofirmware: arm_scmi: Reset Rx buffer to max size during async commands
Cristian Marussi [Tue, 1 Jun 2021 10:24:17 +0000 (11:24 +0100)]
firmware: arm_scmi: Reset Rx buffer to max size during async commands

During an async commands execution the Rx buffer length is at first set
to max_msg_sz when the synchronous part of the command is first sent.
However once the synchronous part completes the transport layer waits
for the delayed response which will be processed using the same xfer
descriptor initially allocated. Since synchronous response received at
the end of the xfer will shrink the Rx buffer length to the effective
payload response length, it needs to be reset again.

Raise the Rx buffer length again to max_msg_sz before fetching the
delayed response to ensure full response is read correctly from the
shared memory.

Link: https://lore.kernel.org/r/20210601102421.26581-2-cristian.marussi@arm.com
Fixes: 58ecdf03dbb9 ("firmware: arm_scmi: Add support for asynchronous commands and delayed response")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
[sudeep.holla: moved reset to scmi_handle_response as it could race with
               do_xfer_with_response]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
4 years agonet: stmmac: fix issue where clk is being unprepared twice
Wong Vee Khee [Wed, 2 Jun 2021 02:31:25 +0000 (10:31 +0800)]
net: stmmac: fix issue where clk is being unprepared twice

In the case of MDIO bus registration failure due to no external PHY
devices is connected to the MAC, clk_disable_unprepare() is called in
stmmac_bus_clk_config() and intel_eth_pci_probe() respectively.

The second call in intel_eth_pci_probe() will caused the following:-

[   16.578605] intel-eth-pci 0000:00:1e.5: No PHY found
[   16.583778] intel-eth-pci 0000:00:1e.5: stmmac_dvr_probe: MDIO bus (id: 2) registration failed
[   16.680181] ------------[ cut here ]------------
[   16.684861] stmmac-0000:00:1e.5 already disabled
[   16.689547] WARNING: CPU: 13 PID: 2053 at drivers/clk/clk.c:952 clk_core_disable+0x96/0x1b0
[   16.697963] Modules linked in: dwc3 iTCO_wdt mei_hdcp iTCO_vendor_support udc_core x86_pkg_temp_thermal kvm_intel marvell10g kvm sch_fq_codel nfsd irqbypass dwmac_intel(+) stmmac uio ax88179_178a pcs_xpcs phylink uhid spi_pxa2xx_platform usbnet mei_me pcspkr tpm_crb mii i2c_i801 dw_dmac dwc3_pci thermal dw_dmac_core intel_rapl_msr libphy i2c_smbus mei tpm_tis intel_th_gth tpm_tis_core tpm intel_th_acpi intel_pmc_core intel_th i915 fuse configfs snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_pcm snd_timer snd soundcore
[   16.746785] CPU: 13 PID: 2053 Comm: systemd-udevd Tainted: G     U            5.13.0-rc3-intel-lts #76
[   16.756134] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-S ADP-S DRR4 CRB, BIOS ADLIFSI1.R00.1494.B00.2012031421 12/03/2020
[   16.769465] RIP: 0010:clk_core_disable+0x96/0x1b0
[   16.774222] Code: 00 8b 05 45 96 17 01 85 c0 7f 24 48 8b 5b 30 48 85 db 74 a5 8b 43 7c 85 c0 75 93 48 8b 33 48 c7 c7 6e 32 cc b7 e8 b2 5d 52 00 <0f> 0b 5b 5d c3 65 8b 05 76 31 18 49 89 c0 48 0f a3 05 bc 92 1a 01
[   16.793016] RSP: 0018:ffffa44580523aa0 EFLAGS: 00010086
[   16.798287] RAX: 0000000000000000 RBX: ffff8d7d0eb70a00 RCX: 0000000000000000
[   16.805435] RDX: 0000000000000002 RSI: ffffffffb7c62d5f RDI: 00000000ffffffff
[   16.812610] RBP: 0000000000000287 R08: 0000000000000000 R09: ffffa445805238d0
[   16.819759] R10: 0000000000000001 R11: 0000000000000001 R12: ffff8d7d0eb70a00
[   16.826904] R13: ffff8d7d027370c8 R14: 0000000000000006 R15: ffffa44580523ad0
[   16.834047] FS:  00007f9882fa2600(0000) GS:ffff8d80a0940000(0000) knlGS:0000000000000000
[   16.842177] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   16.847966] CR2: 00007f9882bea3d8 CR3: 000000010b126001 CR4: 0000000000370ee0
[   16.855144] Call Trace:
[   16.857614]  clk_core_disable_lock+0x1b/0x30
[   16.861941]  intel_eth_pci_probe.cold+0x11d/0x136 [dwmac_intel]
[   16.867913]  pci_device_probe+0xcf/0x150
[   16.871890]  really_probe+0xf5/0x3e0
[   16.875526]  driver_probe_device+0x64/0x150
[   16.879763]  device_driver_attach+0x53/0x60
[   16.883998]  __driver_attach+0x9f/0x150
[   16.887883]  ? device_driver_attach+0x60/0x60
[   16.892288]  ? device_driver_attach+0x60/0x60
[   16.896698]  bus_for_each_dev+0x77/0xc0
[   16.900583]  bus_add_driver+0x184/0x1f0
[   16.904469]  driver_register+0x6c/0xc0
[   16.908268]  ? 0xffffffffc07ae000
[   16.911598]  do_one_initcall+0x4a/0x210
[   16.915489]  ? kmem_cache_alloc_trace+0x305/0x4e0
[   16.920247]  do_init_module+0x5c/0x230
[   16.924057]  load_module+0x2894/0x2b70
[   16.927857]  ? __do_sys_finit_module+0xb5/0x120
[   16.932441]  __do_sys_finit_module+0xb5/0x120
[   16.936845]  do_syscall_64+0x42/0x80
[   16.940476]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[   16.945586] RIP: 0033:0x7f98830e5ccd
[   16.949177] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 93 31 0c 00 f7 d8 64 89 01 48
[   16.967970] RSP: 002b:00007ffc66b60168 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   16.975583] RAX: ffffffffffffffda RBX: 000055885de35ef0 RCX: 00007f98830e5ccd
[   16.982725] RDX: 0000000000000000 RSI: 00007f98832541e3 RDI: 0000000000000012
[   16.989868] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000
[   16.997042] R10: 0000000000000012 R11: 0000000000000246 R12: 00007f98832541e3
[   17.004222] R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffc66b60328
[   17.011369] ---[ end trace df06a3dab26b988c ]---
[   17.016062] ------------[ cut here ]------------
[   17.020701] stmmac-0000:00:1e.5 already unprepared

Removing the stmmac_bus_clks_config() call in stmmac_dvr_probe and let
dwmac-intel to handle the unprepare and disable of the clk device.

Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
Cc: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Reviewed-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet: ipconfig: Don't override command-line hostnames or domains
Josh Triplett [Wed, 2 Jun 2021 01:38:41 +0000 (18:38 -0700)]
net: ipconfig: Don't override command-line hostnames or domains

If the user specifies a hostname or domain name as part of the ip=
command-line option, preserve it and don't overwrite it with one
supplied by DHCP/BOOTP.

For instance, ip=::::myhostname::dhcp will use "myhostname" rather than
ignoring and overwriting it.

Fix the comment on ic_bootp_string that suggests it only copies a string
"if not already set"; it doesn't have any such logic.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoMerge tag 'mlx5-fixes-2021-06-01' of git://git.kernel.org/pub/scm/linu
David S. Miller [Wed, 2 Jun 2021 20:12:00 +0000 (13:12 -0700)]
Merge tag 'mlx5-fixes-2021-06-01' of git://git.kernel.org/pub/scm/linu
x/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5 fixes 2021-06-01

This series introduces some fixes to mlx5 driver.
Please pull and let me know if there is any problem.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agobpf, lockdown, audit: Fix buggy SELinux lockdown permission checks
Daniel Borkmann [Fri, 28 May 2021 09:16:31 +0000 (09:16 +0000)]
bpf, lockdown, audit: Fix buggy SELinux lockdown permission checks

Commit 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown")
added an implementation of the locked_down LSM hook to SELinux, with the aim
to restrict which domains are allowed to perform operations that would breach
lockdown. This is indirectly also getting audit subsystem involved to report
events. The latter is problematic, as reported by Ondrej and Serhei, since it
can bring down the whole system via audit:

  1) The audit events that are triggered due to calls to security_locked_down()
     can OOM kill a machine, see below details [0].

  2) It also seems to be causing a deadlock via avc_has_perm()/slow_avc_audit()
     when trying to wake up kauditd, for example, when using trace_sched_switch()
     tracepoint, see details in [1]. Triggering this was not via some hypothetical
     corner case, but with existing tools like runqlat & runqslower from bcc, for
     example, which make use of this tracepoint. Rough call sequence goes like:

     rq_lock(rq) -> -------------------------+
       trace_sched_switch() ->               |
         bpf_prog_xyz() ->                   +-> deadlock
           selinux_lockdown() ->             |
             audit_log_end() ->              |
               wake_up_interruptible() ->    |
                 try_to_wake_up() ->         |
                   rq_lock(rq) --------------+

What's worse is that the intention of 59438b46471a to further restrict lockdown
settings for specific applications in respect to the global lockdown policy is
completely broken for BPF. The SELinux policy rule for the current lockdown check
looks something like this:

  allow <who> <who> : lockdown { <reason> };

However, this doesn't match with the 'current' task where the security_locked_down()
is executed, example: httpd does a syscall. There is a tracing program attached
to the syscall which triggers a BPF program to run, which ends up doing a
bpf_probe_read_kernel{,_str}() helper call. The selinux_lockdown() hook does
the permission check against 'current', that is, httpd in this example. httpd
has literally zero relation to this tracing program, and it would be nonsensical
having to write an SELinux policy rule against httpd to let the tracing helper
pass. The policy in this case needs to be against the entity that is installing
the BPF program. For example, if bpftrace would generate a histogram of syscall
counts by user space application:

  bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @[comm] = count(); }'

bpftrace would then go and generate a BPF program from this internally. One way
of doing it [for the sake of the example] could be to call bpf_get_current_task()
helper and then access current->comm via one of bpf_probe_read_kernel{,_str}()
helpers. So the program itself has nothing to do with httpd or any other random
app doing a syscall here. The BPF program _explicitly initiated_ the lockdown
check. The allow/deny policy belongs in the context of bpftrace: meaning, you
want to grant bpftrace access to use these helpers, but other tracers on the
system like my_random_tracer _not_.

Therefore fix all three issues at the same time by taking a completely different
approach for the security_locked_down() hook, that is, move the check into the
program verification phase where we actually retrieve the BPF func proto. This
also reliably gets the task (current) that is trying to install the BPF tracing
program, e.g. bpftrace/bcc/perf/systemtap/etc, and it also fixes the OOM since
we're moving this out of the BPF helper's fast-path which can be called several
millions of times per second.

The check is then also in line with other security_locked_down() hooks in the
system where the enforcement is performed at open/load time, for example,
open_kcore() for /proc/kcore access or module_sig_check() for module signatures
just to pick few random ones. What's out of scope in the fix as well as in
other security_locked_down() hook locations /outside/ of BPF subsystem is that
if the lockdown policy changes on the fly there is no retrospective action.
This requires a different discussion, potentially complex infrastructure, and
it's also not clear whether this can be solved generically. Either way, it is
out of scope for a suitable stable fix which this one is targeting. Note that
the breakage is specifically on 59438b46471a where it started to rely on 'current'
as UAPI behavior, and _not_ earlier infrastructure such as 9d1f8be5cf42 ("bpf:
Restrict bpf when kernel lockdown is in confidentiality mode").

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1955585, Jakub Hrozek says:

  I starting seeing this with F-34. When I run a container that is traced with
  BPF to record the syscalls it is doing, auditd is flooded with messages like:

  type=AVC msg=audit(1619784520.593:282387): avc:  denied  { confidentiality }
    for pid=476 comm="auditd" lockdown_reason="use of bpf to read kernel RAM"
      scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:system_r:auditd_t:s0
        tclass=lockdown permissive=0

  This seems to be leading to auditd running out of space in the backlog buffer
  and eventually OOMs the machine.

  [...]
  auditd running at 99% CPU presumably processing all the messages, eventually I get:
  Apr 30 12:20:42 fedora kernel: audit: backlog limit exceeded
  Apr 30 12:20:42 fedora kernel: audit: backlog limit exceeded
  Apr 30 12:20:42 fedora kernel: audit: audit_backlog=2152579 > audit_backlog_limit=64
  Apr 30 12:20:42 fedora kernel: audit: audit_backlog=2152626 > audit_backlog_limit=64
  Apr 30 12:20:42 fedora kernel: audit: audit_backlog=2152694 > audit_backlog_limit=64
  Apr 30 12:20:42 fedora kernel: audit: audit_lost=6878426 audit_rate_limit=0 audit_backlog_limit=64
  Apr 30 12:20:45 fedora kernel: oci-seccomp-bpf invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=-1000
  Apr 30 12:20:45 fedora kernel: CPU: 0 PID: 13284 Comm: oci-seccomp-bpf Not tainted 5.11.12-300.fc34.x86_64 #1
  Apr 30 12:20:45 fedora kernel: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014
  [...]

[1] https://lore.kernel.org/linux-audit/CANYvDQN7H5tVp47fbYcRasv4XF07eUbsDwT_eDCHXJUj43J7jQ@mail.gmail.com/,
    Serhei Makarov says:

  Upstream kernel 5.11.0-rc7 and later was found to deadlock during a
  bpf_probe_read_compat() call within a sched_switch tracepoint. The problem
  is reproducible with the reg_alloc3 testcase from SystemTap's BPF backend
  testsuite on x86_64 as well as the runqlat, runqslower tools from bcc on
  ppc64le. Example stack trace:

  [...]
  [  730.868702] stack backtrace:
  [  730.869590] CPU: 1 PID: 701 Comm: in:imjournal Not tainted, 5.12.0-0.rc2.20210309git144c79ef3353.166.fc35.x86_64 #1
  [  730.871605] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
  [  730.873278] Call Trace:
  [  730.873770]  dump_stack+0x7f/0xa1
  [  730.874433]  check_noncircular+0xdf/0x100
  [  730.875232]  __lock_acquire+0x1202/0x1e10
  [  730.876031]  ? __lock_acquire+0xfc0/0x1e10
  [  730.876844]  lock_acquire+0xc2/0x3a0
  [  730.877551]  ? __wake_up_common_lock+0x52/0x90
  [  730.878434]  ? lock_acquire+0xc2/0x3a0
  [  730.879186]  ? lock_is_held_type+0xa7/0x120
  [  730.880044]  ? skb_queue_tail+0x1b/0x50
  [  730.880800]  _raw_spin_lock_irqsave+0x4d/0x90
  [  730.881656]  ? __wake_up_common_lock+0x52/0x90
  [  730.882532]  __wake_up_common_lock+0x52/0x90
  [  730.883375]  audit_log_end+0x5b/0x100
  [  730.884104]  slow_avc_audit+0x69/0x90
  [  730.884836]  avc_has_perm+0x8b/0xb0
  [  730.885532]  selinux_lockdown+0xa5/0xd0
  [  730.886297]  security_locked_down+0x20/0x40
  [  730.887133]  bpf_probe_read_compat+0x66/0xd0
  [  730.887983]  bpf_prog_250599c5469ac7b5+0x10f/0x820
  [  730.888917]  trace_call_bpf+0xe9/0x240
  [  730.889672]  perf_trace_run_bpf_submit+0x4d/0xc0
  [  730.890579]  perf_trace_sched_switch+0x142/0x180
  [  730.891485]  ? __schedule+0x6d8/0xb20
  [  730.892209]  __schedule+0x6d8/0xb20
  [  730.892899]  schedule+0x5b/0xc0
  [  730.893522]  exit_to_user_mode_prepare+0x11d/0x240
  [  730.894457]  syscall_exit_to_user_mode+0x27/0x70
  [  730.895361]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [...]

Fixes: 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown")
Reported-by: Ondrej Mosnacek <omosnace@redhat.com>
Reported-by: Jakub Hrozek <jhrozek@redhat.com>
Reported-by: Serhei Makarov <smakarov@redhat.com>
Reported-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: James Morris <jamorris@linux.microsoft.com>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Frank Eigler <fche@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/bpf/01135120-8bf7-df2e-cff0-1d73f1f841c3@iogearbox.net
4 years agoMerge tag 'efi-urgent-2021-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 2 Jun 2021 18:53:37 +0000 (08:53 -1000)]
Merge tag 'efi-urgent-2021-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI fixes from Ingo Molnar:
 "A handful of EFI fixes:

   - Fix/robustify a diagnostic printk

   - Fix a (normally not triggered) parser bug in the libstub code

   - Allow !EFI_MEMORY_XP && !EFI_MEMORY_RO entries in the memory map

   - Stop RISC-V from crashing on boot if there's no FDT table"

* tag 'efi-urgent-2021-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi: cper: fix snprintf() use in cper_dimm_err_location()
  efi/libstub: prevent read overflow in find_file_option()
  efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared
  efi/fdt: fix panic when no valid fdt found

4 years agoMerge tag 'acpi-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Wed, 2 Jun 2021 18:46:57 +0000 (08:46 -1000)]
Merge tag 'acpi-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Fix a mutex object memory leak in ACPICA occurring during object
  deletion that was introduced in 5.12-rc1 (Erik Kaneda)"

* tag 'acpi-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPICA: Clean up context mutex during object deletion

4 years agoMerge tag 'hwmon-for-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 2 Jun 2021 18:41:45 +0000 (08:41 -1000)]
Merge tag 'hwmon-for-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "The most notable fix is for the q54sj108a2 driver to let it actually
  instantiate.

  Also attribute fixes for pmbus/isl68137, pmbus/fsp-3y, and
  dell-smm-hwmon drivers"

* tag 'hwmon-for-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon/pmbus: (q54sj108a2) The PMBUS_MFR_ID is actually 6 chars instead of 5
  hwmon: (pmbus/isl68137) remove READ_TEMPERATURE_3 for RAA228228
  hwmon: (pmbus/fsp-3y) Fix FSP-3Y YH-5151E VOUT
  hwmon: (dell-smm-hwmon) Fix index values

4 years agoMerge branch 'for-next/sve' into for-next/core
Will Deacon [Wed, 2 Jun 2021 18:10:44 +0000 (19:10 +0100)]
Merge branch 'for-next/sve' into for-next/core

* for-next/sve:
  arm64/sve: Skip flushing Z registers with 128 bit vectors
  arm64/sve: Use the sve_flush macros in sve_load_from_fpsimd_state()
  arm64/sve: Split _sve_flush macro into separate Z and predicate flushes

4 years agoMerge branch 'for-next/smccc' into for-next/core
Will Deacon [Wed, 2 Jun 2021 18:10:37 +0000 (19:10 +0100)]
Merge branch 'for-next/smccc' into for-next/core

* for-next/smccc:

4 years agoMerge branch 'for-next/selftests' into for-next/core
Will Deacon [Wed, 2 Jun 2021 18:10:32 +0000 (19:10 +0100)]
Merge branch 'for-next/selftests' into for-next/core

* for-next/selftests:
  kselftest/arm64: Add missing newline to SVE test skipping output

4 years agoMerge branch 'for-next/perf' into for-next/core
Will Deacon [Wed, 2 Jun 2021 18:10:28 +0000 (19:10 +0100)]
Merge branch 'for-next/perf' into for-next/core

* for-next/perf: (22 commits)
  perf: qcom_l2_pmu: move to use request_irq by IRQF_NO_AUTOEN flag
  arm_pmu: move to use request_irq by IRQF_NO_AUTOEN flag
  perf: arm_spe: use DEVICE_ATTR_RO macro
  perf: xgene_pmu: use DEVICE_ATTR_RO macro
  perf: qcom: use DEVICE_ATTR_RO macro
  perf: arm_pmu: use DEVICE_ATTR_RO macro
  drivers/perf: hisi: use the correct HiSilicon copyright
  arm64: perf: Convert snprintf to sysfs_emit
  arm_pmu: Fix write counter incorrect in ARMv7 big-endian mode
  drivers/perf: arm-cci: Fix checkpatch spacing error
  drivers/perf: arm-cmn: Add space after ','
  drivers/perf: arm_pmu: Fix some coding style issues
  drivers/perf: arm_spe_pmu: Fix some coding style issues
  drivers/perf: Remove redundant dev_err call in tx2_uncore_pmu_init_dev()
  perf/hisi: Use irq_set_affinity()
  perf/imx_ddr: Use irq_set_affinity()
  perf/arm-smmuv3: Use irq_set_affinity()
  perf/arm-dsu: Use irq_set_affinity()
  perf/arm-dmc620: Use irq_set_affinity()
  perf/arm-cmn: Use irq_set_affinity()
  ...

4 years agoMerge branch 'for-next/mte' into for-next/core
Will Deacon [Wed, 2 Jun 2021 18:10:24 +0000 (19:10 +0100)]
Merge branch 'for-next/mte' into for-next/core

* for-next/mte:
  kasan: speed up mte_set_mem_tag_range

4 years agoMerge branch 'for-next/mm' into for-next/core
Will Deacon [Wed, 2 Jun 2021 18:10:21 +0000 (19:10 +0100)]
Merge branch 'for-next/mm' into for-next/core

* for-next/mm:
  arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES)
  arm64: mm: Remove unused support for Normal-WT memory type
  arm64: acpi: Map EFI_MEMORY_WT memory as Normal-NC
  arm64: mm: Remove unused support for Device-GRE memory type
  arm64: mm: Use better bitmap_zalloc()
  arm64/mm: Make vmemmap_free() available only with CONFIG_MEMORY_HOTPLUG
  arm64/mm: Remove [PUD|PMD]_TABLE_BIT from [pud|pmd]_bad()
  arm64/mm: Validate CONFIG_PGTABLE_LEVELS

4 years agoMerge branch 'for-next/kasan' into for-next/core
Will Deacon [Wed, 2 Jun 2021 18:10:16 +0000 (19:10 +0100)]
Merge branch 'for-next/kasan' into for-next/core

* for-next/kasan:
  kasan: arm64: support specialized outlined tag mismatch checks

4 years agoMerge branch 'for-next/insn' into for-next/core
Will Deacon [Wed, 2 Jun 2021 18:07:26 +0000 (19:07 +0100)]
Merge branch 'for-next/insn' into for-next/core

* for-next/insn:
  arm64: insn: Add load/store decoding helpers
  arm64: insn: Add some opcodes to instruction decoder
  arm64: insn: Add barrier encodings
  arm64: insn: Add SVE instruction class
  arm64: Move instruction encoder/decoder under lib/
  arm64: Move aarch32 condition check functions
  arm64: Move patching utilities out of instruction encoding/decoding

4 years agoMerge branch 'for-next/ffa' into for-next/core
Will Deacon [Wed, 2 Jun 2021 17:00:11 +0000 (18:00 +0100)]
Merge branch 'for-next/ffa' into for-next/core

* for-next/ffa:
  arm64: smccc: Add support for SMCCCv1.2 extended input/output registers

4 years agoMerge branch 'for-next/docs' into for-next/core
Will Deacon [Wed, 2 Jun 2021 17:00:07 +0000 (18:00 +0100)]
Merge branch 'for-next/docs' into for-next/core

* for-next/docs:
  arm64: Document requirement for access to FEAT_HCX

4 years agoMerge branch 'for-next/cpufeature' into for-next/core
Will Deacon [Wed, 2 Jun 2021 17:00:02 +0000 (18:00 +0100)]
Merge branch 'for-next/cpufeature' into for-next/core

* for-next/cpufeature:
  arm64: Check if GMID_EL1.BS is the same on all CPUs
  arm64: Change the cpuinfo_arm64 member type for some sysregs to u64

4 years agoMerge branch 'for-next/cortex-strings' into for-next/core
Will Deacon [Wed, 2 Jun 2021 16:59:55 +0000 (17:59 +0100)]
Merge branch 'for-next/cortex-strings' into for-next/core

* for-next/cortex-strings:
  arm64: update string routine copyrights and URLs
  arm64: Rewrite __arch_clear_user()
  arm64: Better optimised memchr()
  arm64: Import latest memcpy()/memmove() implementation
  arm64: Add assembly annotations for weak-PI-alias madness
  arm64: Import latest version of Cortex Strings' strncmp
  arm64: Import updated version of Cortex Strings' strlen
  arm64: Import latest version of Cortex Strings' strcmp
  arm64: Import latest version of Cortex Strings' memcmp

4 years agoarm64: update string routine copyrights and URLs
Mark Rutland [Wed, 2 Jun 2021 15:13:58 +0000 (16:13 +0100)]
arm64: update string routine copyrights and URLs

To make future archaeology easier, let's have the string routine comment
blocks encode the specific upstream commit ID they were imported from.
These are the same commit IDs as listed in the commits importing the
code, expanded to 16 characters. Note that the routines have different
commit IDs, each reprsenting the latest upstream commit which changed
the particular routine.

At the same time, let's consistently include 2021 in the copyright
dates.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210602151358.35571-1-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
4 years agoMerge branch 'for-next/caches' into for-next/core
Will Deacon [Wed, 2 Jun 2021 16:57:43 +0000 (17:57 +0100)]
Merge branch 'for-next/caches' into for-next/core

* for-next/caches:
  arm64: Rename arm64-internal cache maintenance functions
  arm64: Fix cache maintenance function comments
  arm64: sync_icache_aliases to take end parameter instead of size
  arm64: __clean_dcache_area_pou to take end parameter instead of size
  arm64: __clean_dcache_area_pop to take end parameter instead of size
  arm64: __clean_dcache_area_poc to take end parameter instead of size
  arm64: __flush_dcache_area to take end parameter instead of size
  arm64: dcache_by_line_op to take end parameter instead of size
  arm64: __inval_dcache_area to take end parameter instead of size
  arm64: Fix comments to refer to correct function __flush_icache_range
  arm64: Move documentation of dcache_by_line_op
  arm64: assembler: remove user_alt
  arm64: Downgrade flush_icache_range to invalidate
  arm64: Do not enable uaccess for invalidate_icache_range
  arm64: Do not enable uaccess for flush_icache_range
  arm64: Apply errata to swsusp_arch_suspend_exit
  arm64: assembler: add conditional cache fixups
  arm64: assembler: replace `kaddr` with `addr`

4 years agoMerge branch 'for-next/boot' into for-next/core
Will Deacon [Wed, 2 Jun 2021 16:57:29 +0000 (17:57 +0100)]
Merge branch 'for-next/boot' into for-next/core

* for-next/boot:
  arm64: scs: Drop unused 'tmp' argument to scs_{load, save} asm macros
  arm64: smp: initialize cpu offset earlier
  arm64: smp: unify task and sp setup
  arm64: smp: remove stack from secondary_data
  arm64: smp: remove pointless secondary_data maintenance
  arm64: assembler: add set_this_cpu_offset
  arm64: stacktrace: Relax frame record alignment requirement to 8 bytes
  arm64: Change the on_*stack functions to take a size argument
  arm64: Implement stack trace termination record

4 years agoMerge remote-tracking branch 'spi/for-5.13' into spi-linus
Mark Brown [Wed, 2 Jun 2021 16:13:21 +0000 (17:13 +0100)]
Merge remote-tracking branch 'spi/for-5.13' into spi-linus

4 years agoMerge remote-tracking branch 'spi/for-5.12' into spi-linus
Mark Brown [Wed, 2 Jun 2021 16:13:19 +0000 (17:13 +0100)]
Merge remote-tracking branch 'spi/for-5.12' into spi-linus

4 years agoMerge remote-tracking branch 'regulator/for-5.13' into regulator-linus
Mark Brown [Wed, 2 Jun 2021 16:13:03 +0000 (17:13 +0100)]
Merge remote-tracking branch 'regulator/for-5.13' into regulator-linus

4 years agoMerge remote-tracking branch 'asoc/for-5.13' into asoc-linus
Mark Brown [Wed, 2 Jun 2021 16:12:43 +0000 (17:12 +0100)]
Merge remote-tracking branch 'asoc/for-5.13' into asoc-linus

4 years agousb: pd: Set PD_T_SINK_WAIT_CAP to 310ms
Kyle Tso [Fri, 28 May 2021 08:16:13 +0000 (16:16 +0800)]
usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms

Current timer PD_T_SINK_WAIT_CAP is set to 240ms which will violate the
SinkWaitCapTimer (tTypeCSinkWaitCap 310 - 620 ms) defined in the PD
Spec if the port is faster enough when running the state machine. Set it
to the lower bound 310ms to ensure the timeout is in Spec.

Fixes: f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Kyle Tso <kyletso@google.com>
Link: https://lore.kernel.org/r/20210528081613.730661-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agousb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling
Thomas Petazzoni [Fri, 28 May 2021 14:04:46 +0000 (16:04 +0200)]
usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling

In commit 92af4fc6ec33 ("usb: musb: Fix suspend with devices
connected for a64"), the logic to support the
MUSB_QUIRK_B_DISCONNECT_99 quirk was modified to only conditionally
schedule the musb->irq_work delayed work.

This commit badly breaks ECM Gadget on AM335X. Indeed, with this
commit, one can observe massive packet loss:

$ ping 192.168.0.100
...
15 packets transmitted, 3 received, 80% packet loss, time 14316ms

Reverting this commit brings back a properly functioning ECM
Gadget. An analysis of the commit seems to indicate that a mistake was
made: the previous code was not falling through into the
MUSB_QUIRK_B_INVALID_VBUS_91, but now it is, unless the condition is
taken.

Changing the logic to be as it was before the problematic commit *and*
only conditionally scheduling musb->irq_work resolves the regression:

$ ping 192.168.0.100
...
64 packets transmitted, 64 received, 0% packet loss, time 64475ms

Fixes: 92af4fc6ec33 ("usb: musb: Fix suspend with devices connected for a64")
Cc: stable@vger.kernel.org
Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Tested-by: Drew Fustini <drew@beagleboard.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Link: https://lore.kernel.org/r/20210528140446.278076-1-thomas.petazzoni@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agousb: dwc3: gadget: Bail from dwc3_gadget_exit() if dwc->gadget is NULL
Jack Pham [Fri, 28 May 2021 16:04:05 +0000 (09:04 -0700)]
usb: dwc3: gadget: Bail from dwc3_gadget_exit() if dwc->gadget is NULL

There exists a possible scenario in which dwc3_gadget_init() can fail:
during during host -> peripheral mode switch in dwc3_set_mode(), and
a pending gadget driver fails to bind.  Then, if the DRD undergoes
another mode switch from peripheral->host the resulting
dwc3_gadget_exit() will attempt to reference an invalid and dangling
dwc->gadget pointer as well as call dma_free_coherent() on unmapped
DMA pointers.

The exact scenario can be reproduced as follows:
 - Start DWC3 in peripheral mode
 - Configure ConfigFS gadget with FunctionFS instance (or use g_ffs)
 - Run FunctionFS userspace application (open EPs, write descriptors, etc)
 - Bind gadget driver to DWC3's UDC
 - Switch DWC3 to host mode
   => dwc3_gadget_exit() is called. usb_del_gadget() will put the
ConfigFS driver instance on the gadget_driver_pending_list
 - Stop FunctionFS application (closes the ep files)
 - Switch DWC3 to peripheral mode
   => dwc3_gadget_init() fails as usb_add_gadget() calls
check_pending_gadget_drivers() and attempts to rebind the UDC
to the ConfigFS gadget but fails with -19 (-ENODEV) because the
FFS instance is not in FFS_ACTIVE state (userspace has not
re-opened and written the descriptors yet, i.e. desc_ready!=0).
 - Switch DWC3 back to host mode
   => dwc3_gadget_exit() is called again, but this time dwc->gadget
is invalid.

Although it can be argued that userspace should take responsibility
for ensuring that the FunctionFS application be ready prior to
allowing the composite driver bind to the UDC, failure to do so
should not result in a panic from the kernel driver.

Fix this by setting dwc->gadget to NULL in the failure path of
dwc3_gadget_init() and add a check to dwc3_gadget_exit() to bail out
unless the gadget pointer is valid.

Fixes: e81a7018d93a ("usb: dwc3: allocate gadget structure dynamically")
Cc: <stable@vger.kernel.org>
Reviewed-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Link: https://lore.kernel.org/r/20210528160405.17550-1-jackp@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agousb: dwc3: gadget: Disable gadget IRQ during pullup disable
Wesley Cheng [Fri, 21 May 2021 04:23:57 +0000 (21:23 -0700)]
usb: dwc3: gadget: Disable gadget IRQ during pullup disable

Current sequence utilizes dwc3_gadget_disable_irq() alongside
synchronize_irq() to ensure that no further DWC3 events are generated.
However, the dwc3_gadget_disable_irq() API only disables device
specific events.  Endpoint events can still be generated.  Briefly
disable the interrupt line, so that the cleanup code can run to
prevent device and endpoint events. (i.e. __dwc3_gadget_stop() and
dwc3_stop_active_transfers() respectively)

Without doing so, it can lead to both the interrupt handler and the
pullup disable routine both writing to the GEVNTCOUNT register, which
will cause an incorrect count being read from future interrupts.

Fixes: ae7e86108b12 ("usb: dwc3: Stop active transfers before halting the controller")
Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/1621571037-1424-1-git-send-email-wcheng@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoMerge branch 'next/defconfig' into for-next
Krzysztof Kozlowski [Wed, 2 Jun 2021 13:24:11 +0000 (15:24 +0200)]
Merge branch 'next/defconfig' into for-next

4 years agoarm64: defconfig: Enable Exynos UFS driver
Alim Akhtar [Mon, 31 May 2021 17:00:57 +0000 (22:30 +0530)]
arm64: defconfig: Enable Exynos UFS driver

Enable the Exynos UFS controller and PHY configs. They need to be
buildin to ensure UFS devices gets detected on exynos7 and its
variant boards.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Link: https://lore.kernel.org/r/20210531170057.7730-1-alim.akhtar@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
4 years agoRevert "i915: use io_mapping_map_user"
Matthew Auld [Thu, 27 May 2021 18:51:45 +0000 (19:51 +0100)]
Revert "i915: use io_mapping_map_user"

This reverts commit b739f125e4ebd73d10ed30a856574e13649119ed.

We are unfortunately seeing more issues like we did in 293837b9ac8d
("Revert "i915: fix remap_io_sg to verify the pgprot""), except this is
now for the vm_fault_gtt path, where we are now hitting the same
BUG_ON(!pte_none(*pte)):

[10887.466150] kernel BUG at mm/memory.c:2183!
[10887.466162] invalid opcode: 0000 [#1] PREEMPT SMP PTI
[10887.466168] CPU: 0 PID: 7775 Comm: ffmpeg Tainted: G     U            5.13.0-rc3-CI-Nightly #1
[10887.466174] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.40 07/14/2017
[10887.466177] RIP: 0010:remap_pfn_range_notrack+0x30f/0x440
[10887.466188] Code: e8 96 d7 e0 ff 84 c0 0f 84 27 01 00 00 48 ba 00 f0 ff ff ff ff 0f 00 4c 89 e0 48 c1 e0 0c 4d 85 ed 75 96 48 21 d0 31 f6 eb a9 <0f> 0b 48 39 37 0f 85 0e 01 00 00 48 8b 0c 24 48 39 4f 08 0f 85 00
[10887.466193] RSP: 0018:ffffc90006e33c50 EFLAGS: 00010286
[10887.466198] RAX: 800000000000002f RBX: 00007f5e01800000 RCX: 0000000000000028
[10887.466201] RDX: 0000000000000001 RSI: ffffea0000000000 RDI: 0000000000000000
[10887.466204] RBP: ffffea000033fea8 R08: 800000000000002f R09: ffff8881072256e0
[10887.466207] R10: ffffc9000b84fff8 R11: 0000000017dab000 R12: 0000000000089f9f
[10887.466210] R13: 800000000000002f R14: 00007f5e017e4000 R15: ffff88800cffaf20
[10887.466213] FS:  00007f5e04849640(0000) GS:ffff888278000000(0000) knlGS:0000000000000000
[10887.466216] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[10887.466220] CR2: 00007fd9b191a2ac CR3: 00000001829ac000 CR4: 00000000003506f0
[10887.466223] Call Trace:
[10887.466233]  vm_fault_gtt+0x1ca/0x5d0 [i915]
[10887.466381]  ? ktime_get+0x38/0x90
[10887.466389]  __do_fault+0x37/0x90
[10887.466395]  __handle_mm_fault+0xc46/0x1200
[10887.466402]  handle_mm_fault+0xce/0x2a0
[10887.466407]  do_user_addr_fault+0x1c5/0x660

Reverting this commit is reported to fix the issue.

Reported-by: Eero Tamminen <eero.t.tamminen@intel.com>
References: https://gitlab.freedesktop.org/drm/intel/-/issues/3519
Fixes: b739f125e4eb ("i915: use io_mapping_map_user")
Cc: Christoph Hellwig <hch@lst.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210527185145.458021-1-matthew.auld@intel.com
(cherry picked from commit 0e4fe0c9f2f981f26e01b73f3c465ca314c4f9c0)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
4 years agodrm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest()
Zhihao Cheng [Tue, 1 Jun 2021 09:19:35 +0000 (09:19 +0000)]
drm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest()

In case of error, the function live_context() returns ERR_PTR() and never
returns NULL. The NULL test in the return value check should be replaced
with IS_ERR().

Fixes: 52c0fdb25c7c ("drm/i915: Replace global breadcrumbs with per-context interrupt tracking")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/33c46ef24cd547d0ad21dc106441491a@intel.com
[tursulin: Wrap commit text, fix Fixes: tag.]
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
(cherry picked from commit 8f4caef8d5401b42c6367d46c23da5e0e8111516)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
4 years agoperf: qcom_l2_pmu: move to use request_irq by IRQF_NO_AUTOEN flag
Tian Tao [Wed, 2 Jun 2021 01:00:42 +0000 (09:00 +0800)]
perf: qcom_l2_pmu: move to use request_irq by IRQF_NO_AUTOEN flag

request_irq() after setting IRQ_NOAUTOEN as below
irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can
be replaced by request_irq() with IRQF_NO_AUTOEN flag.

this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
is being merged: https://lore.kernel.org/patchwork/patch/1388765/

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/1622595642-61678-3-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Will Deacon <will@kernel.org>
4 years agoarm_pmu: move to use request_irq by IRQF_NO_AUTOEN flag
Tian Tao [Wed, 2 Jun 2021 01:00:41 +0000 (09:00 +0800)]
arm_pmu: move to use request_irq by IRQF_NO_AUTOEN flag

request_irq() after setting IRQ_NOAUTOEN as below
irq_set_status_flags(irq, IRQ_NOAUTOEN);
request_irq(dev, irq...);
can be replaced by request_irq() with IRQF_NO_AUTOEN flag.

this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which
is being merged: https://lore.kernel.org/patchwork/patch/1388765/

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/1622595642-61678-2-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Will Deacon <will@kernel.org>
4 years agoALSA: timer: Fix master timer notification
Takashi Iwai [Wed, 2 Jun 2021 11:38:23 +0000 (13:38 +0200)]
ALSA: timer: Fix master timer notification

snd_timer_notify1() calls the notification to each slave for a master
event, but it passes a wrong event number.  It should be +10 offset,
corresponding to SNDRV_TIMER_EVENT_MXXX, but it's incorrectly with
+100 offset.  Casually this was spotted by UBSAN check via syzkaller.

Reported-by: syzbot+d102fa5b35335a7e544e@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/000000000000e5560e05c3bd1d63@google.com
Link: https://lore.kernel.org/r/20210602113823.23777-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agospi: spi-zynq-qspi: Fix some wrong goto jumps & missing error code
zpershuai [Thu, 27 May 2021 10:20:57 +0000 (18:20 +0800)]
spi: spi-zynq-qspi: Fix some wrong goto jumps & missing error code

In zynq_qspi_probe function, when enable the device clock is done,
the return of all the functions should goto the clk_dis_all label.

If num_cs is not right then this should return a negative error
code but currently it returns success.

Signed-off-by: zpershuai <zpershuai@gmail.com>
Link: https://lore.kernel.org/r/1622110857-21812-1-git-send-email-zpershuai@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>