This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[Bug libdw/22452] New: Failed to obtain CFI data for a OP_call_frame_CFA when looking for func entrypoc in an s390 kernel module
- From: "brueckner at linux dot vnet.ibm.com" <sourceware-bugzilla at sourceware dot org>
- To: elfutils-devel at sourceware dot org
- Date: Fri, 17 Nov 2017 14:29:32 +0000
- Subject: [Bug libdw/22452] New: Failed to obtain CFI data for a OP_call_frame_CFA when looking for func entrypoc in an s390 kernel module
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22452
Bug ID: 22452
Summary: Failed to obtain CFI data for a OP_call_frame_CFA when
looking for func entrypoc in an s390 kernel module
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libdw
Assignee: unassigned at sourceware dot org
Reporter: brueckner at linux dot vnet.ibm.com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
Created attachment 10612
--> https://sourceware.org/bugzilla/attachment.cgi?id=10612&action=edit
ko-func-call-frame-cfa.c
Problem
-------
The perf probe -m <mod> -V <func> fails when looking up variables for a
function defined in an s390 kernel module. I have attached a simple test
program that performs these steps which results in problems to receive an CFI
frame.
Test Case and reproduction steps
--------------------------------
1. Iterate through the DIE to spot a particular function
2. Determine frame base attribute for that function
3. Obtain location expressions for the frame base and entry pc of the function
4. The returned location expression is a DW_OP_call_frame_cfa
5. Obtain CFI from either eh_frame or debug_frame, which fails.
6. Obtain ops from dwarf_frame_cfa()
The step 5 always fails for both, .eh_frame and debug_frame. When using
dwarf_cfi_addrframe() on the .eh_frame, the resulting dwarf error message is
"no matching address range".
The attachment "ko-func-call-frame-cfa.c" contains this test case. Compile and
link against ldw -lelf and issue with: ./ko-func-call-frame-cfa <func>
<module.ko>
Note that this affects kernel modules built for s390. Running the test program
against the s390 vmlinux image works fine, e.g., for the setup_arch function.
As I cannot attach binary code, you can obtain an s390 kernel module, for
example, from the kernel debuginfo packages of Fedora. For example:
1.
https://download-ib01.fedoraproject.org/pub/fedora-secondary/releases/27/Server/s390x/debug/tree/Packages/k/kernel-debuginfo-4.13.9-300.fc27.s390x.rpm
2. rpm2cpio < kernel-debuginfo-4.13.9-300.fc27.s390x.rpm |cpio -id
3. Try to find details about the "xts_paes_crypt" function in
paes_s390.ko.debug
For example:
ko-func-call-frame-cfa xts_paes_crypt
kernel/arch/s390/crypto/paes_s390.ko.debug
I: Looking up xts_paes_crypt@kernel/arch/s390/crypto/paes_s390.ko.debug
DIE: name=xts_paes_crypt tag=subprogram offset=58750 (0xe57e)
low pc: 10c18
high pc: 10dd6
entry pc: 10c18
I: Frame Base: Number of locations: 1 (len=1)
I: Frame Base: Location operation 0: call_frame_cfa
E: No CFI data available
--
You are receiving this mail because:
You are on the CC list for the bug.