From: "brueckner at linux dot vnet.ibm.com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
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
Date: Fri, 17 Nov 2017 14:29:00 -0000 [thread overview]
Message-ID: <bug-22452-10460@http.sourceware.org/bugzilla/> (raw)
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.
next reply other threads:[~2017-11-17 14:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 14:29 brueckner at linux dot vnet.ibm.com [this message]
2017-11-17 15:27 ` [Bug libdw/22452] " mark at klomp dot org
2017-11-17 15:38 ` brueckner at linux dot vnet.ibm.com
2017-11-17 15:44 ` brueckner at linux dot vnet.ibm.com
2017-11-17 15:53 ` mark at klomp dot org
2017-11-17 15:56 ` mark at klomp dot org
2017-11-17 16:02 ` brueckner at linux dot vnet.ibm.com
2017-11-17 16:03 ` brueckner at linux dot vnet.ibm.com
2017-11-17 16:04 ` brueckner at linux dot vnet.ibm.com
2017-11-17 16:46 ` mark at klomp dot org
2017-11-20 8:09 ` brueckner at linux dot vnet.ibm.com
2017-11-20 8:11 ` krebbel at linux dot vnet.ibm.com
2017-11-20 9:28 ` mark at klomp dot org
2017-11-20 10:08 ` krebbel at linux dot vnet.ibm.com
2017-11-20 14:00 ` brueckner at linux dot vnet.ibm.com
2017-12-10 15:45 ` [Bug libdw/22452] Extend ebl_reloc_ hooks with relocations against load address for use in libdwfl/relocate.c mark at klomp dot org
2018-03-05 12:52 ` mark at klomp dot org
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-22452-10460@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=elfutils-devel@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).