From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.hostsharing.net (mailout1.hostsharing.net [83.223.95.204]) (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 A5B1913635E for ; Wed, 8 Apr 2026 06:35:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.223.95.204 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775630161; cv=none; b=BIZd7KccRc/0jJR1lEHJmXCXuj8EX2IfxjwmDIS+V+d1cWc2wDVtP81xpk6lB1M3lCA0nQtn4t9M0RVtZtqn4A4bv7sMvlGbOVaIxxiVP5sL0Dyjai7u/7hp6cAgaWhNSjvqyx8aFKUHbCNLMu4UaWrFyj5dhoa+2sT2sBEHAck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775630161; c=relaxed/simple; bh=xIldbBqesq0ubymDOfK8yXt3bGZsO27jIZNp1AYgFbw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qXSix3qVCVmYdPgAiZIfZXpCZWtQ4iJpkgpeu2wCdnmHq80pb0csxmqS36yfQdZeBN9zrIGRnhMvy3jBPY2w4nTmXXtD/Jyzhp0kqXlmYjq2bJLfBj4N3Mlta2uiDW/HjMhvAy+Czg/UrYoCw2rpS2l9/Uaxvy+beSEhhBNoPEQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de; spf=pass smtp.mailfrom=wunner.de; arc=none smtp.client-ip=83.223.95.204 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wunner.de Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "*.hostsharing.net", Issuer "GlobalSign GCC R6 AlphaSSL CA 2025" (verified OK)) by mailout1.hostsharing.net (Postfix) with ESMTPS id 26F7B364; Wed, 08 Apr 2026 08:35:52 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 0C98E60CF552; Wed, 8 Apr 2026 08:35:52 +0200 (CEST) Date: Wed, 8 Apr 2026 08:35:52 +0200 From: Lukas Wunner To: Andy Shevchenko Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Subject: Re: [PATCH v2 1/1] mtd: cfi_cmdset_0001: Factor out do_write_buffer_locked() to reduce stack frame Message-ID: References: <20260204012630.2211832-1-andriy.shevchenko@linux.intel.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=us-ascii Content-Disposition: inline In-Reply-To: <20260204012630.2211832-1-andriy.shevchenko@linux.intel.com> On Wed, Feb 04, 2026 at 02:25:27AM +0100, Andy Shevchenko wrote: > Compiler is not happy about used stack frame: > > drivers/mtd/chips/cfi_cmdset_0001.c: In function 'do_write_buffer': > drivers/mtd/chips/cfi_cmdset_0001.c:1887:1: error: the frame size of 1296 bytes is larger than 1280 bytes [-Werror=frame-larger-than=] > > Fix this by factoring out do_write_buffer_locked(). FWIW, the issue only occurs with CONFIG_KASAN_STACK=y, so an alternative to refactoring the function is to disable KASAN for this particular file: diff --git a/drivers/mtd/chips/Makefile b/drivers/mtd/chips/Makefile index 1f4e84f1cd88..7110eb97bd25 100644 --- a/drivers/mtd/chips/Makefile +++ b/drivers/mtd/chips/Makefile @@ -14,3 +14,8 @@ obj-$(CONFIG_MTD_JEDECPROBE) += jedec_probe.o obj-$(CONFIG_MTD_RAM) += map_ram.o obj-$(CONFIG_MTD_ROM) += map_rom.o obj-$(CONFIG_MTD_ABSENT) += map_absent.o + +# Avoid exceeding stack frame in do_write_buffer() +ifeq ($(ARCH),arm) +KASAN_SANITIZE_cfi_cmdset_0001.o := n +endif