This is the mail archive of the mailing list for the elfutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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

            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
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 10612

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

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>

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:

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

For example:
ko-func-call-frame-cfa xts_paes_crypt
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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]