https://sourceware.org/bugzilla/show_bug.cgi?id=34030

Aaron Merey <amerey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amerey at redhat dot com
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #7 from Aaron Merey <amerey at redhat dot com> ---
Fixed in the following commit:

commit 9d473aff2f7a81b3c8c78c94b818eb8354c79b26
Author: Pengfei Li <[email protected]>
Date:   Wed Aug 12 10:28:12 2026 +0800

    libdwfl: Handle kernel module sections absent from sysfs

    dwfl_linux_kernel_module_section_address reads loaded kernel module
    section addresses from /sys/module/<name>/sections.  Some sections in
    the module ELF intentionally have no corresponding sysfs file.

    The kernel clears SHF_ALLOC from __versions, __version_ext_crcs, and
    __version_ext_names before laying out a module.  It also clears
    SHF_ALLOC from .data..percpu because that section is allocated
    separately, and skips zero-sized sections when creating the module
    section sysfs attributes.

    Treat those sections as absent from the normal runtime section layout
    when opening their sysfs files fails with ENOENT.  Keep accepting the
    existing .data.percpu spelling while also accepting the .data..percpu
    spelling used by current kernels.  Other errors and missing nonzero
    sections continue to abort the callback.

    Add a regression test that calls the callback with a nonexistent
    per-process module name.  It covers the existing special cases, the
    three module version sections, .data..percpu, a zero-sized section, and
    the failure path for an unknown nonzero section.

    Tested on Ubuntu x86-64 with:

      make check TESTS=dwfl-kernel-module-section-address

    https://sourceware.org/bugzilla/show_bug.cgi?id=34030

            * libdwfl/linux-kernel-modules.c
            (dwfl_linux_kernel_module_section_address): Handle module version
            sections, .data..percpu, and zero-sized sections missing from
            sysfs.
            * tests/dwfl-kernel-module-section-address.c: New test.
            * tests/Makefile.am (check_PROGRAMS, TESTS): Add it.
            (dwfl_kernel_module_section_address_LDADD): New variable.

    Signed-off-by: Pengfei Li <[email protected]>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to