From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 3BA153C3BFF for ; Thu, 21 May 2026 11:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779363708; cv=none; b=OrgxzgKc7t1+P5Je5kC0Y1koHREjld5SUxXsTEgOuJ9swBz2O8/gzhKyCIIaU1VX2Zm/fu5vmcm3d8T94c41/UuzIV237+8rioFLdGFkUxHWkPWkZ1uaj7he6BbHcCSVT7JG1OEJonncRJironP3MHbsmtPH+/0pbyIGOl/xXeI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779363708; c=relaxed/simple; bh=cEhCoCEvUkIPp3scPL5gWXe0whHGaxjaZtWpFZ2P5do=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CvA7EcxRSelLyFO9Xxm1QGEZ+MmMTTFZSu1k7vD7SaMy0Unc0ilgqzp7Cu4XI1tUXcPA9Pz6/vvavOajJre05DBmDasn9JJGxaH+gpfH1lMNaLK61A+6HKq9lmEm8i/KxyF3X1fUVSGHZw+1zUW0nIeWtJSLP3LOZ5NWfkRsyNc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i6287Log; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i6287Log" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 702E71F000E9; Thu, 21 May 2026 11:41:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779363705; bh=7lzNlSMtLjxIjMhlD8mw55eV7iD76jSTHIRo81p2W/Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=i6287LogIz+hsJnTirRWEO06tbrofV//go3OqAyaue6dMXrkV/QM0m0qtQjNOgvIT 6EBm+bT4DzTsV15oIc6m8hxBM68OA21kyf4LZI8/V3FHpozEZYHjVpl2k3PRuOk+qD hAMG7xKpI8S5C8KzOge23mQlYmLA/DTTlLp7xUDn4pNIuplaX1nZa0U7a/DKJNWwfA e8zgpFm8aJryPyGcGDP/sjhdlzkNB9Z/p3k2x+HE+2OtGvmCSW4HDkHads6iAfZ7sE MFCYlRZkjW+jOCTLj3N9R5GRr9ZynbLaVYdoYIjtXmDH58iNCcq+REzOFER1lGFrjk b3Gl8YYN2zo3Q== Date: Thu, 21 May 2026 13:41:41 +0200 From: Christian Brauner To: Arnd Bergmann Cc: OGAWA Hirofumi , Arnd Bergmann , Jan Kara , avivdaum , Adi Nata , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] fat: avoid stack overflow warning Message-ID: <20260521-quark-klatschen-cf7a2a18ba34@brauner> References: <20260515204456.2692208-1-arnd@kernel.org> 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-Disposition: inline In-Reply-To: <20260515204456.2692208-1-arnd@kernel.org> 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.