The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 0b3bc018e86afdc0cbfef61328c63d5c08f8b370
Gitweb: https://git.kernel.org/tip/0b3bc018e86afdc0cbfef61328c63d5c08f8b370
Author: Kai Huang <kai.huang(a)intel.com>
AuthorDate: Sat, 07 Jun 2025 01:07:37 +12:00
Committer: Dave Hansen <dave.hansen(a)linux.intel.com>
CommitterDate: Tue, 10 Jun 2025 12:32:52 -07:00
x86/virt/tdx: Avoid indirect calls to TDX assembly functions
Two 'static inline' TDX helper functions (sc_retry() and
sc_retry_prerr()) take function pointer arguments which refer to
assembly functions. Normally, the compiler inlines the TDX helper,
realizes that the function pointer targets are completely static --
thus can be resolved at compile time -- and generates direct call
instructions.
But, other times (like when CONFIG_CC_OPTIMIZE_FOR_SIZE=y), the
compiler declines to inline the helpers and will instead generate
indirect call instructions.
Indirect calls to assembly functions require special annotation (for
various Control Flow Integrity mechanisms). But TDX assembly
functions lack the special annotations and can only be called
directly.
Annotate both the helpers as '__always_inline' to prod the compiler
into maintaining the direct calls. There is no guarantee here, but
Peter has volunteered to report the compiler bug if this assumption
ever breaks[1].
Fixes: 1e66a7e27539 ("x86/virt/tdx: Handle SEAMCALL no entropy error in common code")
Fixes: df01f5ae07dd ("x86/virt/tdx: Add SEAMCALL error printing for module initialization")
Signed-off-by: Kai Huang <kai.huang(a)intel.com>
Signed-off-by: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/lkml/20250605145914.GW39944@noisy.programming.kicks… [1]
Link: https://lore.kernel.org/all/20250606130737.30713-1-kai.huang%40intel.com
---
arch/x86/include/asm/tdx.h | 2 +-
arch/x86/virt/vmx/tdx/tdx.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h
index 8b19294..7ddef3a 100644
--- a/arch/x86/include/asm/tdx.h
+++ b/arch/x86/include/asm/tdx.h
@@ -106,7 +106,7 @@ void tdx_init(void);
typedef u64 (*sc_func_t)(u64 fn, struct tdx_module_args *args);
-static inline u64 sc_retry(sc_func_t func, u64 fn,
+static __always_inline u64 sc_retry(sc_func_t func, u64 fn,
struct tdx_module_args *args)
{
int retry = RDRAND_RETRY_LOOPS;
diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c
index 2457d13..c7a9a08 100644
--- a/arch/x86/virt/vmx/tdx/tdx.c
+++ b/arch/x86/virt/vmx/tdx/tdx.c
@@ -75,8 +75,9 @@ static inline void seamcall_err_ret(u64 fn, u64 err,
args->r9, args->r10, args->r11);
}
-static inline int sc_retry_prerr(sc_func_t func, sc_err_func_t err_func,
- u64 fn, struct tdx_module_args *args)
+static __always_inline int sc_retry_prerr(sc_func_t func,
+ sc_err_func_t err_func,
+ u64 fn, struct tdx_module_args *args)
{
u64 sret = sc_retry(func, fn, args);
Hi all,
#regzbot introduced: c53f23f7075c9f63f14d7ec8f2cc3e33e118d986
**Summary**
A regression introduced in **v6.14.10** breaks AMD GPU initialization on
RX 9070 XT system due to commit c53f23f7… (“drm/amd/display: check
stream id dml21 wrapper…”). Reverting this commit restores proper
graphical startup.
dmesg output before revert
[ 2.699091] ACPI: bus type drm_connector registered
[ 2.699734] xhci_hcd 0000:02:00.0: xHCI Host Controller
[ 2.699740] xhci_hcd 0000:02:00.0: new USB bus registered, assigned
bus number 1
[ 2.755165] xhci_hcd 0000:02:00.0: hcc params 0x0200ef81 hci version
0x110 quirks 0x0000000000000010
[ 2.755445] xhci_hcd 0000:02:00.0: xHCI Host Controller
[ 2.755448] xhci_hcd 0000:02:00.0: new USB bus registered, assigned
bus number 2
[ 2.755450] xhci_hcd 0000:02:00.0: Host supports USB 3.1 Enhanced
SuperSpeed
[ 2.755511] usb usb1: New USB device found, idVendor=1d6b,
idProduct=0002, bcdDevice= 6.14
[ 2.755512] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[ 2.755514] usb usb1: Product: xHCI Host Controller
[ 2.755515] usb usb1: Manufacturer: Linux 6.14.10-x64v3-xanmod1 xhci-hcd
[ 2.755517] usb usb1: SerialNumber: 0000:02:00.0
[ 2.755613] hub 1-0:1.0: USB hub found
[ 2.755629] hub 1-0:1.0: 10 ports detected
[ 2.755952] usb usb2: We don't know the algorithms for LPM for this
host, disabling LPM.
[ 2.755973] usb usb2: New USB device found, idVendor=1d6b,
idProduct=0003, bcdDevice= 6.14
[ 2.755975] usb usb2: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[ 2.755976] usb usb2: Product: xHCI Host Controller
[ 2.755978] usb usb2: Manufacturer: Linux 6.14.10-x64v3-xanmod1 xhci-hcd
[ 2.755979] usb usb2: SerialNumber: 0000:02:00.0
[ 2.756056] hub 2-0:1.0: USB hub found
[ 2.756065] hub 2-0:1.0: 4 ports detected
[ 2.756274] xhci_hcd 0000:0a:00.3: xHCI Host Controller
[ 2.756278] xhci_hcd 0000:0a:00.3: new USB bus registered, assigned
bus number 3
[ 2.756384] xhci_hcd 0000:0a:00.3: hcc params 0x0278ffe5 hci version
0x110 quirks 0x0000000000000010
[ 2.756622] xhci_hcd 0000:0a:00.3: xHCI Host Controller
[ 2.756624] xhci_hcd 0000:0a:00.3: new USB bus registered, assigned
bus number 4
[ 2.756626] xhci_hcd 0000:0a:00.3: Host supports USB 3.1 Enhanced
SuperSpeed
[ 2.756657] usb usb3: New USB device found, idVendor=1d6b,
idProduct=0002, bcdDevice= 6.14
[ 2.756659] usb usb3: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[ 2.756660] usb usb3: Product: xHCI Host Controller
[ 2.756661] usb usb3: Manufacturer: Linux 6.14.10-x64v3-xanmod1 xhci-hcd
[ 2.756663] usb usb3: SerialNumber: 0000:0a:00.3
[ 2.756748] hub 3-0:1.0: USB hub found
[ 2.756756] hub 3-0:1.0: 4 ports detected
[ 2.756903] usb usb4: We don't know the algorithms for LPM for this
host, disabling LPM.
[ 2.756924] usb usb4: New USB device found, idVendor=1d6b,
idProduct=0003, bcdDevice= 6.14
[ 2.756926] usb usb4: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[ 2.756927] usb usb4: Product: xHCI Host Controller
[ 2.756928] usb usb4: Manufacturer: Linux 6.14.10-x64v3-xanmod1 xhci-hcd
[ 2.756929] usb usb4: SerialNumber: 0000:0a:00.3
[ 2.757008] hub 4-0:1.0: USB hub found
[ 2.757015] hub 4-0:1.0: 4 ports detected
[ 2.757180] usbcore: registered new interface driver usbserial_generic
[ 2.757184] usbserial: USB Serial support registered for generic
[ 2.757253] rtc_cmos 00:02: RTC can wake from S4
[ 2.757465] rtc_cmos 00:02: registered as rtc0
[ 2.757494] rtc_cmos 00:02: setting system clock to
2025-06-10T13:46:18 UTC (1749563178)
[ 2.757517] rtc_cmos 00:02: alarms up to one month, y3k, 114 bytes nvram
[ 2.793080] simple-framebuffer simple-framebuffer.0: [drm] Registered
1 planes with drm panic
[ 2.793082] [drm] Initialized simpledrm 1.0.0 for
simple-framebuffer.0 on minor 0
[ 2.796240] fbcon: Deferring console take-over
[ 2.796241] simple-framebuffer simple-framebuffer.0: [drm] fb0:
simpledrmdrmfb frame buffer device
dmesg output after revert
[ 2.634779] ata1: SATA max UDMA/133 abar m131072@0xfcc80000 port
0xfcc80100 irq 40 lpm-pol 0
[ 2.634782] ata2: SATA max UDMA/133 abar m131072@0xfcc80000 port
0xfcc80180 irq 40 lpm-pol 0
[ 2.634785] ata3: SATA max UDMA/133 abar m131072@0xfcc80000 port
0xfcc80200 irq 40 lpm-pol 0
[ 2.634787] ata4: SATA max UDMA/133 abar m131072@0xfcc80000 port
0xfcc80280 irq 40 lpm-pol 0
[ 2.634789] ata5: SATA max UDMA/133 abar m131072@0xfcc80000 port
0xfcc80300 irq 40 lpm-pol 0
[ 2.634791] ata6: SATA max UDMA/133 abar m131072@0xfcc80000 port
0xfcc80380 irq 40 lpm-pol 0
[ 2.634848] ACPI: bus type drm_connector registered
[ 2.634869] [drm] amdgpu kernel modesetting enabled.
[ 2.644006] amdgpu: Virtual CRAT table created for CPU
[ 2.644017] amdgpu: Topology: Add CPU node
[ 2.644089] amdgpu 0000:08:00.0: enabling device (0006 -> 0007)
[ 2.644120] [drm] initializing kernel modesetting (IP DISCOVERY
0x1002:0x7550 0x1EAE:0x8811 0xC0).
[ 2.644128] [drm] register mmio base: 0xFCD00000
[ 2.644129] [drm] register mmio size: 524288
[ 2.648358] amdgpu 0000:08:00.0: amdgpu: detected ip block number 0
<soc24_common>
[ 2.648360] amdgpu 0000:08:00.0: amdgpu: detected ip block number 1
<gmc_v12_0>
[ 2.648362] amdgpu 0000:08:00.0: amdgpu: detected ip block number 2
<ih_v7_0>
[ 2.648364] amdgpu 0000:08:00.0: amdgpu: detected ip block number 3 <psp>
[ 2.648365] amdgpu 0000:08:00.0: amdgpu: detected ip block number 4 <smu>
[ 2.648366] amdgpu 0000:08:00.0: amdgpu: detected ip block number 5 <dm>
[ 2.648368] amdgpu 0000:08:00.0: amdgpu: detected ip block number 6
<gfx_v12_0>
[ 2.648369] amdgpu 0000:08:00.0: amdgpu: detected ip block number 7
<sdma_v7_0>
[ 2.648370] amdgpu 0000:08:00.0: amdgpu: detected ip block number 8
<vcn_v5_0_0>
[ 2.648372] amdgpu 0000:08:00.0: amdgpu: detected ip block number 9
<jpeg_v5_0_0>
[ 2.648373] amdgpu 0000:08:00.0: amdgpu: detected ip block number 10
<mes_v12_0>
[ 2.648383] amdgpu 0000:08:00.0: amdgpu: Fetched VBIOS from VFCT
[ 2.648385] amdgpu: ATOM BIOS: 113-EXT108832-100
[ 2.659806] amdgpu 0000:08:00.0: vgaarb: deactivate vga console
[ 2.659809] amdgpu 0000:08:00.0: amdgpu: Trusted Memory Zone (TMZ)
feature not supported
[ 2.659830] amdgpu 0000:08:00.0: amdgpu: MEM ECC is not presented.
[ 2.659831] amdgpu 0000:08:00.0: amdgpu: SRAM ECC is not presented.
[ 2.659845] [drm] vm size is 262144 GB, 4 levels, block size is
9-bit, fragment size is 9-bit
[ 2.659850] amdgpu 0000:08:00.0: amdgpu: VRAM: 16304M
0x0000008000000000 - 0x00000083FAFFFFFF (16304M used)
[ 2.659852] amdgpu 0000:08:00.0: amdgpu: GART: 512M
0x0000000000000000 - 0x000000001FFFFFFF
[ 2.659856] [drm] Detected VRAM RAM=16304M, BAR=16384M
[ 2.659858] [drm] RAM width 256bits GDDR6
[ 2.659915] [drm] amdgpu: 16304M of VRAM memory ready
[ 2.659916] [drm] amdgpu: 15990M of GTT memory ready.
[ 2.659926] [drm] GART: num cpu pages 131072, num gpu pages 131072
[ 2.659998] amdgpu 0000:08:00.0: amdgpu: PCIE GART of 512M enabled
(table at 0x00000083DAB00000).
[ 2.660416] [drm] Loading DMUB firmware via PSP: version=0x00010300
[ 2.660749] [drm] Found VCN firmware Version ENC: 1.7 DEC: 9 VEP: 0
Revision: 19
[ 2.895324] amdgpu 0000:08:00.0: amdgpu: RAP: optional rap ta ucode
is not available
[ 2.895327] amdgpu 0000:08:00.0: amdgpu: SECUREDISPLAY: securedisplay
ta ucode is not available
[ 2.895357] amdgpu 0000:08:00.0: amdgpu: smu driver if version =
0x0000002e, smu fw if version = 0x00000032, smu fw program = 0, smu fw
version = 0x00684400 (104.68.0)
[ 2.895360] amdgpu 0000:08:00.0: amdgpu: SMU driver if version not
matched
[ 2.934857] amdgpu 0000:08:00.0: amdgpu: SMU is initialized successfully!
[ 2.935596] [drm] Display Core v3.2.316 initialized on DCN 4.0.1
[ 2.935598] [drm] DP-HDMI FRL PCON supported
[ 2.939115] [drm] DMUB hardware initialized: version=0x00010300
[ 2.942565] ata1: SATA link down (SStatus 0 SControl 300)
[ 3.233092] amdgpu 0000:08:00.0: amdgpu: program CP_MES_CNTL : 0x4000000
[ 3.233097] amdgpu 0000:08:00.0: amdgpu: program CP_MES_CNTL : 0xc000000
[ 3.293410] amdgpu: HMM registered 16304MB device memory
[ 3.294762] kfd kfd: amdgpu: Allocated 3969056 bytes on gart
[ 3.294771] kfd kfd: amdgpu: Total number of KFD nodes to be created: 1
[ 3.294806] amdgpu: Virtual CRAT table created for GPU
[ 3.294972] amdgpu: Topology: Add dGPU node [0x7550:0x1002]
[ 3.294974] kfd kfd: amdgpu: added device 1002:7550
[ 3.294983] amdgpu 0000:08:00.0: amdgpu: SE 4, SH per SE 2, CU per SH
8, active_cu_number 64
[ 3.294986] amdgpu 0000:08:00.0: amdgpu: ring gfx_0.0.0 uses VM inv
eng 0 on hub 0
[ 3.294987] amdgpu 0000:08:00.0: amdgpu: ring comp_1.0.0 uses VM inv
eng 1 on hub 0
[ 3.294989] amdgpu 0000:08:00.0: amdgpu: ring comp_1.1.0 uses VM inv
eng 4 on hub 0
[ 3.294990] amdgpu 0000:08:00.0: amdgpu: ring comp_1.0.1 uses VM inv
eng 6 on hub 0
[ 3.294991] amdgpu 0000:08:00.0: amdgpu: ring comp_1.1.1 uses VM inv
eng 7 on hub 0
[ 3.294993] amdgpu 0000:08:00.0: amdgpu: ring sdma0 uses VM inv eng 8
on hub 0
[ 3.294994] amdgpu 0000:08:00.0: amdgpu: ring sdma1 uses VM inv eng 9
on hub 0
[ 3.294995] amdgpu 0000:08:00.0: amdgpu: ring vcn_unified_0 uses VM
inv eng 0 on hub 8
[ 3.294997] amdgpu 0000:08:00.0: amdgpu: ring jpeg_dec uses VM inv
eng 1 on hub 8
[ 3.296713] [drm] ring gfx_32768.1.1 was added
[ 3.296874] [drm] ring compute_32768.2.2 was added
[ 3.297032] [drm] ring sdma_32768.3.3 was added
[ 3.297075] [drm] ring gfx_32768.1.1 ib test pass
[ 3.297119] [drm] ring compute_32768.2.2 ib test pass
[ 3.297157] [drm] ring sdma_32768.3.3 ib test pass
[ 3.299782] amdgpu 0000:08:00.0: amdgpu: Using BACO for runtime pm
[ 3.300156] amdgpu 0000:08:00.0: [drm] Registered 4 planes with drm panic
[ 3.300158] [drm] Initialized amdgpu 3.61.0 for 0000:08:00.0 on minor 0
[ 3.328171] fbcon: amdgpudrmfb (fb0) is primary device
[ 3.328173] fbcon: Deferring console take-over
[ 3.328175] amdgpu 0000:08:00.0: [drm] fb0: amdgpudrmfb frame buffer
device
I am aware that this issue pertains to the XanMod kernel. However, upon
reviewing the commits, there is no indication that it is a downstream
issue. I attempted to confirm this regression by building the kernel
from the Git repository, but my limited skills and knowledge proved
insufficient.
Please review this regression and consider reverting the commit from the
stable 6.14 and 6.15 branches - or propose an alternate patch.
Thanks & Regards,
Marcin Kryzak
Commit 2f2bd7cbd1d1 ("hid: lenovo: Resend all settings on reset_resume
for compact keyboards") introduced a regression for ThinkPad TrackPoint
Keyboard II by removing the conditional check for enabling F7/9/11 mode
needed for compact keyboards only. As a result, the non-compact
keyboards can no longer toggle Fn-lock via Fn+Esc, although it can be
controlled via sysfs knob that directly sends raw commands.
This patch restores the previous conditional check without any
additions.
Cc: stable(a)vger.kernel.org
Fixes: 2f2bd7cbd1d1 ("hid: lenovo: Resend all settings on reset_resume for compact keyboards")
Signed-off-by: Iusico Maxim <iusico.maxim(a)libero.it>
---
drivers/hid/hid-lenovo.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index af29ba84052..a3c23a72316 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -548,11 +548,14 @@ static void lenovo_features_set_cptkbd(struct hid_device *hdev)
/*
* Tell the keyboard a driver understands it, and turn F7, F9, F11 into
- * regular keys
+ * regular keys (Compact only)
*/
- ret = lenovo_send_cmd_cptkbd(hdev, 0x01, 0x03);
- if (ret)
- hid_warn(hdev, "Failed to switch F7/9/11 mode: %d\n", ret);
+ if (hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD ||
+ hdev->product == USB_DEVICE_ID_LENOVO_CBTKBD) {
+ ret = lenovo_send_cmd_cptkbd(hdev, 0x01, 0x03);
+ if (ret)
+ hid_warn(hdev, "Failed to switch F7/9/11 mode: %d\n", ret);
+ }
/* Switch middle button to native mode */
ret = lenovo_send_cmd_cptkbd(hdev, 0x09, 0x01);
--
2.48.1
When cross compiling the kernel with clang, we need to override
CLANG_CROSS_FLAGS when preparing the step libraries.
Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs
when building tools in parallel"), MAKEFLAGS would have been set to a
value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the
fact that we weren't properly overriding it.
Cc: stable(a)vger.kernel.org
Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program")
Signed-off-by: Suleiman Souhlal <suleiman(a)google.com>
---
v2:
- "Signed-off-by:" instead of "Signed-of-by".
v1: https://lore.kernel.org/lkml/20250606052301.810338-1-suleiman@google.com/
---
tools/bpf/resolve_btfids/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile
index afbddea3a39c..ce1b556dfa90 100644
--- a/tools/bpf/resolve_btfids/Makefile
+++ b/tools/bpf/resolve_btfids/Makefile
@@ -17,7 +17,7 @@ endif
# Overrides for the prepare step libraries.
HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(HOSTCC)" LD="$(HOSTLD)" ARCH="$(HOSTARCH)" \
- CROSS_COMPILE="" EXTRA_CFLAGS="$(HOSTCFLAGS)"
+ CROSS_COMPILE="" CLANG_CROSS_FLAGS="" EXTRA_CFLAGS="$(HOSTCFLAGS)"
RM ?= rm
HOSTCC ?= gcc
--
2.50.0.rc0.642.g800a2b2222-goog
On Mon, 9 Jun 2025 16:16:32 -0700 David Ranch wrote:
> I'm not sure what you mean by "the only user of this code". There are
> many people using the Linux AX.25 + NETROM stack but we unfortunately
> don't have a active kernel maintainer for this code today.
Alright, sorry. Either way - these locks are not performance critical
for you, right?
Hello,
Looking for a buyer to move any of the following Items located in USA.
Used MICRON SSD 7300 PRO 3.84TB
U.2 HTFDHBE3T8TDF SSD 2.5" NVMe 3480GB
Quantity 400, price $100 EACH
005052112 _ 7.68TB HDD -$200 PER w/ caddies refurbished
Quantity 76, price $100
Brand New CISCO C9300-48UXM-E
Available 5
$2000 EACH
Brand New C9200L-48T-4X-E
$1,200 EACH
QTY4
HP 1040G3 Elite Book Folio Processor :- Intel Core i5
◻Processor :- Intel Core i5
◻Generation :- 6th
◻RAM :- 16GB
◻Storage :- 256G SSD
◻Display :- 14 inch" Touch Screen
QTY 340 $90 EA
SK HYNIX 16GB 2RX4 PC4 - 2133P-RAO-10
HMA42GR7AFR4N-TF TD AB 1526
QTY560 $20 EA
Xeon Gold 6442Y (60M Cache, 2.60 GHz)
PK8071305120500
QTY670 700 each
SAMSUNG 64GB 4DRX4 PC4-2666V-LD2-12-MAO
M386A8K40BM2-CTD60 S
QTY 320 $42 each
Brand New CISCO C9300-48UXM-E
Available 5
$2500 EACH
Core i3-1315U (10M Cache, up to 4.50 GHz)
FJ8071505258601
QTY50 $80 EA
Intel Xeon Gold 5418Y Processors
QTY28 $780 each
Brand New C9200L-48T-4X-E
$1000 EACH
QTY4
Brand New Gigabyte NVIDIA GeForce RTX 5090 AORUS
MASTER OC Graphics Card GPU 32GB GDDR7
QTY50 $1,300
Brand New N9K-C93108TC-FX-24 Nexus
9300-FX w/ 24p 100M/1/10GT & 6p 40/100G
Available 4
$3000 each
Brand New NVIDIA GeForce RTX 4090 Founders
Edition 24GB - QTY: 56 - $700 each
Charles Lawson
Exceptional One PC
3645 Central Ave, Riverside
CA 92506, United States
www.exceptionalonepc.com
info(a)exceptionalonepc.com
Office: (951)-556-3104
The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x e683131e64f71e957ca77743cb3d313646157329
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2025060734-elated-juvenile-da5c@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From e683131e64f71e957ca77743cb3d313646157329 Mon Sep 17 00:00:00 2001
From: David Lechner <dlechner(a)baylibre.com>
Date: Thu, 29 May 2025 11:53:19 -0500
Subject: [PATCH] dt-bindings: pwm: adi,axi-pwmgen: Fix clocks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix a shortcoming in the bindings that doesn't allow for a separate
external clock.
The AXI PWMGEN IP block has a compile option ASYNC_CLK_EN that allows
the use of an external clock for the PWM output separate from the AXI
clock that runs the peripheral.
This was missed in the original bindings and so users were writing dts
files where the one and only clock specified would be the external
clock, if there was one, incorrectly missing the separate AXI clock.
The correct bindings are that the AXI clock is always required and the
external clock is optional (must be given only when HDL compile option
ASYNC_CLK_EN=1).
Fixes: 1edf2c2a2841 ("dt-bindings: pwm: Add AXI PWM generator")
Cc: stable(a)vger.kernel.org
Signed-off-by: David Lechner <dlechner(a)baylibre.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org>
Link: https://lore.kernel.org/r/20250529-pwm-axi-pwmgen-add-external-clock-v3-2-5…
Signed-off-by: Uwe Kleine-König <ukleinek(a)kernel.org>
diff --git a/Documentation/devicetree/bindings/pwm/adi,axi-pwmgen.yaml b/Documentation/devicetree/bindings/pwm/adi,axi-pwmgen.yaml
index 45e112d0efb4..5575c58357d6 100644
--- a/Documentation/devicetree/bindings/pwm/adi,axi-pwmgen.yaml
+++ b/Documentation/devicetree/bindings/pwm/adi,axi-pwmgen.yaml
@@ -30,11 +30,19 @@ properties:
const: 3
clocks:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: axi
+ - const: ext
required:
- reg
- clocks
+ - clock-names
unevaluatedProperties: false
@@ -43,6 +51,7 @@ examples:
pwm@44b00000 {
compatible = "adi,axi-pwmgen-2.00.a";
reg = <0x44b00000 0x1000>;
- clocks = <&spi_clk>;
+ clocks = <&fpga_clk>, <&spi_clk>;
+ clock-names = "axi", "ext";
#pwm-cells = <3>;
};
Hi Sasha,
On Tue, Jun 10, 2025 at 08:18:13AM -0400, Sasha Levin wrote:
> This is a note to let you know that I've just added the patch titled
>
> USB: serial: bus: fix const issue in usb_serial_device_match()
>
> to the 6.15-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
>
> The filename of the patch is:
> usb-serial-bus-fix-const-issue-in-usb_serial_device_.patch
> and it can be found in the queue-6.15 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable(a)vger.kernel.org> know about it.
>
>
>
> commit 0e91be50efc1a26ec9047dadc980631d31ef8578
> Author: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
> Date: Wed May 21 15:41:34 2025 +0200
>
> USB: serial: bus: fix const issue in usb_serial_device_match()
>
> [ Upstream commit 92cd405b648605db4da866f3b9818b271ae84ef0 ]
>
> usb_serial_device_match() takes a const pointer, and then decides to
> cast it away into a non-const one, which is not a good thing to do
> overall. Fix this up by properly setting the pointers to be const to
> preserve that attribute.
>
> Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *")
> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
> Signed-off-by: Johan Hovold <johan(a)kernel.org>
> Signed-off-by: Sasha Levin <sashal(a)kernel.org>
This patch does not need to be backported and I left out the stable
patch on purpose as usual.
Please drop.
Johan
After commit 6f110a5e4f99 ("Disable SLUB_TINY for build testing"), which
causes CONFIG_KASAN to be enabled in allmodconfig again, arm64
allmodconfig builds with older versions of clang (15 through 17) show an
instance of -Wframe-larger-than (which breaks the build with
CONFIG_WERROR=y):
drivers/staging/rtl8723bs/core/rtw_security.c:1287:5: error: stack frame size (2208) exceeds limit (2048) in 'rtw_aes_decrypt' [-Werror,-Wframe-larger-than]
1287 | u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
| ^
This comes from aes_decipher() being inlined in rtw_aes_decrypt().
Running the same build with CONFIG_FRAME_WARN=128 shows aes_cipher()
also uses a decent amount of stack, just under the limit of 2048:
drivers/staging/rtl8723bs/core/rtw_security.c:864:19: warning: stack frame size (1952) exceeds limit (128) in 'aes_cipher' [-Wframe-larger-than]
864 | static signed int aes_cipher(u8 *key, uint hdrlen,
| ^
-Rpass-analysis=stack-frame-layout only shows one large structure on the
stack, which is the ctx variable inlined from aes128k128d(). A good
number of the other variables come from the additional checks of
fortified string routines, which are present in memset(), which both
aes_cipher() and aes_decipher() use to initialize some temporary
buffers. In this case, since the size is known at compile time, these
additional checks should not result in any code generation changes but
allmodconfig has several sanitizers enabled, which may make it harder
for the compiler to eliminate the compile time checks and the variables
that come about from them.
The memset() calls are just initializing these buffers to zero, so use
'= {}' instead, which is used all over the kernel and does the exact
same thing as memset() without the fortify checks, which drops the stack
usage of these functions by a few hundred kilobytes.
drivers/staging/rtl8723bs/core/rtw_security.c:864:19: warning: stack frame size (1584) exceeds limit (128) in 'aes_cipher' [-Wframe-larger-than]
864 | static signed int aes_cipher(u8 *key, uint hdrlen,
| ^
drivers/staging/rtl8723bs/core/rtw_security.c:1271:5: warning: stack frame size (1456) exceeds limit (128) in 'rtw_aes_decrypt' [-Wframe-larger-than]
1271 | u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
| ^
Cc: stable(a)vger.kernel.org
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Nathan Chancellor <nathan(a)kernel.org>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 44 +++++++++------------------
1 file changed, 14 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 1e9eff01b1aa..e9f382c280d9 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -868,29 +868,21 @@ static signed int aes_cipher(u8 *key, uint hdrlen,
num_blocks, payload_index;
u8 pn_vector[6];
- u8 mic_iv[16];
- u8 mic_header1[16];
- u8 mic_header2[16];
- u8 ctr_preload[16];
+ u8 mic_iv[16] = {};
+ u8 mic_header1[16] = {};
+ u8 mic_header2[16] = {};
+ u8 ctr_preload[16] = {};
/* Intermediate Buffers */
- u8 chain_buffer[16];
- u8 aes_out[16];
- u8 padded_buffer[16];
+ u8 chain_buffer[16] = {};
+ u8 aes_out[16] = {};
+ u8 padded_buffer[16] = {};
u8 mic[8];
uint frtype = GetFrameType(pframe);
uint frsubtype = GetFrameSubType(pframe);
frsubtype = frsubtype>>4;
- memset((void *)mic_iv, 0, 16);
- memset((void *)mic_header1, 0, 16);
- memset((void *)mic_header2, 0, 16);
- memset((void *)ctr_preload, 0, 16);
- memset((void *)chain_buffer, 0, 16);
- memset((void *)aes_out, 0, 16);
- memset((void *)padded_buffer, 0, 16);
-
if ((hdrlen == WLAN_HDR_A3_LEN) || (hdrlen == WLAN_HDR_A3_QOS_LEN))
a4_exists = 0;
else
@@ -1080,15 +1072,15 @@ static signed int aes_decipher(u8 *key, uint hdrlen,
num_blocks, payload_index;
signed int res = _SUCCESS;
u8 pn_vector[6];
- u8 mic_iv[16];
- u8 mic_header1[16];
- u8 mic_header2[16];
- u8 ctr_preload[16];
+ u8 mic_iv[16] = {};
+ u8 mic_header1[16] = {};
+ u8 mic_header2[16] = {};
+ u8 ctr_preload[16] = {};
/* Intermediate Buffers */
- u8 chain_buffer[16];
- u8 aes_out[16];
- u8 padded_buffer[16];
+ u8 chain_buffer[16] = {};
+ u8 aes_out[16] = {};
+ u8 padded_buffer[16] = {};
u8 mic[8];
uint frtype = GetFrameType(pframe);
@@ -1096,14 +1088,6 @@ static signed int aes_decipher(u8 *key, uint hdrlen,
frsubtype = frsubtype>>4;
- memset((void *)mic_iv, 0, 16);
- memset((void *)mic_header1, 0, 16);
- memset((void *)mic_header2, 0, 16);
- memset((void *)ctr_preload, 0, 16);
- memset((void *)chain_buffer, 0, 16);
- memset((void *)aes_out, 0, 16);
- memset((void *)padded_buffer, 0, 16);
-
/* start to decrypt the payload */
num_blocks = (plen-8) / 16; /* plen including LLC, payload_length and mic) */
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250609-rtl8723bs-fix-clang-arm64-wflt-b4b9652904b5
Best regards,
--
Nathan Chancellor <nathan(a)kernel.org>
-----------------
Note this is the LAST 6.14.y release. This kernel branch is now end-of-life.
Please move to the 6.15.y kernel branch at this time.
If you notice, this has happened a bit more "early" than previous
end-of-life announcements. Normally, after -rc1 is out there is a TON
of stable patches happening due to the changes that come into the
merge-window that were marked for stable backports but didn't get into
Linus's release before -final. As some people have objected to this
large influx being added to a stable kernel that is just about to go
end-of-life, let's try marking this end-of-life a bit earlier to see how
it goes.
It might also spur maintainers/developers to get fixes into -final a bit
more as well :)
-----------------
I'm announcing the release of the 6.14.11 kernel.
All users of the 6.14 kernel series must upgrade.
The updated 6.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml | 3 -
Documentation/devicetree/bindings/pwm/adi,axi-pwmgen.yaml | 13 ++++-
Documentation/devicetree/bindings/usb/cypress,hx3.yaml | 19 ++++++-
Documentation/firmware-guide/acpi/dsd/data-node-references.rst | 26 ++++------
Documentation/firmware-guide/acpi/dsd/graph.rst | 11 +---
Documentation/firmware-guide/acpi/dsd/leds.rst | 7 --
Makefile | 2
drivers/android/binder.c | 16 +++++-
drivers/android/binder_internal.h | 8 ++-
drivers/android/binderfs.c | 2
drivers/bluetooth/hci_qca.c | 14 ++---
drivers/clk/samsung/clk-exynosautov920.c | 2
drivers/cpufreq/acpi-cpufreq.c | 2
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 +-----
drivers/nvmem/Kconfig | 1
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 14 +++--
drivers/rtc/class.c | 2
drivers/rtc/lib.c | 24 +++++++--
drivers/thunderbolt/ctl.c | 5 +
drivers/tty/serial/jsm/jsm_tty.c | 1
drivers/usb/class/usbtmc.c | 4 +
drivers/usb/core/quirks.c | 3 +
drivers/usb/serial/pl2303.c | 2
drivers/usb/storage/unusual_uas.h | 7 ++
drivers/usb/typec/ucsi/ucsi.h | 2
fs/orangefs/inode.c | 9 +--
kernel/trace/trace.c | 2
27 files changed, 138 insertions(+), 79 deletions(-)
Alexandre Mergnat (2):
rtc: Make rtc_time64_to_tm() support dates before 1970
rtc: Fix offset calculation for .start_secs < 0
Arnd Bergmann (1):
nvmem: rmem: select CONFIG_CRC32
Aurabindo Pillai (1):
Revert "drm/amd/display: more liberal vmin/vmax update for freesync"
Bartosz Golaszewski (1):
Bluetooth: hci_qca: move the SoC type check to the right place
Carlos Llamas (1):
binder: fix yet another UAF in binder_devices
Charles Yeh (1):
USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB
Dave Penkler (1):
usb: usbtmc: Fix timeout value in get_stb
David Lechner (1):
dt-bindings: pwm: adi,axi-pwmgen: Fix clocks
Dmitry Antipov (1):
binder: fix use-after-free in binderfs_evict_inode()
Dustin Lundquist (1):
serial: jsm: fix NPE during jsm_uart_port_init
Gabor Juhos (2):
pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31
pinctrl: armada-37xx: set GPIO output value before setting direction
Gautham R. Shenoy (1):
acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio()
Greg Kroah-Hartman (1):
Linux 6.14.11
Hongyu Xie (1):
usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device
Jiayi Li (1):
usb: quirks: Add NO_LPM quirk for SanDisk Extreme 55AE
Lukasz Czechowski (1):
dt-bindings: usb: cypress,hx3: Add support for all variants
Mike Marshall (1):
orangefs: adjust counting code to recover from 665575cf
Pan Taixi (1):
tracing: Fix compilation warning on arm32
Pritam Manohar Sutar (1):
clk: samsung: correct clock summary for hsi1 block
Qasim Ijaz (1):
usb: typec: ucsi: fix Clang -Wsign-conversion warning
Sakari Ailus (1):
Documentation: ACPI: Use all-string data node references
Sergey Senozhatsky (1):
thunderbolt: Do not double dequeue a configuration request
Xu Yang (1):
dt-bindings: phy: imx8mq-usb: fix fsl,phy-tx-vboost-level-microvolt property
When using relaxed tail alignment for the bridge window,
pbus_size_mem() also tries to minimize min_align, which can under
certain scenarios end up increasing min_align from that found by
calculate_mem_align().
Ensure min_align is not increased by the relaxed tail alignment.
Eventually, it would be better to add calculate_relaxed_head_align()
similar to calculate_mem_align() which finds out what alignment can be
used for the head without introducing any gaps into the bridge window
to give flexibility on head address too. But that looks relatively
complex algorithm so it requires much more testing than fixing the
immediate problem causing a regression.
Fixes: 67f9085596ee ("PCI: Allow relaxed bridge window tail sizing for optional resources")
Reported-by: Rio <rio(a)r26.me>
Tested-by: Rio <rio(a)r26.me>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org>
---
drivers/pci/setup-bus.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 07c3d021a47e..f90d49cd07da 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1169,6 +1169,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
resource_size_t children_add_size = 0;
resource_size_t children_add_align = 0;
resource_size_t add_align = 0;
+ resource_size_t relaxed_align;
if (!b_res)
return -ENOSPC;
@@ -1246,8 +1247,9 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
if (bus->self && size0 &&
!pbus_upstream_space_available(bus, mask | IORESOURCE_PREFETCH, type,
size0, min_align)) {
- min_align = 1ULL << (max_order + __ffs(SZ_1M));
- min_align = max(min_align, win_align);
+ relaxed_align = 1ULL << (max_order + __ffs(SZ_1M));
+ relaxed_align = max(relaxed_align, win_align);
+ min_align = min(min_align, relaxed_align);
size0 = calculate_memsize(size, min_size, 0, 0, resource_size(b_res), win_align);
pci_info(bus->self, "bridge window %pR to %pR requires relaxed alignment rules\n",
b_res, &bus->busn_res);
@@ -1261,8 +1263,9 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
if (bus->self && size1 &&
!pbus_upstream_space_available(bus, mask | IORESOURCE_PREFETCH, type,
size1, add_align)) {
- min_align = 1ULL << (max_order + __ffs(SZ_1M));
- min_align = max(min_align, win_align);
+ relaxed_align = 1ULL << (max_order + __ffs(SZ_1M));
+ relaxed_align = max(min_align, win_align);
+ min_align = min(min_align, relaxed_align);
size1 = calculate_memsize(size, min_size, add_size, children_add_size,
resource_size(b_res), win_align);
pci_info(bus->self,
--
2.39.5
From: Pu Lehui <pulehui(a)huawei.com>
patch 1: the mainly fix for uprobe pte be overwritten issue.
patch 2: WARN_ON_ONCE for new_pte not NULL during move_ptes.
patch 3: extract some utils function for upcomming selftest.
patch 4: selftest related to this series.
v1:
- limit skip uprobe_mmap to copy_vma flow.
- add related selftest.
- correct Fixes tag.
RFC v2:
https://lore.kernel.org/all/20250527132351.2050820-1-pulehui@huaweicloud.co…
- skip uprobe_mmap on expanded vma.
- add skip_vma_uprobe field to struct vma_prepare and
vma_merge_struct. (Lorenzo)
- add WARN_ON_ONCE when new_pte is not NULL. (Oleg)
- Corrected some of the comments.
RFC v1:
https://lore.kernel.org/all/20250521092503.3116340-1-pulehui@huaweicloud.co…
Pu Lehui (4):
mm: Fix uprobe pte be overwritten when expanding vma
mm: Expose abnormal new_pte during move_ptes
selftests/mm: Extract read_sysfs and write_sysfs into vm_util
selftests/mm: Add test about uprobe pte be orphan during vma merge
mm/mremap.c | 2 ++
mm/vma.c | 20 ++++++++++--
mm/vma.h | 7 +++++
tools/testing/selftests/mm/ksm_tests.c | 32 ++------------------
tools/testing/selftests/mm/merge.c | 42 ++++++++++++++++++++++++++
tools/testing/selftests/mm/thuge-gen.c | 6 ++--
tools/testing/selftests/mm/vm_util.c | 38 +++++++++++++++++++++++
tools/testing/selftests/mm/vm_util.h | 2 ++
8 files changed, 113 insertions(+), 36 deletions(-)
--
2.34.1
When /dev/ttyDBC0 device is created then by default ECHO flag
is set for the terminal device. However if data arrives from
a peer before application using /dev/ttyDBC0 applies its set
of terminal flags then the arriving data will be echoed which
might not be desired behavior.
Fixes: 4521f1613940 ("xhci: dbctty: split dbc tty driver registration and unregistration functions.")
Signed-off-by: Łukasz Bartosik <ukaszb(a)chromium.org>
---
drivers/usb/host/xhci-dbgtty.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c
index 60ed753c85bb..d894081d8d15 100644
--- a/drivers/usb/host/xhci-dbgtty.c
+++ b/drivers/usb/host/xhci-dbgtty.c
@@ -617,6 +617,7 @@ int dbc_tty_init(void)
dbc_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
dbc_tty_driver->subtype = SERIAL_TYPE_NORMAL;
dbc_tty_driver->init_termios = tty_std_termios;
+ dbc_tty_driver->init_termios.c_lflag &= ~ECHO;
dbc_tty_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL;
dbc_tty_driver->init_termios.c_ispeed = 9600;
--
2.50.0.rc0.642.g800a2b2222-goog
pdev_sort_resources() uses pdev_resources_assignable() helper to decide
if device's resources cannot be assigned. pbus_size_mem(), on the other
hand, does not do the same check. This could lead into a situation
where a resource ends up on realloc_head list but is not on the head
list, which is turn prevents emptying the resource from the
realloc_head list in __assign_resources_sorted().
A non-empty realloc_head is unacceptable because it triggers an
internal sanity check as show in this log with a device that has class
0 (PCI_CLASS_NOT_DEFINED):
pci 0001:01:00.0: [144d:a5a5] type 00 class 0x000000 PCIe Endpoint
pci 0001:01:00.0: BAR 0 [mem 0x00000000-0x000fffff 64bit]
pci 0001:01:00.0: ROM [mem 0x00000000-0x0000ffff pref]
pci 0001:01:00.0: enabling Extended Tags
pci 0001:01:00.0: PME# supported from D0 D3hot D3cold
pci 0001:01:00.0: 15.752 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x2 link at 0001:00:00.0 (capable of 31.506 Gb/s with 16.0 GT/s PCIe x2 link)
pcieport 0001:00:00.0: bridge window [mem 0x00100000-0x001fffff] to [bus 01-ff] add_size 100000 add_align 100000
pcieport 0001:00:00.0: bridge window [mem 0x40000000-0x401fffff]: assigned
------------[ cut here ]------------
kernel BUG at drivers/pci/setup-bus.c:2532!
Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
...
Call trace:
pci_assign_unassigned_bus_resources+0x110/0x114 (P)
pci_rescan_bus+0x28/0x48
Use pdev_resources_assignable() also within pbus_size_mem() to skip
processing of non-assignable resources which removes the disparity in
between what resources pdev_sort_resources() and pbus_size_mem()
consider. As non-assignable resources are no longer processed, they are
not added to the realloc_head list, thus the sanity check no longer
triggers.
This disparity problem is very old but only now became apparent after
the commit 2499f5348431 ("PCI: Rework optional resource handling") that
made the ROM resources optional when calculating bridge window sizes
which required adding the resource to the realloc_head list.
Previously, bridge windows were just sized larger than necessary.
Fixes: 2499f5348431 ("PCI: Rework optional resource handling")
Reported-by: Tudor Ambarus <tudor.ambarus(a)linaro.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org>
---
The reporter was perhaps not happy with this fix as behavior of PCI core
isn't identical after this fix even if this patch fixes the problem on
the PCI core side which causes the internal sanity check to fire.
It seems that in the reporter's case, an out-of-tree driver was involved
that performed things and made assumptions a driver should not do in its
probe function such as assuming a bridge window is assigned even if there
are not child resources to be put into it (the child device in reporter's
case doesn't have a valid class and gets therefore skipped by the resource
fitting/assignment):
https://lore.kernel.org/all/bd579412-d07c-476d-8932-55c1f69adc9f@linaro.org/
In other words, the out-of-tree driver relies on the disparity in the
PCI core's resource fitting code which is now eliminated by this fix.
drivers/pci/setup-bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index f90d49cd07da..24863d8d0053 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1191,6 +1191,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
resource_size_t r_size;
if (r->parent || (r->flags & IORESOURCE_PCI_FIXED) ||
+ !pdev_resources_assignable(dev) ||
((r->flags & mask) != type &&
(r->flags & mask) != type2 &&
(r->flags & mask) != type3))
--
2.39.5
From: Chen Jun <chenjun102(a)huawei.com>
commit 943f45b9399ed8b2b5190cbc797995edaa97f58f upstream.
There is a kmemleak caused by modprobe null_blk.ko
unreferenced object 0xffff8881acb1f000 (size 1024):
comm "modprobe", pid 836, jiffies 4294971190 (age 27.068s)
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ff ff ff ff ff ff 00 53 99 9e ff ff ff ff .........S......
backtrace:
[<000000004a10c249>] kmalloc_node_trace+0x22/0x60
[<00000000648f7950>] blk_mq_alloc_and_init_hctx+0x289/0x350
[<00000000af06de0e>] blk_mq_realloc_hw_ctxs+0x2fe/0x3d0
[<00000000e00c1872>] blk_mq_init_allocated_queue+0x48c/0x1440
[<00000000d16b4e68>] __blk_mq_alloc_disk+0xc8/0x1c0
[<00000000d10c98c3>] 0xffffffffc450d69d
[<00000000b9299f48>] 0xffffffffc4538392
[<0000000061c39ed6>] do_one_initcall+0xd0/0x4f0
[<00000000b389383b>] do_init_module+0x1a4/0x680
[<0000000087cf3542>] load_module+0x6249/0x7110
[<00000000beba61b8>] __do_sys_finit_module+0x140/0x200
[<00000000fdcfff51>] do_syscall_64+0x35/0x80
[<000000003c0f1f71>] entry_SYSCALL_64_after_hwframe+0x46/0xb0
That is because q->ma_ops is set to NULL before blk_release_queue is
called.
blk_mq_init_queue_data
blk_mq_init_allocated_queue
blk_mq_realloc_hw_ctxs
for (i = 0; i < set->nr_hw_queues; i++) {
old_hctx = xa_load(&q->hctx_table, i);
if (!blk_mq_alloc_and_init_hctx(.., i, ..)) [1]
if (!old_hctx)
break;
xa_for_each_start(&q->hctx_table, j, hctx, j)
blk_mq_exit_hctx(q, set, hctx, j); [2]
if (!q->nr_hw_queues) [3]
goto err_hctxs;
err_exit:
q->mq_ops = NULL; [4]
blk_put_queue
blk_release_queue
if (queue_is_mq(q)) [5]
blk_mq_release(q);
[1]: blk_mq_alloc_and_init_hctx failed at i != 0.
[2]: The hctxs allocated by [1] are moved to q->unused_hctx_list and
will be cleaned up in blk_mq_release.
[3]: q->nr_hw_queues is 0.
[4]: Set q->mq_ops to NULL.
[5]: queue_is_mq returns false due to [4]. And blk_mq_release
will not be called. The hctxs in q->unused_hctx_list are leaked.
To fix it, call blk_release_queue in exception path.
Fixes: 2f8f1336a48b ("blk-mq: always free hctx after request queue is freed")
Signed-off-by: Yuan Can <yuancan(a)huawei.com>
Signed-off-by: Chen Jun <chenjun102(a)huawei.com>
Reviewed-by: Ming Lei <ming.lei(a)redhat.com>
Link: https://lore.kernel.org/r/20221031031242.94107-1-chenjun102@huawei.com
Signed-off-by: Jens Axboe <axboe(a)kernel.dk>
[Denis: minor fix to resolve merge conflict.]
Signed-off-by: Denis Arefev <arefev(a)swemel.ru>
---
Backport fix for CVE-2022-49901
Link: https://nvd.nist.gov/vuln/detail/CVE-2022-49901
---
block/blk-mq.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 21531aa163cb..6dd1398d0301 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -3335,9 +3335,8 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
return q;
err_hctxs:
- kfree(q->queue_hw_ctx);
- q->nr_hw_queues = 0;
- blk_mq_sysfs_deinit(q);
+ blk_mq_release(q);
+
err_poll:
blk_stat_free_callback(q->poll_cb);
q->poll_cb = NULL;
--
2.43.0
USB3 devices connected behind several external suspended hubs may not
be detected when plugged in due to aggressive hub runtime pm suspend.
The hub driver immediately runtime-suspends hubs if there are no
active children or port activity.
There is a delay between the wake signal causing hub resume, and driver
visible port activity on the hub downstream facing ports.
Most of the LFPS handshake, resume signaling and link training done
on the downstream ports is not visible to the hub driver until completed,
when device then will appear fully enabled and running on the port.
This delay between wake signal and detectable port change is even more
significant with chained suspended hubs where the wake signal will
propagate upstream first. Suspended hubs will only start resuming
downstream ports after upstream facing port resumes.
The hub driver may resume a USB3 hub, read status of all ports, not
yet see any activity, and runtime suspend back the hub before any
port activity is visible.
This exact case was seen when conncting USB3 devices to a suspended
Thunderbolt dock.
USB3 specification defines a 100ms tU3WakeupRetryDelay, indicating
USB3 devices expect to be resumed within 100ms after signaling wake.
if not then device will resend the wake signal.
Give the USB3 hubs twice this time (200ms) to detect any port
changes after resume, before allowing hub to runtime suspend again.
Cc: stable(a)vger.kernel.org
Fixes: 596d789a211d ("USB: set hub's default autosuspend delay as 0")
Signed-off-by: Mathias Nyman <mathias.nyman(a)linux.intel.com>
---
drivers/usb/core/hub.c | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 770d1e91183c..5c12dfdef569 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -68,6 +68,12 @@
*/
#define USB_SHORT_SET_ADDRESS_REQ_TIMEOUT 500 /* ms */
+/*
+ * Give SS hubs 200ms time after wake to train downstream links before
+ * assuming no port activity and allowing hub to runtime suspend back.
+ */
+#define USB_SS_PORT_U0_WAKE_TIME 200 /* ms */
+
/* Protect struct usb_device->state and ->children members
* Note: Both are also protected by ->dev.sem, except that ->state can
* change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */
@@ -1068,11 +1074,12 @@ int usb_remove_device(struct usb_device *udev)
enum hub_activation_type {
HUB_INIT, HUB_INIT2, HUB_INIT3, /* INITs must come first */
- HUB_POST_RESET, HUB_RESUME, HUB_RESET_RESUME,
+ HUB_POST_RESET, HUB_RESUME, HUB_RESET_RESUME, HUB_POST_RESUME,
};
static void hub_init_func2(struct work_struct *ws);
static void hub_init_func3(struct work_struct *ws);
+static void hub_post_resume(struct work_struct *ws);
static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
{
@@ -1095,6 +1102,13 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
goto init2;
goto init3;
}
+
+ if (type == HUB_POST_RESUME) {
+ usb_autopm_put_interface_async(to_usb_interface(hub->intfdev));
+ hub_put(hub);
+ return;
+ }
+
hub_get(hub);
/* The superspeed hub except for root hub has to use Hub Depth
@@ -1343,6 +1357,16 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
device_unlock(&hdev->dev);
}
+ if (type == HUB_RESUME && hub_is_superspeed(hub->hdev)) {
+ /* give usb3 downstream links training time after hub resume */
+ INIT_DELAYED_WORK(&hub->init_work, hub_post_resume);
+ queue_delayed_work(system_power_efficient_wq, &hub->init_work,
+ msecs_to_jiffies(USB_SS_PORT_U0_WAKE_TIME));
+ usb_autopm_get_interface_no_resume(
+ to_usb_interface(hub->intfdev));
+ return;
+ }
+
hub_put(hub);
}
@@ -1361,6 +1385,13 @@ static void hub_init_func3(struct work_struct *ws)
hub_activate(hub, HUB_INIT3);
}
+static void hub_post_resume(struct work_struct *ws)
+{
+ struct usb_hub *hub = container_of(ws, struct usb_hub, init_work.work);
+
+ hub_activate(hub, HUB_POST_RESUME);
+}
+
enum hub_quiescing_type {
HUB_DISCONNECT, HUB_PRE_RESET, HUB_SUSPEND
};
--
2.43.0
When the PSLVERR_RESP_EN parameter is set to 1, the device generates
an error response if an attempt is made to read an empty RBR (Receive
Buffer Register) while the FIFO is enabled.
In serial8250_do_startup(), calling serial_port_out(port, UART_LCR,
UART_LCR_WLEN8) triggers dw8250_check_lcr(), which invokes
dw8250_force_idle() and serial8250_clear_and_reinit_fifos(). The latter
function enables the FIFO via serial_out(p, UART_FCR, p->fcr).
Execution proceeds to the serial_port_in(port, UART_RX).
This satisfies the PSLVERR trigger condition.
When another CPU (e.g., using printk()) is accessing the UART (UART
is busy), the current CPU fails the check (value & ~UART_LCR_SPAR) ==
(lcr & ~UART_LCR_SPAR) in dw8250_check_lcr(), causing it to enter
dw8250_force_idle().
Put serial_port_out(port, UART_LCR, UART_LCR_WLEN8) under the port->lock
to fix this issue.
Panic backtrace:
[ 0.442336] Oops - unknown exception [#1]
[ 0.442343] epc : dw8250_serial_in32+0x1e/0x4a
[ 0.442351] ra : serial8250_do_startup+0x2c8/0x88e
...
[ 0.442416] console_on_rootfs+0x26/0x70
Fixes: c49436b657d0 ("serial: 8250_dw: Improve unwritable LCR workaround")
Link: https://lore.kernel.org/all/84cydt5peu.fsf@jogness.linutronix.de/T/
Signed-off-by: Yunhui Cui <cuiyunhui(a)bytedance.com>
Cc: stable(a)vger.kernel.org
---
drivers/tty/serial/8250/8250_port.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 6d7b8c4667c9c..07fe818dffa34 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2376,9 +2376,10 @@ int serial8250_do_startup(struct uart_port *port)
/*
* Now, initialize the UART
*/
- serial_port_out(port, UART_LCR, UART_LCR_WLEN8);
uart_port_lock_irqsave(port, &flags);
+ serial_port_out(port, UART_LCR, UART_LCR_WLEN8);
+
if (up->port.flags & UPF_FOURPORT) {
if (!up->port.irq)
up->port.mctrl |= TIOCM_OUT1;
--
2.39.5