From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 C18EE3E0754 for ; Wed, 20 May 2026 13:41:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779284470; cv=none; b=eX/705Rel5LDrYbiJtEElm0KBYXyErc/mZBROYgFTi37MfaBH0UWmmvaTstpYSyd8SVZ0Kvq0hGvvO8gBVp41TTf2ScH5dmUZDQiO1mZPxjheStVW1T6rDAC2s4CwIaBO9BB8XRthyU/mJ4Z8XS8Nfw8xwmPI04ulYQQeku8Kk4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779284470; c=relaxed/simple; bh=9zR/Hf6z7N1IsGt+VW/yYO2sLyoz8qP7waAI+MYVktE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JhDEwnA2OEki2vw39sUsxlBWq1mxD8j/JWcyhj2kPkl/Sg9e1JsunDdaMwDcQgavOphQHb1ZRsUOpMbdUTFb0gjengM3b3BI8BY9YglgVikyt6f801gyphbsck+LLRCB59ZeWL+AEhZM3eY3OXBPolJxb/XtsMP+BMeLk4TCVvM= 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=ihVmC5H4; arc=none smtp.client-ip=209.85.128.53 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="ihVmC5H4" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-48a3e9862f0so28334875e9.1 for ; Wed, 20 May 2026 06:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779284466; x=1779889266; 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=vfk/0mVcnY/X27KP5hrre9gbSIDn/b0aV1xxYD9Hst4=; b=ihVmC5H44a9I0WZVk8oSLXrGYbfYzmO8RE7+AU343pCAIisxwblbSRy7TAi9cCBuOS AY3O9QsGcJNXWy6sLfWO8w03EU6d6Vg3NusJv0eSz6f/+W049VQ4fQbrqR7MFEpup4RI /EsnCy+DQPZ73LSzNLGrVtTZYkxf0QTizM9PLltHgVLWERguQD7pwnul4QksBla4YJBp bYOtEw0ZJs5gyjJxM/wmqLI9iwZoKHfxCfqf0kWWGL9BHumbiWBqyixmiQcaSdaKJWvb cTkHBo7NSC2yCoaTTziHblJ1g+p35yZBiq353LQ2RHW7Ayjzh1RJewmGqyfwYc6tbLZJ ++vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779284466; x=1779889266; 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=vfk/0mVcnY/X27KP5hrre9gbSIDn/b0aV1xxYD9Hst4=; b=F39U21C/tmxAgLGIrC9hviF98RXiyPrpgpm3ARFJ3/iX0rOKAkUFwoeDLmaTCuy9cv 9a+5oDFFfBBwlbbwYK6JzT2PXcutOHGC6qJQnHIGZyVze2P1T7pBVFDAcukLfZ8NXrpa WuYpGIK9vw1/QTbJjMs5JDGRIbT5JMtIGxor0th3JtL3SaUG/K1wm2FI5XVVomTjEleU Gn7CelKq9X5yrV0FNy1pbEATW0YBLBUiUE/DvzcocWAtGWl+yOOHBMjNJM7F+xMpuPCu KbnQpRyE+k/S7Xg4uGRe66ZL0IOZWKPUp/VBuC9gJGugGd7AIguOm8E5MLutON8wxFeP tekw== X-Forwarded-Encrypted: i=1; AFNElJ/R714+I9/SNK+nEsuRXMLIBHrTTaBk2hWlt1HZxqh2oVUZe0pG3igIKhoIunnS5V1ThAsvH6o3RIJCEWI=@vger.kernel.org X-Gm-Message-State: AOJu0YxIWVsEgVAprjxoFqKlFrppqQLV/8Im2drSVOjZVfbVOdPkK2hA bVCOGlMr2TGIeQStib/entNIdAI4pQ4mADI9ak1Ks2yT7nVRbGVZFQF/ X-Gm-Gg: Acq92OE1pH/hal/eZoIVU+u8NBM73oyaj/GHofZXYQK6RfntZcLC1ilsw8OJYdZ9qL2 BCODZxy1eihNplsrg/R41YMwHXVCrb/48y2GTYnXMCTmrqPV3RY5fvWkk8E27VbPaPUnAO4sog6 xgXPqnjXIh1q1Qyn+0Con669F0N6kNqqdZAZuAGCaiLbwvgZlVL+wcbwGMVreodZ3X27PnGcZnW +qfBQvErW1bve99A/G4pNY6mvUqkuRTsMQv7lEjyJ0D59npdFsIMk04zqoXZquH2uMuDVUps/QE pYq4bgOmGY+T8/6i00e+krK5s+FMlh4CHw9tZ1rNegIRXL9TpX78NRgW9rYwxv6AXQhleVTlmPL A9nCKoEQrtBzju8Pw9TJHc+FXkJeII7LTGs1D+Y1xbEQAMEbWwwllKXWUoTVPicYMlxy0+XCnFl gM6d5jKNaSeZlpJI8I+b07+VhgZ8JJJBQWTwyZhBQ6uI0berumXDAOWbEOLWA/Xb31 X-Received: by 2002:a05:600c:1d09:b0:48d:50a:6ef4 with SMTP id 5b1f17b1804b1-48fe537fb44mr313902805e9.11.1779284466032; Wed, 20 May 2026 06:41:06 -0700 (PDT) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe53ab6aasm429607155e9.2.2026.05.20.06.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 06:41:05 -0700 (PDT) Date: Wed, 20 May 2026 14:41:04 +0100 From: David Laight To: Tony Rodriguez Cc: davem@davemloft.net, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, andreas@gaisler.com, thuth@redhat.com, regressions@lists.linux.dev, glaubitz@physik.fu-berlin.de Subject: Re: [PATCH 0/1] sparc64: unify thread stack sizing and add explicit 32KB stack Message-ID: <20260520144104.618c75ca@pumpkin> In-Reply-To: <05e0e7a5-107b-410b-853b-883810b1be3e@gmail.com> References: <20260519075809.8993-1-unixpro1970@gmail.com> <20260519110223.5aeb88e3@pumpkin> <05e0e7a5-107b-410b-853b-883810b1be3e@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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 Tue, 19 May 2026 16:57:04 -0700 Tony Rodriguez wrote: > On 5/19/26 3:02 AM, David Laight wrote: > > On Tue, 19 May 2026 00:57:54 -0700 > > Tony Rodriguez wrote: > > =20 > >> This patch fixes a reproducible stack exhaustion issue on SPARC64 > >> that occurs during USB hub enumeration. This regression may have > >> started sometime after kernel v6.12. With the default 16KB kernel > >> stack, the following panic is triggered early in boot: > >> > >> [ 25.528399] Call Trace: > >> [ 25.528403] [<0000000000433cd4>] dump_stack+0x8/0x18 > >> [ 25.528419] [<00000000004297ac>] vpanic+0xdc/0x318 > >> [ 25.528429] [<0000000000429a0c>] panic+0x24/0x30 > >> [ 25.528436] [<0000000000be2280>] __schedule+0xa8/0x7bc > >> [ 25.528445] [<0000000000be2b60>] schedule+0x24/0x4c > >> [ 25.528452] [<0000000000be6970>] schedule_timeout+0xc8/0xe4 > >> [ 25.528459] [<0000000000be3318>] __wait_for_common+0x78/0xf0 > >> [ 25.528466] [<0000000000be3550>] wait_for_completion_timeout+0= x1c/0x2c > >> [ 25.528473] [<000000001005e2f4>] usb_start_wait_urb+0x68/0x128= [usbcore] > >> [ 25.528502] [<000000001005e468>] usb_control_msg+0xb4/0xf8 [us= bcore] > >> [ 25.528518] [<0000000010051180>] set_port_feature+0x44/0x54 [u= sbcore] > >> [ 25.528530] [<00000000100530f0>] hub_power_on+0xc8/0xe8 [usbco= re] > >> [ 25.528543] [<0000000010054fd8>] hub_activate+0x12c/0x644 [usb= core] > >> [ 25.528557] [<0000000010059438>] hub_probe+0xdd4/0xeb0 [usbcor= e] > >> [ 25.528570] [<0000000010062360>] usb_probe_interface+0x234/0x2= 6c [usbcore] > >> [ 25.528585] [<0000000000a10a40>] really_probe+0x1ac/0x3b0 > >> > >> This is caused by large SPARC64 trapframes, register-window spills, > >> and deep call paths in usbcore. A 16KB stack is insufficient for > >> this workload. =20 > > Increasing the stack size for all threads seems overkill. > > That stack doesn't even look deep. > > I suspect there are large on-stack buffers in there. > > > > Unfortunately the traceback doesn't print the stack pointers making > > debugging hard. > > > > -- David =20 >=20 > Hi David. Any specific grub command line keywords and values, and=20 > functions you recommend for debugging this?=C2=A0 I would be happy to sha= re=20 > Trace Calls, etc. so it is easier to reconfirm and zero in on the issue.= =20 Without the stack offsets from the dump, look at the stack frame sizes for the functions in that traceback. I suspect there are too many that get near the compile-time threshold. -- David > -- Tony >=20 > >> The new logic is: > >> > >> SPARC64: > >> THREAD_SIZE =3D 4 * PAGE_SIZE (32KB) > >> THREAD_SHIFT =3D PAGE_SHIFT + 2 > >> THREAD_SIZE_ORDER =3D 2 > >> > >> Non=E2=80=91SPARC64 with PAGE_SHIFT =3D=3D 13: > >> Retains the existing 16KB stack behavior > >> > >> Fallback: > >> Retains the existing 8KB stack behavior > >> > >> Signed-off-by: Tony Rodriguez > >> > >> > >> Tony Rodriguez (1): > >> sparc64: unify thread stack sizing and add explicit 32KB stack > >> > >> arch/sparc/include/asm/thread_info_64.h | 28 ++++++++++++-----------= -- > >> 1 file changed, 14 insertions(+), 14 deletions(-) > >> > >> -- > >> 2.53.0 > >> > >> =20 >=20