From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 BC5181C3BF7 for ; Sat, 23 May 2026 00:29:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779496191; cv=none; b=I3MbFL+170YW0nHqp3vqihJLAP0h14VxcK8uy2bodxagUDp5iUaIp6mMyp3jqFL1BWl7hLRtvr0xpTc/ibnQK8wj0JsbDeVFhKhMfRoR7kyKegDePVaWCoPfIEANkvxQASKp0DeqANHAXKVfMWuV0BJeOd8uj4U1AJ3zJIEWhGI= 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.43 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-f43.google.com with SMTP id ffacd0b85a97d-43d76dd4ee8so4094801f8f.2 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=WQO1KN9PJsCe0KmwFkahLT8v4Zj8BIMMehxN0gBeihjw5mYaqviCHgF1WrDrMk54GZ 5kn9qA3C3Lx3bYAe6pz4N/qmXOfuGhvdSRtv8Z4SmjWEKpC1lkAGh84ov+Y69F3ZV6r/ 0diz0elYRMNbBfDrwK3tUoj7rm363wgvDe+FTyZsa9z4BdEf7RMUdnKiLI7emg+kz8hu wOY3BXgV6rDnKJmEW8UyWi0kGLGjw6hUFlztPf/nmfbfFMnToVRyoTuDikP0SDSPgzAP cduPm+Iod9TnD5W1JCnPmD3Wg27qWXQygvWV8tghP9VFbV/1DP8skS4SCHmKdfr9uJel ZPjw== X-Gm-Message-State: AOJu0YxWsNRLdaGDaa6zLaZSbt9O1Ztm7j6XWGxg8HNWxmtAP4yC76Xz s9JcCF81c9hbBKi8QItPqyyHcgMvc6X+q3qRfgsgLzD04dhKESIYnSTh X-Gm-Gg: Acq92OEckg49YJGm5JI+2lZsnH9SwovRuJSTzmiBFAycdUEjeJy1R+GiNDL6WuIPXf+ tHwGbOaf6UB6JOyb55DnzZR6d26hPgrHxrKM4KhD5KvULQm/yZfRtPWnuj40NcDA2+prbHWiA7Y AuS2kUA54H1itMtCBJCfzSMZjpK41a+NLHLTpkPWe0rJMst/ZlXqs7HMdJbwTQrx1jcZgcFVFoW SgKQ04s1IW+CSPYjYNshkakH0JzqMmUgJ3ox58RutV6Zu58FUYKq22sjAt4liIYgrk2QTlycJQS mnpIQf94WeAeCJNeyHX3nojh6Y951sJwD4xDla8DoSigQkHZPjnPanNI5IP2uvGERQfLZL/84L2 VTOQI8fZLq9KJcm3/HZD6IM55gvhoN6i8dRTmWkpTLsSJsEFLWJ8xg/bZvyejDbCE5A1+4wPNm2 5ZiT9ZbVEWtGCs02J9Xhm42ifeh4NHaoAE 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-kernel@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