From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43667C77B72 for ; Mon, 17 Apr 2023 21:21:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230043AbjDQVVI convert rfc822-to-8bit (ORCPT ); Mon, 17 Apr 2023 17:21:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbjDQVVF (ORCPT ); Mon, 17 Apr 2023 17:21:05 -0400 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C47D53AB3 for ; Mon, 17 Apr 2023 14:21:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 165506382F0C; Mon, 17 Apr 2023 23:21:00 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zP6gpvDkZfuZ; Mon, 17 Apr 2023 23:20:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 9F0B563CC166; Mon, 17 Apr 2023 23:20:59 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id brjCZ1XPEVNV; Mon, 17 Apr 2023 23:20:59 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 7C2806382F0C; Mon, 17 Apr 2023 23:20:59 +0200 (CEST) Date: Mon, 17 Apr 2023 23:20:59 +0200 (CEST) From: Richard Weinberger To: Arnd Bergmann Cc: Miquel Raynal , Vignesh Raghavendra , =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= , Arnd Bergmann , linux-mtd , linux-kernel Message-ID: <645805930.114012.1681766459273.JavaMail.zimbra@nod.at> In-Reply-To: <20230417205654.1982368-1-arnd@kernel.org> References: <20230417205654.1982368-1-arnd@kernel.org> Subject: Re: [PATCH] mtdchar: mark bits of ioctl handler noinline MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: mtdchar: mark bits of ioctl handler noinline Thread-Index: nwC/Hc1rDi+z5tkPO5cWLU+7DfHq+w== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "Arnd Bergmann" > The addition of the mtdchar_read_ioctl() function caused the stack usage > of mtdchar_ioctl() to grow beyond the warning limit on 32-bit architectures > with gcc-13: > > drivers/mtd/mtdchar.c: In function 'mtdchar_ioctl': > drivers/mtd/mtdchar.c:1229:1: error: the frame size of 1488 bytes is larger than > 1024 bytes [-Werror=frame-larger-than=] > > Mark both the read and write portions as noinline_for_stack to ensure > they don't get inlined and use separate stack slots to reduce the > maximum usage, both in the mtdchar_ioctl() and combined with any > of its callees. > > Fixes: 095bb6e44eb1 ("mtdchar: add MEMREAD ioctl") > Signed-off-by: Arnd Bergmann Reviewed-by: Richard Weinberger Thanks, //richard