The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Guenter Roeck' <linux@roeck-us.net>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	"linux-xtensa@linux-xtensa.org" <linux-xtensa@linux-xtensa.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Chris Zankel <chris@zankel.net>,
	Max Filippov <jcmvbkbc@gmail.com>
Subject: RE: [PATCH] xtensa: Increase size of gcc stack frame check
Date: Mon, 13 Sep 2021 15:57:08 +0000	[thread overview]
Message-ID: <315e4a23990444f585a15d2e23a39b8f@AcuMS.aculab.com> (raw)
In-Reply-To: <20210912025235.3514761-1-linux@roeck-us.net>

From: Guenter Roeck
> Sent: 12 September 2021 03:53
> 
> xtensa frame size is larger than the frame size for almost all other
> architectures. This results in more than 50 "the frame size of <n> is
> larger than 1024 bytes" errors when trying to build xtensa:allmodconfig.
> 
> Increase frame size for xtensa to 1536 bytes to avoid compile errors
> due to frame size limits.

Have you done anything to check what happens at run-time?
I'd guess that the deepest stack use is inside printk() in
some obscure error path.

In reality all these 1k+ stack frames need killing
rather than the limit for the compiler warning increased.

While it may be sensible for a system call entry function
so allocate a reasonable size buffer on stack (as poll()
and sendmsg() probably do) allocating big buffers way
down the call stack could easily cause stack overflow.
Even a 1k stack frame is huge.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  parent reply	other threads:[~2021-09-13 15:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12  2:52 [PATCH] xtensa: Increase size of gcc stack frame check Guenter Roeck
2021-09-12  3:05 ` Max Filippov
2021-09-12  4:02   ` Guenter Roeck
2021-09-12  5:16     ` Max Filippov
2021-09-13 15:57 ` David Laight [this message]
2021-09-13 16:11   ` Guenter Roeck
2021-09-14  7:04     ` Max Filippov
2021-09-14 14:02       ` Guenter Roeck
2021-09-14 17:24         ` Max Filippov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=315e4a23990444f585a15d2e23a39b8f@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris@zankel.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=linux@roeck-us.net \
    --cc=masahiroy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox