From: "agentzh at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/30406] New: C symbol conflicts when using Fedora 36's 6.2 kernels and -DDEBUG_MEM
Date: Sun, 30 Apr 2023 04:33:55 +0000 [thread overview]
Message-ID: <bug-30406-6586@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=30406
Bug ID: 30406
Summary: C symbol conflicts when using Fedora 36's 6.2 kernels
and -DDEBUG_MEM
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: ---
When using Fedora 36 x86_64's own 6.2 kernel with the latest stap and the
`-DDEBUG_MEM` option, there is symbol conflicts with the kernel headers. It can
be reproduced by the following minimal example:
```
probe tcp.receive {
println("Hit");
exit();
}
```
And the compilation error when building the .ko file is like this:
```
$ /opt/stap/bin/stap -DDEBUG_MEM a.stp
In file included from ./include/linux/filter.h:9,
from ./include/net/sock_reuseport.h:5,
from ./include/net/tcp.h:35,
from
/tmp/stapciuh4P/stap_231a49b04a681bf897ea581eaa269a03_18995_src.c:40:
./include/linux/bpf.h:524:9: error: redeclaration of enumerator ‘MEM_PERCPU’
524 | MEM_PERCPU = BIT(4 + BPF_BASE_TYPE_BITS),
| ^~~~~~~~~~
In file included from /opt/stap/share/systemtap/runtime/linux/runtime.h:265,
from /opt/stap/share/systemtap/runtime/runtime.h:26,
from
/tmp/stapciuh4P/stap_231a49b04a681bf897ea581eaa269a03_18995_src.c:21:
/opt/stap/share/systemtap/runtime/linux/alloc.c:56:47: note: previous
definition of ‘MEM_PERCPU’ with type ‘enum _stp_memtype’
56 | enum _stp_memtype { MEM_KMALLOC, MEM_VMALLOC, MEM_PERCPU };
| ^~~~~~~~~~
make[1]: *** [scripts/Makefile.build:252:
/tmp/stapciuh4P/stap_231a49b04a681bf897ea581eaa269a03_18995_src.o] Error 1
make: *** [Makefile:2025: /tmp/stapciuh4P] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
```
It is the symbol MEM_PERCPU in conflict. I'll propose a patch to add the `STP_`
prefix to stap runtime's symbols there to avoid such issues.
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2023-04-30 4:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-30 4:33 agentzh at gmail dot com [this message]
2023-04-30 4:39 ` [Bug runtime/30406] " agentzh at gmail dot com
2023-04-30 21:25 ` 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-30406-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).