mirror-linux/drivers/mtd
Arnd Bergmann 007c042256 mtdchar: mark bits of ioctl handler noinline
commit 0ea923f443 upstream.

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: 095bb6e44e ("mtdchar: add MEMREAD ioctl")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230417205654.1982368-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:34:24 +02:00
..
chips
devices
hyperbus
lpddr mtd: lpddr2_nvm: Fix possible null-ptr-deref 2022-12-31 13:32:12 +01:00
maps mtd: maps: pxa2xx-flash: fix memory leak in probe 2022-12-31 13:32:15 +01:00
nand mtd: rawnand: marvell: don't set the NAND frequency select 2023-06-09 10:34:05 +02:00
parsers mtd: parsers: scpart: fix __udivdi3 undefined on mips 2023-01-18 11:58:24 +01:00
spi-nor mtd: spi-nor: spansion: Enable JFFS2 write buffer for Infineon s25hx SEMPER flash 2023-05-17 11:53:29 +02:00
tests
ubi ubi: Fix return value overwrite issue in try_write_vid_and_data() 2023-05-11 23:03:05 +09:00
Kconfig
Makefile
ftl.c
inftlcore.c
inftlmount.c
mtd_blkdevs.c
mtdblock.c mtdblock: tolerate corrected bit-flips 2023-04-20 12:35:06 +02:00
mtdblock_ro.c
mtdchar.c mtdchar: mark bits of ioctl handler noinline 2023-06-09 10:34:24 +02:00
mtdconcat.c
mtdcore.c mtd: core: fix error path for nvmem provider 2023-05-11 23:03:40 +09:00
mtdcore.h
mtdoops.c
mtdpart.c mtd: mtdpart: Don't create platform device that'll never probe 2023-03-10 09:33:38 +01:00
mtdpstore.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c