From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 27F843858C54; Sun, 30 Apr 2023 04:33:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 27F843858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682829236; bh=1hU5rzQ50DyDJ+CL95C287+B+FHPEsoD4Z2tCrgjXyQ=; h=From:To:Subject:Date:From; b=xM9ZbOL4ZCNvYs7qsxr4KSKM6pZmp6xziSfamwKUbyBI2LAZHG7YaLghiGUhCOQ5A HBsyb/BW+CcF9YuJx2/HmCbGl6hQBCxxC5TIHmSoXsxbJwexMesZvFXtVE8oaGuDcC QQKIz9ZJK67WecP04TuAP2b0923hV04//Ez+Y4ig= From: "agentzh at gmail dot com" 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 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: agentzh at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30406 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 =E2=80=98ME= M_PERCPU=E2=80=99 524 | MEM_PERCPU =3D 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 =E2=80=98MEM_PERCPU=E2=80=99 with type =E2=80=98enum _stp_mem= type=E2=80=99 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 `S= TP_` prefix to stap runtime's symbols there to avoid such issues. --=20 You are receiving this mail because: You are the assignee for the bug.=