Skip to content
  • Thomas Richter's avatar
    perf record: Fix s390 missing module symbol and warning for non-root users · 60a3e3b9
    Thomas Richter authored
    [ Upstream commit 6738028d ]
    
    Command 'perf record' and 'perf report' on a system without kernel
    debuginfo packages uses /proc/kallsyms and /proc/modules to find
    addresses for kernel and module symbols. On x86 this works for root and
    non-root users.
    
    On s390, when invoked as non-root user, many of the following warnings
    are shown and module symbols are missing:
    
        proc/{kallsyms,modules} inconsistency while looking for
            "[sha1_s390]" module!
    
    Command 'perf record' creates a list of module start addresses by
    parsing the output of /proc/modules and creates a PERF_RECORD_MMAP
    record for the kernel and each module. The following function call
    sequence is executed:
    
      machine__create_kernel_maps
        machine__create_module
          modules__parse
            machine__create_module --> for each line in /proc/modules
              arch__fix_module_text_start
    
    Function arch__fix_module_text_start() is s390 spec...
    60a3e3b9