From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 607623857C6D; Sun, 19 Sep 2021 23:22:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 607623857C6D From: "wcohen at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug backends/27925] riscv backend only provides return value locations for code compiled for LP64D ABI Date: Sun, 19 Sep 2021 23:22:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: backends X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2021 23:22:02 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27925 --- Comment #4 from William Cohen --- The patch was a first attempt to get something that addresses the issue.=20 Thanks for pointing out where it needs improvements. Don't have a good way to test the issue in user-space so far as the 64-bit risc-v gcc environment seems the expect to have have floating point support= .=20 One way to test might to use perf to set up a probe point (https://www.brendangregg.com/perf.html), but I don't know if perf is using elfutils to get the return value location. Based on the pfault.stp example would have something like: sudo perf probe handle_mm_fault%return $retval sudo perf record -e probe:handle_mm_fault__return -aR sleep 1 sudo perf report sudo perf probe --del=3D"handle_mm_fault__return" This issue occurs when using systemtap on the RISC-V linux kernel which doe= sn't link against the normal glibc runtime and takes steps to ensure that the floating point hardware is not used. Below is a example gcc commandline fr= om a native build (note the -mabi=3Dlp64 -march=3Drv64imac options): gcc -Wp,-MMD,arch/riscv/kernel/probes/.kprobes.o.d -nostdinc -isystem /usr/lib/gcc/riscv64-redhat-linux/10/include -I./arch/riscv/include -I./arch/riscv/include/generated -I./include -I./arch/riscv/include/uapi -I./arch/riscv/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -inc= lude ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -DCC_USING_PATCHABLE_FUNCTION_ENTRY -fmacro-prefix-map=3D./=3D= -Wall -Wundef -Werror=3Dstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=3Dimplicit-function-declaration -Werror=3Dimplicit-int -Werror=3Dreturn-type -Wno-format-security -std=3Dgn= u89 -mabi=3Dlp64 -march=3Drv64imac -mno-save-restore -DCONFIG_PAGE_OFFSET=3D0xffffffe000000000 -mcmodel=3Dmedany -fno-omit-frame= -pointer -mstrict-align -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -= O2 -fno-allow-store-data-races -Wframe-larger-than=3D2048 -fno-stack-protector -Wimplicit-fallthrough=3D5 -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-ca= lls -fno-stack-clash-protection -g -fpatchable-function-entry=3D8 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncat= ion -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restr= ict -Wno-maybe-uninitialized -fno-strict-overflow -fno-stack-check -fconserve-s= tack -Werror=3Ddate-time -Werror=3Dincompatible-pointer-types -Werror=3Ddesignat= ed-init -Wno-packed-not-aligned=20=20=20 -DKBUILD_MODFILE=3D'"arch/riscv/kernel/probes/kprobes"' -DKBUILD_BASENAME=3D'"kprobes"' -DKBUILD_MODNAME=3D'"kprobes"' -D__KBUILD_MODNAME=3Dkmod_kprobes -c -o arch/riscv/kernel/probes/kprobes.o arch/riscv/kernel/probes/kprobes.c --=20 You are receiving this mail because: You are on the CC list for the bug.=