Remove the ODM_BB_RA_MASK capability. It is always set for this driver.
Like for ODM_BB_DIG before, we can be sure that ODM_BB_RA_MASK was never
checked before it was set.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove the ODM_BB_DIG capability. It is always set for this driver.
(ODM_BB_DIG was set in Update_ODM_ComInfo_88E and checked in odm_DIG,
which was always called after the capability was set.)
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The r8188 driver installs a dummy handler for some unused ioctls. All
that the dummy handler does is return -1.
Remove the dummy handler and let the wext core handle unused ioctls.
This way, user space gets a consistent errno for an unused wext ioctl,
regardless of which driver is used for the interface.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The _linked_rx_signal_strength_display function is used only in
rtw_mlme_ext.c. Make the function static and remove the prototype.
While at it, fix a typo in the function name.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
I just fixed a bug in copy_process when using the label
bad_fork_cleanup_threadgroup_lock. While fixing the bug I looked
closer at the label and realized it has been misnamed since
568ac88821 ("cgroup: reduce read locked section of
cgroup_threadgroup_rwsem during fork").
Fix the name so that fork is easier to understand.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Mark Brown <broonie@kernel.org> reported:
> This is also causing further build errors including but not limited to:
>
> /tmp/next/build/kernel/fork.c: In function 'copy_process':
> /tmp/next/build/kernel/fork.c:2106:4: error: label 'bad_fork_cleanup_threadgroup_lock' used but not defined
> 2106 | goto bad_fork_cleanup_threadgroup_lock;
> | ^~~~
It turns out that I messed up and was depending upon a label protected
by an ifdef. Move the label out of the ifdef as the ifdef around the label
no longer makes sense (if it ever did).
Link: https://lkml.kernel.org/r/YbugCP144uxXvRsk@sirena.org.uk
Fixes: 40966e316f ("kthread: Ensure struct kthread is present for all kthreads")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Clean up the rtl8188e_sreset_linked_status_check, which has just
been moved to rtw_mlme_ext.
Don't initialise variables to 0 if the first access sets a new value.
Check the value of fw_status only once.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211212185833.22000-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Move rtl8188e_sreset_linked_status_check from the hal layer into
rtw_mlme_ext.c.
Like the xmit status check, this is a simple function that's only
called from one place.
With this function gone, hal/rtl8188e_sreset.c and
include/rtl8188e_sreset.h are now empty and can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211212185833.22000-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Move rtl8188e_sreset_xmit_status_check from the hal layer into
rtw_cmd.c.
As this driver supports only the 8188 chipset, there's no need
to go through the hal layer for simple operations that have only
one caller.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211212185833.22000-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The double `for' in the comment in line 2203 is repeated. Remove one
of them from the comment.
Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Link: https://lore.kernel.org/r/20211211091632.264035-1-wangborong@cdjrlc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The double `new' in the comment in line 1349 and `to' in the comment in
line 2030 are repeated. Remove the repeated words from these comments.
Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Link: https://lore.kernel.org/r/20211211091422.260442-1-wangborong@cdjrlc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pm_runtime_get_sync can also return 1 on success, change
to use pm_runtime_resume_and_get which return 0 only on
success.
This bug has been discovered by Dan Carpenter by using Smatch
static checker.
Fixes: 285892a74f ("remoteproc: Add Renesas rcar driver")
Signed-off-by: Julien Massot <julien.massot@iot.bzh>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
[Fixed blank line between tags]
Link: https://lore.kernel.org/r/20211216160653.203768-1-julien.massot@iot.bzh
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
A large part of this is cleanups to existing device trees in order to
improve validation of the device trees using the dt-schema tooling.
This also contains a set of new device trees for various boards that
have been contributed by community members as well as fixes to existing
devices.
-----BEGIN PGP SIGNATURE-----
iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmG8sjMTHHRyZWRpbmdA
bnZpZGlhLmNvbQAKCRDdI6zXfz6zoVRwEAC3bpMxfr01p98zxX3hwiAEW5prN1zJ
eKgBvalvGXSfF1YfWhpjQ7gX2Q2jZwnriChE47BPlskwCMCwMj+5Fn78WsB/a49W
WeyvYUY9PSAUTY+EmlaV+Mzu+XHAaE28/YMoIp4CWaWMFqRe8pgXoxE89zldy3KV
HS5M6TIQWm8R+VSgFUX05C/OMiGury+9bs1qiYr/CXtcAuwDM+f7ZLtRYzXXZafk
UHZWmrvQAKXQm+U2fZRRE9AB1o0NXXZ6HKCI+TWhhNIxT3z/ZTrVKmKiqqHwJ1Ly
L6GMxoUbYxVNnzViopzihJFaZSXwDKbJBtCCOzg4E+x4UfB5aXUKuA/0apX3Zd5U
7DRUG3a92brrpx1cVtGaHlBtFL8zIppELgqVTThsUn4i43WU9upmbfnHy0x2sBEt
eODyqRSWuTZTLwXliuiJkE2u5eyQcC0ze5/lKIF/2upQ8EDC/9mzpVWB72vOluSe
nO/PMFPBLvQjrYYtuTp66Eqfpe59QiCTdrCOJLR/YsrXqG7WDNhkVLfccpmCNaZ1
uJyAOK1W9kjL7mbodyHrv92y5QLnx/1H2OU+sC65M+Qlq4w+rxnf1g+TOz32CSor
UZuTlBvhdbdq+8ibd6S5QzxkqvqvsP2VkaTvUb7PxqSl20Lt2mBKFuym8Oe3/4Z8
V/0L2KIhFqTJ6g==
=2rZJ
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmHAq84ACgkQmmx57+YA
GNlvcA/+NPSr/UkQFdJGJdej3/MLp5FyvriLZf7qyqebRsoVK14N/l4L4fMNizss
sKqZU6/ZkQevVmBIW3v3iioKEsFGFPkhnmicPZjpuhvMu5OOn7rPA6YvA8UJDK+1
/opnD39z/NLVJxIoC4mWMMYxP4gWMTYNXNPMqfTnF8stKcZwErzNYGudMBoIbZ6f
UUhVbs9SatsSlfJD8QTUgavr+ve8/RbjoKGkEmrYJwaSps6V/NikwWLrRogHHNg2
Ui3YXutRarzOuJFboDlLey8hZBdkhIMWGkOcmCvnLZfJ1oqpIcCz2mqSoeikO+j1
vH3l2a9JazrXfE59rxbF94iqAPCPms0l4C8GfTLiTs+bvEe+YgcVPvv7Yj5GBcke
oUtirvVd3QmSZ3LtDI8Jpjt6VitkGDvZRcU+ZN/b0vDTi1j8c7EDvLMCRCuy/yVr
7zYINyAkLlK6FdxcXCv6FHh4qtG/bKh6OWuAPtxe/OHo18c4DhWnGuWP351bQyBD
11Iov+P7NeuUG7L7SMkuE8/Z72vseTHZnpDW8wW6jTxDh0fsk7ValjlXZhMy4K1C
DVmpYOa8bh/rx4nCJo2fk1t4vgEMkMySgznd1pTM0q5UOtdrw985+2EcweOpVN7q
VUhXmhoLldyFvFGjL/OnKUPvR/UWt1Rg1xZwz1nTux/Ifkl1aCo=
=WDGY
-----END PGP SIGNATURE-----
Merge tag 'tegra-for-5.17-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt
ARM: tegra: Changes for v5.17-rc1
A large part of this is cleanups to existing device trees in order to
improve validation of the device trees using the dt-schema tooling.
This also contains a set of new device trees for various boards that
have been contributed by community members as well as fixes to existing
devices.
* tag 'tegra-for-5.17-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (55 commits)
ARM: tegra: Add host1x hotflush reset on Tegra124
ARM: tegra: Add memory client hotflush resets on Tegra114
ARM: tegra: Add back gpio-ranges properties
ARM: tegra: paz00: Enable S/PDIF and HDMI audio
ARM: tegra: acer-a500: Enable S/PDIF and HDMI audio
ARM: tegra: Add HDMI audio graph to Tegra20 device-tree
ARM: tegra: Add S/PDIF node to Tegra20 device-tree
ARM: tegra20/30: Disable unused host1x hardware
ARM: tegra: Add Memory Client resets to Tegra30 GR2D, GR3D and Host1x
ARM: tegra: Add Memory Client resets to Tegra20 GR2D, GR3D and Host1x
ARM: tegra: Add OPP tables and power domains to Tegra30 device-trees
ARM: tegra: Add OPP tables and power domains to Tegra20 device-trees
ARM: tegra: Add 500 MHz entry to Tegra30 memory OPP table
ARM: tegra: Enable video decoder on Tegra114
ARM: tegra: nexus7: Use common LVDS display device-tree
ARM: tegra: Add CPU thermal zones to Nyan device-tree
ARM: tegra: Enable CPU DFLL on Nyan
ARM: tegra: Enable HDMI CEC on Nyan
ARM: tegra: Add usb-role-switch property to USB OTG ports
ARM: tegra: Add device-tree for 1080p version of Nyan Big
...
Link: https://lore.kernel.org/r/20211217162253.1801077-5-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Large pkt_len can lead to out-out-bound memcpy. Current
ath9k_hif_usb_rx_stream allows combining the content of two urb
inputs to one pkt. The first input can indicate the size of the
pkt. Any remaining size is saved in hif_dev->rx_remain_len.
While processing the next input, memcpy is used with rx_remain_len.
4-byte pkt_len can go up to 0xffff, while a single input is 0x4000
maximum in size (MAX_RX_BUF_SIZE). Thus, the patch adds a check for
pkt_len which must not exceed 2 * MAX_RX_BUG_SIZE.
BUG: KASAN: slab-out-of-bounds in ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
Read of size 46393 at addr ffff888018798000 by task kworker/0:1/23
CPU: 0 PID: 23 Comm: kworker/0:1 Not tainted 5.6.0 #63
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS rel-1.10.2-0-g5f4c7b1-prebuilt.qemu-project.org 04/01/2014
Workqueue: events request_firmware_work_func
Call Trace:
<IRQ>
dump_stack+0x76/0xa0
print_address_description.constprop.0+0x16/0x200
? ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
? ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
__kasan_report.cold+0x37/0x7c
? ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
kasan_report+0xe/0x20
check_memory_region+0x15a/0x1d0
memcpy+0x20/0x50
ath9k_hif_usb_rx_cb+0x490/0xed7 [ath9k_htc]
? hif_usb_mgmt_cb+0x2d9/0x2d9 [ath9k_htc]
? _raw_spin_lock_irqsave+0x7b/0xd0
? _raw_spin_trylock_bh+0x120/0x120
? __usb_unanchor_urb+0x12f/0x210
__usb_hcd_giveback_urb+0x1e4/0x380
usb_giveback_urb_bh+0x241/0x4f0
? __hrtimer_run_queues+0x316/0x740
? __usb_hcd_giveback_urb+0x380/0x380
tasklet_action_common.isra.0+0x135/0x330
__do_softirq+0x18c/0x634
irq_exit+0x114/0x140
smp_apic_timer_interrupt+0xde/0x380
apic_timer_interrupt+0xf/0x20
I found the bug using a custome USBFuzz port. It's a research work
to fuzz USB stack/drivers. I modified it to fuzz ath9k driver only,
providing hand-crafted usb descriptors to QEMU.
After fixing the value of pkt_tag to ATH_USB_RX_STREAM_MODE_TAG in QEMU
emulation, I found the KASAN report. The bug is triggerable whenever
pkt_len is above two MAX_RX_BUG_SIZE. I used the same input that crashes
to test the driver works when applying the patch.
Signed-off-by: Zekun Shen <bruceshenzk@gmail.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/YXsidrRuK6zBJicZ@10-18-43-117.dynapool.wireless.nyu.edu
syzbot is reporting lockdep warning at ath9k_wmi_event_tasklet() followed
by kernel panic at get_htc_epid_queue() from ath9k_htc_tx_get_packet() from
ath9k_htc_txstatus() [1], for ath9k_wmi_event_tasklet(WMI_TXSTATUS_EVENTID)
depends on spin_lock_init() from ath9k_init_priv() being already completed.
Since ath9k_wmi_event_tasklet() is set by ath9k_init_wmi() from
ath9k_htc_probe_device(), it is possible that ath9k_wmi_event_tasklet() is
called via tasklet interrupt before spin_lock_init() from ath9k_init_priv()
from ath9k_init_device() from ath9k_htc_probe_device() is called.
Let's hold ath9k_wmi_event_tasklet(WMI_TXSTATUS_EVENTID) no-op until
ath9k_tx_init() completes.
Link: https://syzkaller.appspot.com/bug?extid=31d54c60c5b254d6f75b [1]
Reported-by: syzbot <syzbot+31d54c60c5b254d6f75b@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tested-by: syzbot <syzbot+31d54c60c5b254d6f75b@syzkaller.appspotmail.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/77b76ac8-2bee-6444-d26c-8c30858b8daa@i-love.sakura.ne.jp
syzbot is reporting lockdep warning followed by kernel panic at
ath9k_htc_rxep() [1], for ath9k_htc_rxep() depends on ath9k_rx_init()
being already completed.
Since ath9k_htc_rxep() is set by ath9k_htc_connect_svc(WMI_BEACON_SVC)
from ath9k_init_htc_services(), it is possible that ath9k_htc_rxep() is
called via timer interrupt before ath9k_rx_init() from ath9k_init_device()
is called.
Since we can't call ath9k_init_device() before ath9k_init_htc_services(),
let's hold ath9k_htc_rxep() no-op until ath9k_rx_init() completes.
Link: https://syzkaller.appspot.com/bug?extid=4d2d56175b934b9a7bf9 [1]
Reported-by: syzbot <syzbot+4d2d56175b934b9a7bf9@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tested-by: syzbot <syzbot+4d2d56175b934b9a7bf9@syzkaller.appspotmail.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/2b88f416-b2cb-7a18-d688-951e6dc3fe92@i-love.sakura.ne.jp
IEEE80211_HW_USES_RSS is set in ath11k, then the device uses RSS and
thus requires parallel RX which implies using per-CPU station statistics
in sta_get_last_rx_stats() of mac80211. Currently signal is only set in
ath11k_mgmt_rx_event(), and not set for RX data packet, then it show
signal as 0 for iw command easily.
Change to get signal from firmware and report to mac80211.
For QCA6390 and WCN6855, the rssi value is already in dbm unit, so
don't need to convert it again.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211216070535.31732-1-quic_wgong@quicinc.com
Switching from legacy usage of ieee80211_get_tx_rates() lookup to direct
rate table lookup in struct ieee80211_sta->rates.
The current rate control API allows drivers to directly get rates from
ieee80211_sta->rates. ath5k is currently one of the legacy drivers that
perform translation/merge with the internal rate table via
ieee80211_get_tx_rates provided by rate control API.
For our upcoming changes to rate control API and the implementation of
transmit power control, this patch changes the behaviour. The call to
ieee80211_get_tx_rates and subsequent calls are also avoided. ath5k now
directly reads rates from sta->rates into its internal rate table. Cause
ath5k does not rely on the rate array in SKB->CB, this is not considered
anymore except for the first entry (used for probing).
Tested this on a PCEngines ALIX with CMP9-GP miniPCI wifi card (Atheros
AR5213A). Generated traffic between AP and multiple STAs before and
after applying the patch and simultaneously measured throughput and
captured rc_stats. Comparison resulted in same rate selection and no
performance loss between both runs.
Co-developed-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Signed-off-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211215215042.637-1-jelonek.jonas@gmail.com
Update the SCIF serial driver to remove printouts for break, frame, parity
and overrun errors. This reduces the amount of console printouts generated
by the defconfig kernel on R-Car Gen3 for certain use cases. To retrieve
more information about such errors the user may inspect counters. Also these
errors are fed into the TTY layer for further application specific handling.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Link: https://lore.kernel.org/r/163884254093.18109.2982470198301927679.sendpatchset@octo
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It's better to stick with standard API to write and read DL value
when the hardware is compatible with it. In case any quirks are
needed it may be easily added in one place rather than modifying
code here and there.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211122133512.8947-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add UPF_MAGIC_MULTIPLIER to the port flags since there is now
range checking in serial8250_get_baud_rate() in 8250_port.c.
Signed-off-by: Jay Dolan <jay.dolan@accesio.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211122133512.8947-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pericom along with Acces I/O support consumes a lot of LOCs in 8250_pci.c.
For the sake of easier maintenance, split it to a separate driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211122133512.8947-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
On modern Exynos SoCs (like Exynos850) the UART can be implemented as a
part of USI IP-core. In such case, USI driver is used to initialize USI
registers, and it also calls of_platform_populate() to instantiate all
sub-nodes (e.g. serial node) of USI node. When serial driver is
built-in, but USI driver is a module, and CONFIG_SERIAL_SAMSUNG_CONSOLE
is enabled, next call chain will happen when loading USI module from
user space:
usi_init
v
usi_probe
v
of_platform_populate
v
s3c24xx_serial_probe
v
uart_add_one_port
v
uart_configure_port
v
register_console
v
try_enable_new_console
v
s3c24xx_serial_console_setup
But because the serial driver is built-in, and
s3c24xx_serial_console_setup() is marked with __init keyword, that
symbol will discarded and long gone by that time already, causing failed
paging request.
That happens during the next config combination:
EXYNOS_USI=m
SERIAL_SAMSUNG=y
SERIAL_SAMSUNG_CONSOLE=y
That config should be completely possible, so rather than limiting
SERIAL_SAMSUNG choice to "m" only when USI=m, remove __init keyword for
all affected functions.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20211204195757.8600-6-semen.protsenko@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Enable serial driver to be built as a module. To do so, init the console
support on driver/module load instead of using console_initcall().
Inspired by commit 87a0b9f98a ("tty: serial: meson: enable console as
module").
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20211204195757.8600-5-semen.protsenko@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USI control is now extracted to the dedicated USI driver. Remove USI
related code from serial driver to avoid conflicts and code duplication.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20211204195757.8600-4-semen.protsenko@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge xen fixes from Juergen Gross:
"Fixes for two issues related to Xen and malicious guests:
- Guest can force the netback driver to hog large amounts of memory
- Denial of Service in other guests due to event storms"
* 'xsa' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/netback: don't queue unlimited number of packages
xen/netback: fix rx queue stall detection
xen/console: harden hvc_xen against event channel storms
xen/netfront: harden netfront against event channel storms
xen/blkfront: harden blkfront against event channel storms
Now that we require locking to evict, multiple vmas from the same object
might not be evicted. This is expected and required, because execbuf will
move to short-term pinning by using the lock only. This will cause these
tests to fail, because they create a ton of vma's for the same object.
Unbind manually to prevent spurious -ENOSPC in those mock tests.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211216142749.1966107-8-maarten.lankhorst@linux.intel.com
In the next commits, we may not evict when refcount = 0.
igt_vm_isolation() continuously tries to pin/unpin at same address,
but also calls put() on the object, which means the object may not
be unpinned in time.
Instead of this, re-use the same object over and over, so they can
be unbound as required.
Changes since v1:
- Fix cleaning up obj_b on failure. (Matt)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211216142749.1966107-7-maarten.lankhorst@linux.intel.com
We will need the lock to unbind the vma, and wait for bind to complete.
Remove the special casing for the !ww path, and force ww locking for all.
Changes since v1:
- Pass err to for_i915_gem_ww handling for -EDEADLK handling.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211216142749.1966107-6-maarten.lankhorst@linux.intel.com
Big delta, but boils down to moving set_pages to i915_vma.c, and removing
the special handling, all callers use the defaults anyway. We only remap
in ggtt, so default case will fall through.
Because we still don't require locking in i915_vma_unpin(), handle this by
using xchg in get_pages(), as it's locked with obj->mutex, and cmpxchg in
unpin, which only fails if we race a against a new pin.
Changes since v1:
- aliasing gtt sets ZERO_SIZE_PTR, not -ENODEV, remove special case
from __i915_vma_get_pages(). (Matt)
Changes since v2:
- Free correct old pages in __i915_vma_get_pages(). (Matt)
Remove race of clearing vma->pages accidentally from put,
free it but leave it set, as only get has the lock.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211216142749.1966107-4-maarten.lankhorst@linux.intel.com
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
- A couple of cleanups from Lukas Bulwahn to remove left-over from
i.MX{27,31,35} board file removal, and rename DEBUG_IMX21_IMX27_UART
to DEBUG_IMX27_UART.
-----BEGIN PGP SIGNATURE-----
iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmG9eRkUHHNoYXduZ3Vv
QGtlcm5lbC5vcmcACgkQUFdYWoewfM4Ggwf9Fquqf5HlMGRg4DjTuJqeZL1Gaj2+
BMeSsCYhVxiWhxp1HD8gEhJbJKpLgv5HApSlXvcqAyLNbG+4YqrI+u5In1HFkiV3
KYZQCE1PPKOvDgM7Yopn9yvdj6NB6xCVmR1XxxFPZpMHvZn0uoefoEpzSqnS7BcC
qJaoq1hcuMytDOgmzhJBOrrUzHJBkAno4w5zV9i4V5b+OFPFgESasuj4GXjQnRvZ
blE87CnrgbI6zKJTfSWKO0r2YMFzp4RdQhTC/7WbtWLo5iuj+VpgfdHlrpldfapF
XJPftmONJob4tEngfWyLW9CpSPzG0C/9jns3+xH/BHtOdshU/Ou4k/mIlw==
=79Mw
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmHAoZ4ACgkQmmx57+YA
GNm7OxAAjIkhtPtp8sgN32ixWSP3UaTfUDQst4xWvVK/emWpZCVb70h+UwpOjtEa
t0d5cj+LZCl0ZtKHNDVz98ztSLVLQqCY/qDaU3Qkm0Y5PXH9aZHh7k+A5UOVBdd6
SVIC09uFfawz5sQVUkKaM4i4uDAUzQQ/zbnL4BmY2i9ZYmeYjuOjpdCpz9ptzVN9
mJfwwiyCAFK2rTscXVBz2gxGqpaiHQWaR6fj2OvjxFwetM80U/6U/qJiw+FNwjAa
BXghkeNv448VMnHhG0hnt5MUGpSnPGemRu53Dv+R4cU/fuEDaDuCSo8ljtZrhhw6
YdmXbbOzE2A5NslLVFai+X6/72/EGWWLmwL3Armm0YuYuP6EgZzMZfCVTpP3Sy/s
ofZs8NuWZINk+OyFjOW2wlYuvC8g9gRQYw6m1xHY16PpJP9dbScO8pBtX0vhELYY
BuUIwFYdTO/NeIYwqCE2NCbebn5vERZ1sKRmvMu7oUXmM+HJbF2Xp2QL63XYouSa
xCLjEax2f8Nyu4ilw9ltLG7jWDp8mVX/vAeQTsMkuHeZ7Ev2Pfl57PHl/hGuGLpS
ej85uhmcXwf9XurY4yhI20l+7AtNhrx05KOsaqA5+gh5pKMS/nE4yiY79B3Kvhmn
DPA/a8lAYc7YcKjBrNwPDXcMC+6lVU7EQUUYydEuLKvP2TfDOr4=
=YWKR
-----END PGP SIGNATURE-----
Merge tag 'imx-soc-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc
i.MX SoC update for 5.17:
- A couple of cleanups from Lukas Bulwahn to remove left-over from
i.MX{27,31,35} board file removal, and rename DEBUG_IMX21_IMX27_UART
to DEBUG_IMX27_UART.
* tag 'imx-soc-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
ARM: imx: rename DEBUG_IMX21_IMX27_UART to DEBUG_IMX27_UART
ARM: imx: remove dead left-over from i.MX{27,31,35} removal
Link: https://lore.kernel.org/r/20211218071427.26745-2-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
- Enable pinctrl and clock drivers for i.MX8 ULP SoC.
- A couple of patches from Adam Ford to enable Camera driver support
for Beacon EmbeddedWorks i.MX8MM development kit.
- Enable drivers for devices found on TQMa8MxML-MBa8Mx board.
- Enable RTC_DRV_RV3029C2 driver support for DHCOM devices.
-----BEGIN PGP SIGNATURE-----
iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmG9iKYUHHNoYXduZ3Vv
QGtlcm5lbC5vcmcACgkQUFdYWoewfM6Giwf+OjKD1fwYzsSRFVyY5m+Vn1iZANCi
sXb5mVQks435oeBV44O5AEsaTLb+qQEyFQZBL6IdbIlPm+LwHu2GYTn2F84bilww
vO7mVbIpeh7bInD3eELWdrE6BdhcsenlLi3Tg0oeMQ7HAk4FT7GzcWk2laVemOnU
RoWjTn0S97Bh4aWfGEg22c+wfh1Egp6rLmHxaXCUJDrCexyA4CLZ6+r/ZgFUlb2q
FbdmPyjPnasiyM1RsY+hWY6dELl8xJwNg8hCA1DBddDsDLj8gMYXvZmR3oYHOG/1
/6Z4y6gbJ7NK9h4xPvjJ/XCdlXaEpZAIwr3OB+aEpCIXHNTaTzQL3v240A==
=BPLr
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmHAoR8ACgkQmmx57+YA
GNncjBAAtHr7vQaai+8++OPDb3xwvABT1s2PxQ9m3JXvzxPfIjEMA+jp3Y4R2OM+
fu91HhdqHM/fRFHOMegDWWg8GObsOr2grLoC0QpZqySaXZUhD1btPpR4K70qC712
klf7GV3lqxk7hjLJvTSfiBJrHbpqZqCisXrV9kRiSQTaIE8556phzHejs1MhSmeE
RffrU1H7Z2gPyc0TiuOl52QmOIDkUknl5EQ+rXpADjVtzBdSjZ/MjarzLxX+cTKI
qxjI4dfe+9OJoKfIAGbeoV6s8jEYLs2TS4IopH3c8rH1gaGa18+kw/FdzZwOx0ak
Js3XasuRcQwwKwg3ijDpvfDOD0q21yl7u/6kYVDk8JV14q/2Ow/755wCYTBSS69m
u5FyZFmOZQ7bYx17IAs8hJ9JgPvviIr9SSVtezei6mBTYqrMZPeT+5OFV+xFO8CV
648gxeiSVPi1f0Nht3P0Pxi3dlj8G64g0tvwcMetMSQeaoKGxnevL7n2HVG13EUW
pBCirF9HpETiXxEQTI2HFhl9h3zCFjnYJjay354CWW3gndi3iE1Rdc7ItwMBgzCD
bqjcBcZ4M7TShi7T47S3VWMheJ9POrhVVpnYxXBe2b5hkn24zwh+cZu1Xhc8JSoW
HQ5VtnlMnTLlzOjN33O+I4YOZPuIPJ14XCmAA2Mr+1RZvqIbhOE=
=rJsW
-----END PGP SIGNATURE-----
Merge tag 'imx-defconfig-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig
i.MX defconfig update for 5.17:
- Enable pinctrl and clock drivers for i.MX8 ULP SoC.
- A couple of patches from Adam Ford to enable Camera driver support
for Beacon EmbeddedWorks i.MX8MM development kit.
- Enable drivers for devices found on TQMa8MxML-MBa8Mx board.
- Enable RTC_DRV_RV3029C2 driver support for DHCOM devices.
* tag 'imx-defconfig-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
ARM: imx_v6_v7_defconfig: Enable for DHCOM devices required RTC_DRV_RV3029C2
arm64: defconfig: enable drivers for booting i.MX8ULP
arm64: defconfig: enable drivers for TQ TQMa8MxML-MBa8Mx
arm64: defconfig: Enable OV5640
arm64: defconfig: Enable VIDEO_IMX_MEDIA
Link: https://lore.kernel.org/r/20211218071427.26745-6-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Call drop_pages with the gem object lock held, instead of the other
way around. This will allow us to drop the vma bindings with the
gem object lock held.
We plan to require the object lock for unpinning in the future,
and this is an easy target.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211216142749.1966107-3-maarten.lankhorst@linux.intel.com
When reworking the code to move the eviction fence to the object,
the best code is removed code.
Remove some functions that are unused, and change the function definition
if it's only used in 1 place.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
[mlankhorst: Remove new use of i915_active_has_exclusive]
Link: https://patchwork.freedesktop.org/patch/msgid/20211216142749.1966107-2-maarten.lankhorst@linux.intel.com
- Sama7: addition of QSPI SPI-NOR and the QSPI controller for this
product
- Addition of the crypto algorithms that are fallbacks for HW engines
-----BEGIN PGP SIGNATURE-----
iHUEABYIAB0WIQQ5TRCVIBiyi/S+BG4fOrpwrNPNDAUCYbzBawAKCRAfOrpwrNPN
DJRsAP4qZurUWikvcozb3XDHbzrjGZK/g5m6r/LydWtf0YMqMAEA291YZ7lV6O96
9wSdR1pyuzfY8yoS7vT0bANcH4mTqwM=
=cxlf
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmHAnuEACgkQmmx57+YA
GNk2Gg//ft/ME4ridVKJ4ksnWA6BAiPAFBGjzWadO40xIXQCdUDIuQG0uQY5vHEh
XQjeSa8gI1vZEO1rYGOjCKDROaV7phKiLIC+clQ6eY8dQbLAIypxNXV5+rRqhfZP
fkbr49j8M25T0JLAeekaA8+9Xoz6Aqc1zYkpMoCBC5LrL4Zz9Zsr0DHE/J4fUwqM
ljixjealr2til6qT8YkpqjsQhQaxF+jDzKkMDNm4cHRe9OfU2GXytlQ4rF8yBUcL
WP+1Y5LV9fEo9okwozrdTzNFKlFIm1B9IQFxWg3jb3lMoch712DzpILssy/YXcD6
45BEcxFjIoiuK19hrc993yM9ugdeEKty6QvEz92Cu77owKyZu25VYg5722NqeG4/
9YX7PRJVYvQKWbqWdQyfBjmTIHh5sgJv2z1+kElflMN5cx61PkCr/hNJgGKxs+ju
CsQE77GH1RhQE6KW1C9spwyhFa8ZvwTv5zmvX/m2hJ8iTFzgUYMRe4i/5aOUhCHN
6h4C1tVvi/zt2KXyJ4SJk1yTZrTWWJ2u0d/sdF9epClVB9zcLEB+V2X7XE4cfpAo
YlsJYmydqM4zdzOncpm+SGBuUFUj7hn9XukPzqYT6Lb0MUc0K2wonw3nKjQRo5MD
lS8Ke8HHmceru8z7YIDzr1EtUZ3RjA7jwH5TJ9WjwNxfNJIqYbI=
=hIav
-----END PGP SIGNATURE-----
Merge tag 'at91-defconfig-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig
AT91 defconfig #1 for 5.17:
- Sama7: addition of QSPI SPI-NOR and the QSPI controller for this
product
- Addition of the crypto algorithms that are fallbacks for HW engines
* tag 'at91-defconfig-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
ARM: configs: at91: Enable crypto software implementations
ARM: configs: at91: sama7: Enable SPI NOR and QSPI controller
Link: https://lore.kernel.org/r/20211217165850.29694-1-nicolas.ferre@microchip.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
These patches enable various drivers used by new and existing boards in
both the Tegra default configuration and the multi-v7 configuration.
-----BEGIN PGP SIGNATURE-----
iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmG8snATHHRyZWRpbmdA
bnZpZGlhLmNvbQAKCRDdI6zXfz6zoTneEACBYzNQ0wCnJoO4RGhSl3K4A8zgQtLt
guyeZLbh2PW/wLOa12wy7+YB5nWABCCxsjZflr2teDwOv3E7FkAsCA5WpckqR2gk
Xej/QVdFnEpjESHc+JaReSimY2jfwUB2czVUraQRyukplk4YSPG3SCZ0Pw5TYVPy
/Ga77d4S0nk9uvP7TbNClaQq3YKUWNvgoE/3EmFnpJpyU31KSUQuc/ChD4taMYvO
WbLK9YdVCKVw/NLCqQjNNuv9f1TkeTSjMQQbmX5fpHNNw/YYQShtzS1bhAfFhCW7
rEqmX6HRK+uhiIQn9jnRGw5f08oJPRRKm4qo/l6nVsoaYMTZl+nX56irvHBn8MuU
rltc7hiliLwYawpVzNJmUOoPNbRZcCvEttx94RxpF2/7Vy6Sq4+xZmMkzPOA3d72
SOZbFm5L47Fineo4RqaByzhDz/e9ZV10jfN68XIB+Yzq/GpiO+J7+2UeTxoQQnSq
3hXypopKjLd8bo8bcx+2NeOcvLmt84OFQkqv1c5jj/tlx9Dwemfgf1PgNrwtGMqP
oCZztrLHWFnS5dtRDGotOTg+pR1GCCpahGZO+0B7lxe8xECbI7pgi6Hszn+HFItX
dD8tIgd2vRVDsuX5h45d3OuRg/vgB677iW5iMG104HrjT87jyiQO6+MEG1GXN7wr
VPvAuTSGYiKMsA==
=199F
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmHAnogACgkQmmx57+YA
GNkPzg/+PH3zEWKZfVzKimNOZufUg9r9ogHfDyvRHLywKTopEX/IxNTocdawCJhy
aAJV6F2JNggLbeo1Y5dC4VFN6MuOXVik18VtwbFP05X/mQM2AHqJ2yNa0U2MO+kE
D2/yMkutLGkJCOnl8cSsZKa+L7Wy+9mAZEwU8gGA5mMqcnA5RWdXi1KsG2wZr6A6
lFSnCauK0UfTmFq/cqJXhf8fGoaUyirUpBpy3mMTYVxg7Bzz8IsHNSMYymQA6rx/
K1zV1cF61juAU4eJIwPx/IvPXfWUG/rkOiW1fYwnYADKUo4fmPUTb2QMPLPqS34b
VigB5r+1Gz+9hl8mQXizYWhGeBCR9+/qNcAp1ceezkexlcZHyolXa0gy9fM7pL96
mw41NJDMxH1e//OP2HrpviQ6v3IC3oKO1wQl8+0luWC9TjYgrF6ykTKj1Gxm2W6k
dQ5svJnUe0UnUXVgvCSjMCn5oJGtahUpYwML2x7+aZuxvp4n8dlhoAoDjy9DW4wL
i1QKE5injMHNmhhS9km/kIz2LMfqTgvdZ7HSeelfOEf04w9jDj+bRueR0rsswqus
CpMqBH51Hze4WKVtlnoW4A09l2AflskZq101t2c4qWk97PdZW8nGqNpVbUPDh7Tx
XDeSwt2c0P12dQDg2H2Tvm2tW8OHky1HfgnWC1iykYPz5jiAxtc=
=xFt5
-----END PGP SIGNATURE-----
Merge tag 'tegra-for-5.17-arm-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig
ARM: tegra: Default configuration changes for v5.17-rc1
These patches enable various drivers used by new and existing boards in
both the Tegra default configuration and the multi-v7 configuration.
* tag 'tegra-for-5.17-arm-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
ARM: config: multi v7: Enable NVIDIA Tegra20 APB DMA driver
ARM: config: multi v7: Enable NVIDIA Tegra20 S/PDIF driver
ARM: tegra_defconfig: Enable S/PDIF driver
ARM: config: multi v7: Enable display drivers used by Tegra devices
ARM: tegra_defconfig: Enable drivers wanted by Acer Chromebooks and ASUS tablets
Link: https://lore.kernel.org/r/20211217162253.1801077-6-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>