From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31301 invoked by alias); 17 Nov 2017 14:29:37 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 29504 invoked by uid 48); 17 Nov 2017 14:29:33 -0000 From: "brueckner at linux dot vnet.ibm.com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libdw X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: brueckner at linux dot vnet.ibm.com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created 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 X-SW-Source: 2017-q4/txt/msg00050.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D22452 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=3D10612&action=3Ded= it ko-func-call-frame-cfa.c Problem ------- The perf probe -m -V 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 C= FI 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 funct= ion 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 Note that this affects kernel modules built for s390. Running the test prog= ram against the s390 vmlinux image works fine, e.g., for the setup_arch functio= n. 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/Se= rver/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=20 I: Looking up xts_paes_crypt@kernel/arch/s390/crypto/paes_s390.ko.debug DIE: name=3Dxts_paes_crypt tag=3Dsubprogram offset=3D58750 (0xe57e) low pc: 10c18 high pc: 10dd6 entry pc: 10c18 I: Frame Base: Number of locations: 1 (len=3D1) I: Frame Base: Location operation 0: call_frame_cfa E: No CFI data available --=20 You are receiving this mail because: You are on the CC list for the bug.