From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAD561A680C for ; Sat, 23 May 2026 00:29:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779496191; cv=none; b=NdjkNv8wZzHxbeUYdurFo/1OZpXq5+oe3KQ/iIzaDDCCGtAiyOZ/rH9jMji8HNXDE4IuHIDYiJIQIC8ojh16OgZq7xyi4LMjx/fKkhql29b5YDQthWQWeSGmednKEaA2rkwD+Q3PLK/QdLeL0s+/UnMxwRZLDm59YYwS/b8YgIE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779496191; c=relaxed/simple; bh=w6E0YRreyAwApnZtybobqMm+JuPyTSoPhzeahJUKmwM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pSdD/sB+94naeX0oVXgQKzKiNmI4uhfPEBTYHltTWd5tgUO16fx3skH4ZtNQpbZMy9TnB6CGvyfbATaL2LuYh1zdoftN8gDqGoFDuiEhTCPMtfU7ywqLuCfxj1BIMEQ5m8dkBsFvwFiQi/ttIuLqzn6Y7MjL4fJ8m1uofJVlJhg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=q9+HAMMB; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q9+HAMMB" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-449d6c68ed8so4499710f8f.0 for ; Fri, 22 May 2026 17:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779496188; x=1780100988; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=w6E0YRreyAwApnZtybobqMm+JuPyTSoPhzeahJUKmwM=; b=q9+HAMMBbmbOmEtIX8nFjPojvDY0AgEJVmYfCRXC+6OIFPyZHlMa1RLHiXcjUiFH+v WdA9PrElzj367yrEL5TabZcMLKXiuOD1jthxRDq50VvdgdbjsJe7LviTVWuDd6dJ4fyX fiUvRYX1opuJnCf380ofr05Oc4tzwWu+2CzvU1vBeqOODsieGCr8g8riQ+GzpNeS49zR tvjl2waepwQ6kdGtxLGbtr816d87qSEDDp3Z8fFJeHpkCQuacHntlTd93cgQFkqHWI3B 07tUBZeaaZCNBJJleRyNwL2qN4gfi8c1QAQmsp/worRWR5VnWAZAykjdhu75K3b0dvSv NERg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779496188; x=1780100988; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=w6E0YRreyAwApnZtybobqMm+JuPyTSoPhzeahJUKmwM=; b=oNRvN2H2z6w2svKEX/bi7NNJ0xaeyclgdJTRC+1TWr1BcxuF6LNZbpBIx3GL5V86xD dGH0tGoTRJcR6pRWR/gVEePq+3taJRxf3yjszZbomR93ajARHSo51wb7Fb+W/jDySN7v pQdte1OySc7mrN4zRv9wnTHP+74uyaLORd2WwK6t9U/ra9aV4OgOn8iX5HhyQL3H46Ez z3k/R0yXkrTBTpPYtxB/2XHmOqpdiibRpoEc6rMBXB5CUR2+O9f8eduutjjDE6mPMrtP rr5YfdR/irXHnTOiIsBbzJyol214ozJ6HnndNwt6b0/CVmxYjzttNywe0S9mjgAjvOO0 lKFw== X-Forwarded-Encrypted: i=1; AFNElJ+sayf1CtnQYB91dY+V++VMoVtumzI/mtifYvlpIwv0Ir6n6iKSSf3KpNZzTUayGwwHi5oL3pzGxZ0=@vger.kernel.org X-Gm-Message-State: AOJu0Yyfd7Lt70HXFTpAVe6i70bUQ/ixrQ0nyDAsso7vWY4NTsVE8UtG /Gp+kQYVSxj1HIgvFz2QnuXtFRKlf0v3yQEVFgj5YFJw/7uqeppbuPDb X-Gm-Gg: Acq92OGABezvrbhXobYkh8Zw3JZItPl2wmHyk9ilG1gHrUIhMeBUA+jcL8hTE1quNzI 0zXvPM6tlwglX4Js/cUPqnSO1jN9OVQTwdVtBwO3VDpZw5+3srBqpVkqPvMTX4DtnevWzGd+ZWP yu4XFtEmjhXY+GFRxQ5zdWZdNroQGHBjxUcCikgb44EnhhB6jLU4TIacxLB3VyDfn244pEC6+WR CcYxts1hn5w7UVkuwLHj4MbsPLd7s7uOTRC5MUBbl1r0b9wDOZYI67qki+unw+/mrZBIdfKUmxz k83MvO3nJ9skUJF087hD0ecvbvc+hUaVFgas8ypRP1vZ7urBL261mSlrcm+uGc5sKqc6X9/xHzF C8uwuuinvFI3odfx9YZleaHt4qOyazy1sy9CiFytq0hHmfM0xxsOJcWXsw72NjFuvuJVEv3Y1E9 PbcaIsnpk/vhwe8EgLY4z2wyOvkG2p+8HX X-Received: by 2002:adf:e005:0:10b0:439:c18f:5aaf with SMTP id ffacd0b85a97d-45eb38bafbcmr6665775f8f.34.1779496188044; Fri, 22 May 2026 17:29:48 -0700 (PDT) Received: from foxbook (bfk48.neoplus.adsl.tpnet.pl. [83.28.48.48]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45eb6cce0a4sm7355058f8f.12.2026.05.22.17.29.47 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 22 May 2026 17:29:47 -0700 (PDT) Date: Sat, 23 May 2026 02:29:44 +0200 From: Michal Pecio To: Desnes Nunes Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, mathias.nyman@intel.com, stable@vger.kernel.org Subject: Re: [PATCH RFT RFC] usb: xhci: Kill hosts with HCE or HSE on command timeout Message-ID: <20260523022944.59799d83.michal.pecio@gmail.com> In-Reply-To: References: <20260430014817.2006885-1-desnesn@redhat.com> <20260430235453.2288c973.michal.pecio@gmail.com> <20260502114644.76e6b5a3.michal.pecio@gmail.com> <20260502235517.089ba5bf.michal.pecio@gmail.com> <20260503071749.6abda137.michal.pecio@gmail.com> <20260503213111.117db3a1.michal.pecio@gmail.com> <20260504093118.615ff480.michal.pecio@gmail.com> <20260518083339.507e24bd.michal.pecio@gmail.com> <20260522110328.0d3eecd8.michal.pecio@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 22 May 2026 17:45:22 -0300, Desnes Nunes wrote: > Hello Michal, >=20 > On Fri, May 22, 2026 at 6:03=E2=80=AFAM Michal Pecio wrote: > > If the bug is deterministic it should be fairly easy to nail it down. > > Attached xhci debugfs patch adds a list of almost all memory the xHC > > is allowed to access, including (if I havevn't missed something) all > > mappings it is allowed to access before any slots are enabled. > > > > Please apply, reboot and then: > > > > zip -r before.zip /sys/kernel/debug/usb/xhci/0000:80:14.0 > > # trigger crash kexec and the bug > > zip -r after.zip /sys/kernel/debug/usb/xhci/0000:80:14.0 > ... > > And since the bug may be an out of bounds access by the HW, if you > > don't mind running slightly experimental patch to a critical subsystem, > > please also apply the DMA guard pages patch. I've been using it for a > > few months without issues, but YMMV. It helps determine which mapping > > is accessed OOB. > > > > Note: DMA guard pages may casue USB to stop working before kexec if > > it's a HW bug masked by memory layout, or begin to work after kexec in > > case of some IOMMU subsystem issues. >=20 > Please find the requested information in the attachments below. > Kernel was patched with both patches. Sorry, I forgot about the most important thing: crash kernel log, or at least the IOMMU fault message showing the bad address. However, in this case it's moot because it seems that the HC didn't fault after kexec and it worked normally - debugfs shows that USBSTS=3D0 and some device has been successfully enabled. (It's a little odd that CRCR.CRR appears to be clear, not sure what's the deal with that, but it's same thing in before.zip as well.) So either the bug isn't as deterministic as we thought, or one of the patches "fixed" it, and that could only be DMA Guard Pages. If you can't reproduce the problem with guard pages, please remove that patch and post before/after debugfs again, plus crash kernel dmesg. Regards, Michal