From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63DA8371D15 for ; Thu, 21 May 2026 12:04:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779365055; cv=none; b=coaIwBFDYt5BPzZGQHPk9t9V6tx28QNRAMQB7wwlct4oCZVDrb/b7XBnvKE+HMi39wDRprHdiAgqGiAWF/j0c1rTDpsSRdZqgduUiSbcjvun4xmUb3JEjEVXtabM9ZkqXwAm8S/01HO8cJ41O9eB8t90eMrlGVPeDNrEcD/JkCw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779365055; c=relaxed/simple; bh=9M6mdG2e47/k8YkW3zdKxs/RSsbUmV85Ri+NSofSZjk=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=HruJyuT+Xw51jFCXDzfpqmXBjhqYBFLoW7soW8e3jwfR9TxBWbOtldbOPT3p8L5I+QRUuRrA1/n8D6Po4Kzire0gPJnb72/Bs5whIgbylOQA/ta4mzWlypkPdmeAcmklJyI0ILrz/npV5TQfdXLfpxF3LqnTvVTqbNR/3p9OyCo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=EgjTgIiP; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=p1A+RlqB; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="EgjTgIiP"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="p1A+RlqB" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 4771F7A0123; Thu, 21 May 2026 08:04:13 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-04.internal (MEProxy); Thu, 21 May 2026 08:04:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1779365053; x=1779451453; bh=l8A3IcxGq+PdKUMN1gWsB2MNzmKEhpVZUk0Nk7F4a0o=; b= EgjTgIiPe6/c9ey2k2h0IA/f4EzNXkbWJ+Z/9V9XP8qIpRfkJY8xTXRrCSeI5zYU PtqhFYrja45wGu9pFe7wegs/LbxgPZUNiYEJvNKts8ZhRWGeduGvsDW1pWj9VakC +Ws/zc4XtP9AB8n21Xecvu5AkfwiqwWQj2ZBE0XO7jiBLIUynprt4blYkriZTyFV F0BY/CEtjKNCqhOYHOXmLm/GNku6KtDzLLU/rH/WRrCiJEtNDTB2re+8vb74b63y VnVRxmf4dgkXWU/OgTfiYZpHG+n4t5TSAGG4LJXsrSTL17EQ7xkOX6ZbWT2WKkAr HhrM0c8wx1KlhHofqF+VGg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1779365053; x= 1779451453; bh=l8A3IcxGq+PdKUMN1gWsB2MNzmKEhpVZUk0Nk7F4a0o=; b=p 1A+RlqBObxtdQ/s5I0glfYRs4sU6PWjY+Oouxh77fdfwvCwTy/ygSPmoYoW4zYIO ixdaEpP2XbuNcyZOZ/+tD+M9mQ34IeXWrI1oi/e498r+HFor6poRsU+r6mm1kZ/Z Yzq+bi9tg6zImHXRHd3Pr/kfjr0n94WR1jHL4341IlKqfITcFfuUrsoMJvKP1yhf p3YsKSpe1jzxFp3+LZ0s8vx4qynfft6Aq37toimO+s9Wqf42/K5+7BNFIHYDQCfR Y6S4Z6sKQMTSH0ihh0OoCzw/9o7R9W6baE99jfGIyBrENAhyP5WTAhNCA/cVbVd1 R3LRQUy4OSdcyLUV8KbMQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddugeejgeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvg hrnhephfdthfdvtdefhedukeetgefggffhjeeggeetfefggfevudegudevledvkefhvdei necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnh gusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepkedpmhhouggvpehsmhhtphhouhht pdhrtghpthhtoheprgguihhnrghtrgdrshhofhhtfigrrhgvvghnghhinhgvvghrsehgmh grihhlrdgtohhmpdhrtghpthhtoheprghvihhvrdgurghumhesghhmrghilhdrtghomhdp rhgtphhtthhopegrrhhnugeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepsghrrghunh gvrheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprghkphhmsehlihhnuhigqdhfohhu nhgurghtihhonhdrohhrghdprhgtphhtthhopehhihhrohhfuhhmihesmhgrihhlrdhprg hrkhhnvghtrdgtohdrjhhppdhrtghpthhtohepjhgrtghksehsuhhsvgdrtgiipdhrtghp thhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 06423182007E; Thu, 21 May 2026 08:04:12 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: A0sL-wCRL1_7 Date: Thu, 21 May 2026 14:03:51 +0200 From: "Arnd Bergmann" To: "Christian Brauner" , "Arnd Bergmann" Cc: "OGAWA Hirofumi" , "Jan Kara" , avivdaum , "Adi Nata" , "Andrew Morton" , linux-kernel@vger.kernel.org Message-Id: <0d75b50e-a233-498c-84ee-bd938ecaeaf9@app.fastmail.com> In-Reply-To: <20260521-quark-klatschen-cf7a2a18ba34@brauner> References: <20260515204456.2692208-1-arnd@kernel.org> <20260521-quark-klatschen-cf7a2a18ba34@brauner> Subject: Re: [PATCH] fat: avoid stack overflow warning Content-Type: text/plain Content-Transfer-Encoding: 7bit On Thu, May 21, 2026, at 13:41, Christian Brauner wrote: > On Fri, May 15, 2026 at 10:44:46PM +0200, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> Building the fat kunit tests on with -fsanitize=alignment >> reveals some rather excessive stack usage: >> >> fs/fat/fat_test.c: In function 'fat_clus_to_blknr_test': >> fs/fat/fat_test.c:33:1: error: the frame size of 4736 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] >> 33 | } >> | ^ >> fs/fat/fat_test.c: In function 'fat_get_blknr_offset_test': >> fs/fat/fat_test.c:52:1: error: the frame size of 4800 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] >> >> The problem is clearly related to the on-stack copy of a local >> msdos_sb_info structure. Avoid this by making that copy >> 'static const' and changing the called functions to accept >> a constant input. >> >> Signed-off-by: Arnd Bergmann >> --- > > What is this based on, Arnd? I'm getting errors applying this. I had assumed this was an old bug, as it showed up right after I changed toolchains and ran into similar problems elsewhere. Looking again, I see now that this just came in through aecd952e23ee ("kunit: fat: test cluster and directory i_pos layout helpers"), which is in the mm-nonmm-unstable branch in current linux-next. Maybe Andrew can just fold my fixup into that patch. Arnd