* [PATCH v1] um: Increase stack frame size threshold for signal.c
@ 2020-12-09 18:19 Andy Shevchenko
2020-12-09 23:35 ` David Gow
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2020-12-09 18:19 UTC (permalink / raw)
To: Jeff Dike, Richard Weinberger, Anton Ivanov, linux-um,
linux-kselftest
Cc: Andy Shevchenko
The signal.c can't use heap for bit data located on stack. However,
by default a compiler warns us about overstepping stack frame size
threshold:
arch/um/os-Linux/signal.c: In function ‘sig_handler_common’:
arch/um/os-Linux/signal.c:51:1: warning: the frame size of 2960 bytes is larger than 2048 bytes [-Wframe-larger-than=]
51 | }
| ^
arch/um/os-Linux/signal.c: In function ‘timer_real_alarm_handler’:
arch/um/os-Linux/signal.c:95:1: warning: the frame size of 2960 bytes is larger than 2048 bytes [-Wframe-larger-than=]
95 | }
| ^
Due to above increase stack frame size threshold explicitly for signal.c
to avoid unnecessary warning.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/um/os-Linux/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile
index 839915b8c31c..77ac50baa3f8 100644
--- a/arch/um/os-Linux/Makefile
+++ b/arch/um/os-Linux/Makefile
@@ -10,6 +10,8 @@ obj-y = execvp.o file.o helper.o irq.o main.o mem.o process.o \
registers.o sigio.o signal.o start_up.o time.o tty.o \
umid.o user_syms.o util.o drivers/ skas/
+CFLAGS_signal.o += -Wframe-larger-than=4096
+
obj-$(CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA) += elf_aux.o
USER_OBJS := $(user-objs-y) elf_aux.o execvp.o file.o helper.o irq.o \
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v1] um: Increase stack frame size threshold for signal.c
2020-12-09 18:19 [PATCH v1] um: Increase stack frame size threshold for signal.c Andy Shevchenko
@ 2020-12-09 23:35 ` David Gow
0 siblings, 0 replies; 2+ messages in thread
From: David Gow @ 2020-12-09 23:35 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Jeff Dike, Richard Weinberger, Anton Ivanov, linux-um,
open list:KERNEL SELFTEST FRAMEWORK
On Thu, Dec 10, 2020 at 2:23 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> The signal.c can't use heap for bit data located on stack. However,
> by default a compiler warns us about overstepping stack frame size
> threshold:
>
> arch/um/os-Linux/signal.c: In function ‘sig_handler_common’:
> arch/um/os-Linux/signal.c:51:1: warning: the frame size of 2960 bytes is larger than 2048 bytes [-Wframe-larger-than=]
> 51 | }
> | ^
> arch/um/os-Linux/signal.c: In function ‘timer_real_alarm_handler’:
> arch/um/os-Linux/signal.c:95:1: warning: the frame size of 2960 bytes is larger than 2048 bytes [-Wframe-larger-than=]
> 95 | }
> | ^
>
> Due to above increase stack frame size threshold explicitly for signal.c
> to avoid unnecessary warning.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
Thanks -- this has been annoying me for a while!
I've tested it -- the warning is indeed gone, and nothing else seems to break.
Tested-by: David Gow <davidgow@google.com>
Cheers,
-- David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-09 23:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-09 18:19 [PATCH v1] um: Increase stack frame size threshold for signal.c Andy Shevchenko
2020-12-09 23:35 ` David Gow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox