From: "agentzh at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/25852] New: Avoid allocating the temp string buffer for kernel backtraces on the kernel stack
Date: Sat, 18 Apr 2020 19:42:18 +0000 [thread overview]
Message-ID: <bug-25852-6586@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=25852
Bug ID: 25852
Summary: Avoid allocating the temp string buffer for kernel
backtraces on the kernel stack
Product: systemtap
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: runtime
Assignee: systemtap at sourceware dot org
Reporter: agentzh at gmail dot com
Target Milestone: ---
I've noted that for large -DMAXBACKTRACE=N values, the kernel module won't even
compile at all:
```
$ /opt/stap/bin/stap -DMAXBACKTRACE=80 -e 'probe oneshot { print_backtrace() }'
In file included from
/tmp/stap9dNBFe/stap_e6cbcb21af7634fac8b4ca07b2e07a58_1196_src.c:83:
/opt/stap/share/systemtap/runtime/stack.c: In function
‘_stp_stack_print_fallback.isra.0.constprop’:
/opt/stap/share/systemtap/runtime/stack.c:235:1: error: the frame size of 648
bytes is larger than 512 bytes [-Werror=frame-larger-than=]
235 | }
| ^
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:265:
/tmp/stap9dNBFe/stap_e6cbcb21af7634fac8b4ca07b2e07a58_1196_src.o] Error 1
make: *** [Makefile:1652: /tmp/stap9dNBFe] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
```
This is due to the fact that in the stap runtime C function
`_stp_stack_print_fallback`, the local variable `unsigned long
entries[MAXBACKTRACE]` would take too much space on the kernel stack. Shall we
instead allocate this out of the stack, like in the ctx data structure?
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2020-04-18 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-18 19:42 agentzh at gmail dot com [this message]
2020-09-28 21:13 ` [Bug runtime/25852] " agentzh at gmail dot com
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=bug-25852-6586@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).