From: Conor Dooley <conor.dooley(a)microchip.com>
Quoting the llvm docs:
> Between versions 2.0 and 2.1 of the base I specification, a backwards
> incompatible change was made to remove selected instructions and CSRs
> from the base ISA. These instructions were grouped into a set of new
> extensions, but were no longer required by the base ISA. (snip) LLVM
> currently implements version 2.0 of the base specification. Thus,
> instructions from these extensions are accepted as part of the base
> ISA.
There is therefore no need (at present!) to carry out a $cc-option
check, and instead just gate presence of zicsr and zifencei in march
on the version of binutils that commit 6df2a016c0c8 ("riscv: fix build
with binutils 2.38") highlights as the introduction of the requirement.
In fact, the status quo creates some issues with mixed llvm/binutils
builds, specifically building with llvm-17 and ld from binutils-2.35.
Odd combo you may think, but this is what tuxsuite's debian stable uses
while testing 5.10 stable kernels as doesn't support LLD.
CC: stable(a)vger.kernel.org # needs RISC-V: move zicsr/zifencei spec version check to Kconfi
Reported-by: Naresh Kamboju <naresh.kamboju(a)linaro.org>
Link: https://lore.kernel.org/all/CA+G9fYt9T=ELCLaB9byxaLW2Qf4pZcDO=huCA0D8ug2V2+…
Suggested-by: Nathan Chancellor <nathan(a)kernel.org>
Signed-off-by: Conor Dooley <conor.dooley(a)microchip.com>
---
arch/riscv/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 4eb0ef8314b3..c6902f4c5650 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -291,8 +291,7 @@ endchoice
config TOOLCHAIN_NEEDS_SPEC_20191213
bool
default y
- depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zicsr_zifencei)
- depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zicsr_zifencei)
+ depends on AS_IS_GNU && AS_VERSION >= 23800
help
Newer binutils versions default to ISA spec version 20191213 which
moves some instructions from the I extension to the Zicsr and Zifencei
--
2.39.1
From: Jimmy Hu <hhhuuu(a)google.com>
When the host controller is not responding, all URBs queued to all
endpoints need to be killed. This can cause a kernel panic if we
dereference an invalid endpoint.
Fix this by using xhci_get_virt_ep() helper to find the endpoint and
checking if the endpoint is valid before dereferencing it.
[233311.853271] xhci-hcd xhci-hcd.1.auto: xHCI host controller not responding, assume dead
[233311.853393] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000e8
[233311.853964] pc : xhci_hc_died+0x10c/0x270
[233311.853971] lr : xhci_hc_died+0x1ac/0x270
[233311.854077] Call trace:
[233311.854085] xhci_hc_died+0x10c/0x270
[233311.854093] xhci_stop_endpoint_command_watchdog+0x100/0x1a4
[233311.854105] call_timer_fn+0x50/0x2d4
[233311.854112] expire_timers+0xac/0x2e4
[233311.854118] run_timer_softirq+0x300/0xabc
[233311.854127] __do_softirq+0x148/0x528
[233311.854135] irq_exit+0x194/0x1a8
[233311.854143] __handle_domain_irq+0x164/0x1d0
[233311.854149] gic_handle_irq.22273+0x10c/0x188
[233311.854156] el1_irq+0xfc/0x1a8
[233311.854175] lpm_cpuidle_enter+0x25c/0x418 [msm_pm]
[233311.854185] cpuidle_enter_state+0x1f0/0x764
[233311.854194] do_idle+0x594/0x6ac
[233311.854201] cpu_startup_entry+0x7c/0x80
[233311.854209] secondary_start_kernel+0x170/0x198
Fixes: 50e8725e7c42 ("xhci: Refactor command watchdog and fix split string.")
Cc: stable(a)vger.kernel.org
Signed-off-by: Jimmy Hu <hhhuuu(a)google.com>
Signed-off-by: Mathias Nyman <mathias.nyman(a)linux.intel.com>
---
drivers/usb/host/xhci-ring.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index ddc30037f9ce..f5b0e1ce22af 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1169,7 +1169,10 @@ static void xhci_kill_endpoint_urbs(struct xhci_hcd *xhci,
struct xhci_virt_ep *ep;
struct xhci_ring *ring;
- ep = &xhci->devs[slot_id]->eps[ep_index];
+ ep = xhci_get_virt_ep(xhci, slot_id, ep_index);
+ if (!ep)
+ return;
+
if ((ep->ep_state & EP_HAS_STREAMS) ||
(ep->ep_state & EP_GETTING_NO_STREAMS)) {
int stream_id;
--
2.25.1
This is the start of the stable review cycle for the 4.19.274 release.
There are 12 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 Sat, 25 Feb 2023 14:15:30 +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/v4.x/stable-review/patch-4.19.274-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.274-rc2
Linus Torvalds <torvalds(a)linux-foundation.org>
bpf: add missing header file include
Kees Cook <keescook(a)chromium.org>
ext4: Fix function prototype mismatch for ext4_feat_ktype
Lukas Wunner <lukas(a)wunner.de>
wifi: mwifiex: Add missing compatible string for SD8787
Dave Hansen <dave.hansen(a)linux.intel.com>
uaccess: Add speculation barrier to copy_from_user()
Pavel Skripkin <paskripkin(a)gmail.com>
mac80211: mesh: embedd mesh_paths and mpp_paths into ieee80211_if_mesh
Zheng Wang <zyytlz.wz(a)163.com>
drm/i915/gvt: fix double free bug in split_2MB_gtt_entry
Thomas Gleixner <tglx(a)linutronix.de>
alarmtimer: Prevent starvation by small intervals and SIG_IGN
Sean Anderson <sean.anderson(a)seco.com>
powerpc: dts: t208x: Disable 10G on MAC1 and MAC2
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: kvaser_usb: hydra: help gcc-13 to figure out cmd_len
Jason A. Donenfeld <Jason(a)zx2c4.com>
random: always mix cycle counter in add_latent_entropy()
Sean Anderson <sean.anderson(a)seco.com>
powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G
Bitterblue Smith <rtl8821cerfe2(a)gmail.com>
wifi: rtl8xxxu: gen2: Turn on the rate control
-------------
Diffstat:
Makefile | 4 +-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-2.dtsi | 44 +++++++++++
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-3.dtsi | 44 +++++++++++
arch/powerpc/boot/dts/fsl/t2081si-post.dtsi | 20 ++++-
drivers/gpu/drm/i915/gvt/gtt.c | 17 ++++-
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 33 +++++---
drivers/net/wireless/marvell/mwifiex/sdio.c | 1 +
.../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 8 +-
fs/ext4/sysfs.c | 7 +-
include/linux/nospec.h | 4 +
include/linux/random.h | 6 +-
kernel/bpf/core.c | 3 +-
kernel/time/alarmtimer.c | 33 +++++++-
lib/usercopy.c | 7 ++
net/mac80211/ieee80211_i.h | 24 +++++-
net/mac80211/mesh.h | 22 +-----
net/mac80211/mesh_pathtbl.c | 89 ++++++++--------------
17 files changed, 252 insertions(+), 114 deletions(-)