From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9C8F6385803F; Fri, 5 Jan 2024 15:20:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C8F6385803F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1704468014; bh=DcqDhUtA33LXgiHjEzUCBpreAcm/wq3cqGeV0OyyBW0=; h=From:To:Subject:Date:From; b=uOVbMWpFOTw+NzVyMklmIXqrsKHCxORqnwEi+v8/ijgKtm4EVLPDphFB3ymhgoV3U SFDlVTz53q7iRQILVLSJ0ycFTu9u06WA2Cve1tzHOyAWKvh8sdys41u3HWZiUhQufK KRxxohJ+7UiXepOCbk4xJClbQPizxELL8JpxSHMs= From: "mcermak at redhat dot com" To: systemtap@sourceware.org Subject: [Bug runtime/31215] New: @__compat_task misbehaves on RHEL9 x86_64 Date: Fri, 05 Jan 2024 15:20:13 +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: mcermak at redhat dot com X-Bugzilla-Status: NEW 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=3D31215 Bug ID: 31215 Summary: @__compat_task misbehaves on RHEL9 x86_64 Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: runtime Assignee: systemtap at sourceware dot org Reporter: mcermak at redhat dot com Target Milestone: --- Apparently the @__compat_task macro misbehaves on RHEL9. See how _stp_is_compat_task() returns 0 although it should clearly return 1 (the la= st column in systemtap output below). GCC was invoked with -m32: (Note that the 943211848ea34e4d5d10f0094dc84b47667d84ed version of sched_rr_get_interval.c had to be slightly updated to avoid SEGV by comment= ing out the latest subtest) el9 x86_64 # gcc=20 /root/systemtap/testsuite/systemtap.syscall/sched_rr_get_interval.c -m32 = -lrt -Wno-stringop-overflow -lm -o /tmp/sched_rr_get_interval -g el9 x86_64 # stap --poison-cache -ge 'probe syscall.mmap2 {printdln(", ", n= ame, _stp_syscall_nr(), syscall_name(_stp_syscall_nr()), execname(), probefunc(), %{_stp_is_compat_task()%})}' -c /tmp/sched_rr_get_interval=20 /tmp/stap06kHAR/stap_ad583362bc2821360e315a0e4befae13_166569_src.o: warning: objtool: _stp_vsprint_memory+0x220: call to __get_user_nocheck_1() with UAC= CESS enabled /tmp/stap06kHAR/stap_ad583362bc2821360e315a0e4befae13_166569_src.o: warning: objtool: .altinstr_replacement+0x36: call to copy_user_generic_string() with UACCESS enabled mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 192, lgetxattr, sched_rr_get_in, 0xffffffffabf83e40, 0 mmap2, 9, mmap, stapio, 0xffffffffabc32720, 0 mmap2, 9, mmap, stapio, 0xffffffffabc32720, 0 mmap2, 9, mmap, stapio, 0xffffffffabc32720, 0 el9 x86_64 # Now, here is how this works fine on rhel8: el8 x86_64 # gcc=20 /root/systemtap/testsuite/systemtap.syscall/sched_rr_get_interval.c -m32 = -lrt -Wno-stringop-overflow -lm -o /tmp/sched_rr_get_interval -g el8 x86_64 # stap --poison-cache -ge 'probe syscall.mmap2 {printdln(", ", n= ame, _stp_syscall_nr(), syscall_name(_stp_syscall_nr()), execname(), probefunc(), %{_stp_is_compat_task()%})}' -c /tmp/sched_rr_get_interval mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 el8 x86_64 # stap --poison-cache -ge 'probe syscall.mmap2 {printdln(", ", n= ame, _stp_syscall_nr(), syscall_name(_stp_syscall_nr()), execname(), probefunc(), %{_stp_is_compat_task()%})}' -c /tmp/sched_rr_get_interval mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 192, mmap2, sched_rr_get_in, 0xffffffff8c0e9d50, 1 mmap2, 9, mmap, stapio, 0xffffffff8be2e730, 0 mmap2, 9, mmap, stapio, 0xffffffff8be2e730, 0 mmap2, 9, mmap, stapio, 0xffffffff8be2e730, 0 el8 x86_64 # --=20 You are receiving this mail because: You are the assignee for the bug.=