Bug 1245346 - missing a concrete subprogram for kernel SyS_fadvise64_64
Summary: missing a concrete subprogram for kernel SyS_fadvise64_64
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-21 20:02 UTC by Josh Stone
Modified: 2016-07-19 18:50 UTC (History)
8 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2016-07-19 17:07:07 UTC


Attachments (Terms of Use)

Description Josh Stone 2015-07-21 20:02:32 UTC
Description of problem:
The kernel debuginfo contains a prototype subprogram for SyS_fadvise64_64, and an inline instance referencing that under SyS_fadvise64.  However, the debuginfo does not have a concrete subprogram (with low/high_pc), even though I can see it does exist in the symbol table and /proc/kallsyms.  The same kernel on F21 is fine.

Version-Release number of selected component (if applicable):
kernel-debuginfo-4.0.7-300.fc22.x86_64
built with gcc-5.1.1-4.fc22.x86_64 and binutils-2.25-8.fc22.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Confirm the subprogram does exist in the symbol table.
2. Find the subprogram DIE declaring "SyS_fadvise64_64"
3. Look for DIEs which reference that as DW_AT_abstract_origin

Actual results:
Only an inline instance exists, under SyS_fadvise64.

Expected results:
Should have that inline and also a standalone subprogram.

Additional info:
This was found in systemtap:
https://sourceware.org/bugzilla/show_bug.cgi?id=18701

With syscall wrappers, you get the real function named SyS_foo and an alias sys_foo.  It may be worth noting that function is only called by the aliased name, both in the same CU mm/fadvise.c, and also in arch/x86/ia32/sys_ia32.c.  The latter CU also gets a subprogram prototype for "sys_fadvise64_64".  I'm not sure this is any problem though, as f21 is the same and it works fine.

With dwgrep, it's easy to search the DIEs to see the problem.

$ nm /usr/lib/debug/lib/modules/4.0.7-300.fc22.x86_64/vmlinux \
  | grep -i sys_fadvise64
ffffffff811e3940 T sys_fadvise64
ffffffff811e3940 T SyS_fadvise64
ffffffff811e36d0 T sys_fadvise64_64
ffffffff811e36d0 T SyS_fadvise64_64
$ dwgrep 'entry ?(@AT_name == "SyS_fadvise64_64")' \
  /usr/lib/debug/lib/modules/4.0.7-300.fc22.x86_64/vmlinux
[1864fa0]       subprogram
        external        true
        name    "SyS_fadvise64_64"
        decl_file       "mm/fadvise.c"
        decl_line       28
        prototyped      true
        type    [1857399] base_type
        inline  inlined
        sibling [1864fe7] subprogram
[1865196]       inlined_subroutine
        abstract_origin [1864fa0] subprogram
        entry_pc        0xffffffff811e395f
        ranges  0xffffffff811e395f..0xffffffff811e3a25, 0xffffffff811e3a38..0xffffffff811e3a54, 0xffffffff811e3a68..0xffffffff811e3ba9
        call_file       "mm/fadvise.c"
        call_line       159

We have the inline call within SyS_fadvise64, but not its own subprogram.

Compare to F21 where it's fine:

$ nm /usr/lib/debug/lib/modules/4.0.7-200.fc21.x86_64/vmlinux \
  | grep -i sys_fadvise64
ffffffff811e2730 T sys_fadvise64
ffffffff811e2730 T SyS_fadvise64
ffffffff811e24b0 T sys_fadvise64_64
ffffffff811e24b0 T SyS_fadvise64_64
$ dwgrep 'entry ?(@AT_name == "SyS_fadvise64_64")' \
  /usr/lib/debug/lib/modules/4.0.7-200.fc21.x86_64/vmlinux
[187f75e]       subprogram
        external        true
        name    "SyS_fadvise64_64"
        decl_file       "mm/fadvise.c"
        decl_line       28
        prototyped      true
        type    [1871bea] base_type
        inline  inlined
        sibling [187f7a5] subprogram
[187f892]       subprogram
        abstract_origin [187f75e] subprogram
        low_pc  0xffffffff811e24b0
        high_pc 625
        frame_base      0..0xffffffffffffffff:0 call_frame_cfa
        GNU_all_call_sites      true
        sibling [187fcc4] subprogram
[187fd62]       inlined_subroutine
        abstract_origin [187f75e] subprogram
        entry_pc        0xffffffff811e274f
        ranges  0xffffffff811e274f..0xffffffff811e2875, 0xffffffff811e2888..0xffffffff811e28a4, 0xffffffff811e28b8..0xffffffff811e29a1
        call_file       "mm/fadvise.c"
        call_line       159

We have both the inline and its own subprogram with proper pc ranges.

Comment 1 Fedora End Of Life 2016-07-19 17:07:07 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 2 Josh Stone 2016-07-19 18:50:08 UTC
FWIW, Fedora 24 does look better:

$ nm /usr/lib/debug/lib/modules/4.6.3-300.fc24.x86_64/vmlinux \
  | grep -i sys_fadvise64_64
ffffffff81204a60 T sys_fadvise64_64
ffffffff81204a60 T SyS_fadvise64_64

$ dwgrep 'entry ?(@AT_name == "SyS_fadvise64_64")' \
  /usr/lib/debug/lib/modules/4.6.3-300.fc24.x86_64/vmlinux
[25266f0]       inlined_subroutine
        abstract_origin [2526c76] subprogram
        entry_pc        0xffffffff81204cdf
        ranges  0xffffffff81204cdf..0xffffffff81204da3, 0xffffffff81204db2..0xffffffff81204dce, 0xffffffff81204ddd..0xffffffff81204ef8, 0xffffffff81204f01..0xffffffff81204f1a
        call_file       "mm/fadvise.c"
        call_line       159
[2526c76]       subprogram
        external        true
        name    "SyS_fadvise64_64"
        decl_file       "mm/fadvise.c"
        decl_line       28
        prototyped      true
        type    [25125b0] base_type
        inline  inlined
        sibling [2526cbd] subprogram
[2526e97]       subprogram
        abstract_origin [2526c76] subprogram
        low_pc  0xffffffff81204a60
        high_pc 603
        frame_base      0..0xffffffffffffffff:0 call_frame_cfa
        GNU_all_call_sites      true
        sibling [252736c] subprogram


So DIE [2526e97] matches the symbol table.


Note You need to log in before you can comment on or make changes to this bug.