17 Mar, 2020

1 commit

  • In order to preserve backwards compatability with kmod tools, we have to
    move the namespace field in Module.symvers last, as the depmod -e -E
    option looks at the first three fields in Module.symvers to check symbol
    versions (and it's expected they stay in the original order of crc,
    symbol, module).

    In addition, update an ancient comment above read_dump() in modpost that
    suggested that the export type field in Module.symvers was optional. I
    suspect that there were historical reasons behind that comment that are
    no longer accurate. We have been unconditionally printing the export
    type since 2.6.18 (commit bd5cbcedf44), which is over a decade ago now.

    Fix up read_dump() to treat each field as non-optional. I suspect the
    original read_dump() code treated the export field as optional in order
    to support pre
    Reviewed-by: Matthias Maennich
    Reviewed-by: Lucas De Marchi
    Signed-off-by: Jessica Yu
    Signed-off-by: Masahiro Yamada

    Jessica Yu
     

10 Sep, 2019

1 commit

  • Add support for symbols that are exported into namespaces. For that,
    extract any namespace suffix from the symbol name. In addition, emit a
    warning whenever a module refers to an exported symbol without
    explicitly importing the namespace that it is defined in. This patch
    consistently adds the namespace suffix to symbol names exported into
    Module.symvers.

    Example warning emitted by modpost in case of the above violation:

    WARNING: module ums-usbat uses symbol usb_stor_resume from namespace
    USB_STORAGE, but does not import it.

    Co-developed-by: Martijn Coenen
    Signed-off-by: Martijn Coenen
    Reviewed-by: Joel Fernandes (Google)
    Reviewed-by: Greg Kroah-Hartman
    Signed-off-by: Matthias Maennich
    Signed-off-by: Jessica Yu

    Matthias Maennich
     

18 Jul, 2019

1 commit


31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    released under gpl v2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 15 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Steve Winslow
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190528171438.895196075@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

14 May, 2017

1 commit

  • The default NetBSD package manager is pkgsrc and it installs Perl
    along other third party programs under custom and configurable prefix.
    The default prefix for binary prebuilt packages is /usr/pkg, and the
    Perl executable lands in /usr/pkg/bin/perl.

    This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
    the most portable solution that should work for almost everybody.
    Perl's executable is detected automatically.

    This change switches -w option passed to the executable with more
    modern "use warnings;" approach. There is no functional change to the
    default behavior.

    While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).

    Signed-off-by: Kamil Rytarowski
    Signed-off-by: Masahiro Yamada

    Kamil Rytarowski
     

20 Aug, 2014

1 commit


24 May, 2011

3 commits

  • Also count CONFIG_MODVERSIONS warnings, and print a NOTE at start of
    SECTION 2 if any were issued. Section 2 will be empty if the build is
    lacking this CONFIG_ item, and user may have missed the warnings, as
    they're off screen.

    Signed-off-by: Jim Cromie
    Signed-off-by: Michal Marek

    Jim Cromie
     
  • Sort SECTION 2 modules by name. Within those module listings, sort
    the symbol providers by name, and remove the count, as it is
    misleading; its the kernel-wide count of uses of that symbol, not the
    count pertaining to the module being outlined. (this can be seen by
    grepping the output for a single symbol). The count is still used to
    sort the symbols.

    Signed-off-by: Jim Cromie
    Signed-off-by: Michal Marek

    Jim Cromie
     
  • Avoid spawning a shell pipeline doing cat, grep, sed, and do it all
    inside perl. The globbing construct works at least as far back
    as 5.8.9

    Note that this is not just an optimization; the sed command
    in the pipeline was unterminated, due to lack of escape on the
    end-of-line (\$) in the regex, resulting in this:

    $ perl ../linux-2.6/scripts/export_report.pl > /dev/null
    sed: -e expression #1, char 5: unterminated `s' command
    sh: .mod.c/: not found

    Comments on an earlier patch sought an all-perl implementation.

    Signed-off-by: Jim Cromie
    cc: Michal Marek ,
    cc: linux-kbuild@vger.kernel.org
    cc: Arnaud Lacombe lacombar@gmail.com
    cc: Stephen Hemminger shemminger@vyatta.com
    Signed-off-by: Michal Marek

    Jim Cromie
     

08 Mar, 2010

1 commit


13 Oct, 2007

2 commits


25 Jun, 2006

1 commit

  • The following patch provides the ability to generate a report of
    (1) All the exported symbols and their in-kernel-module usage count
    (2) For each module, lists the modules and their exported symbols, on
    which it depends.

    the report can be generated by executing:
    perl scripts/export_report

    The tool warns if the modules are not build using MODVERSIONING.

    Signed-off-by: Ram Pai
    Signed-off-by: Sam Ravnborg

    Ram Pai