Skip to content
Snippets Groups Projects
  1. Mar 17, 2020
    • Jessica Yu's avatar
      modpost: move the namespace field in Module.symvers last · 5190044c
      Jessica Yu authored
      
      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 bd5cbced), 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 <= 2.6.18 Module.symvers (which did not have the export
      type field). Note that although symbol namespaces are optional, the
      field will not be omitted from Module.symvers if a symbol does not have
      a namespace. In this case, the field will simply be empty and the next
      delimiter or end of line will follow.
      
      Cc: stable@vger.kernel.org
      Fixes: cb9b55d2 ("modpost: add support for symbol namespaces")
      Tested-by: default avatarMatthias Maennich <maennich@google.com>
      Reviewed-by: default avatarMatthias Maennich <maennich@google.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      5190044c
  2. Sep 10, 2019
  3. Jul 17, 2019
  4. May 30, 2019
  5. May 14, 2017
    • Kamil Rytarowski's avatar
      scripts: Switch to more portable Perl shebang · cb77f0d6
      Kamil Rytarowski authored
      
      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: default avatarKamil Rytarowski <n54@gmx.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      cb77f0d6
  6. Aug 20, 2014
  7. May 24, 2011
    • Jim Cromie's avatar
      export_report: use warn() to issue WARNING, so they go to stderr · ca995cbf
      Jim Cromie authored
      
      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: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      ca995cbf
    • Jim Cromie's avatar
      export_report: sort SECTION 2 output · bdabc7a3
      Jim Cromie authored
      
      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: default avatarJim Cromie <jim.cromie@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      bdabc7a3
    • Jim Cromie's avatar
      export_report: do collectcfiles work in perl itself · de7b0b41
      Jim Cromie authored
      
      Avoid spawning a shell pipeline doing cat, grep, sed, and do it all
      inside perl.  The <*.c> 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: default avatarJim Cromie <jim.cromie@gmail.com>
      cc: Michal Marek <mmarek@suse.cz>,
      cc: linux-kbuild@vger.kernel.org
      cc: Arnaud Lacombe lacombar@gmail.com
      cc: Stephen Hemminger shemminger@vyatta.com
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      de7b0b41
  8. Mar 07, 2010
  9. Oct 12, 2007
  10. Jun 24, 2006
    • Ram Pai's avatar
      kbuild: export-symbol usage report generator · c5e30033
      Ram Pai authored
      
      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: default avatarRam Pai <linuxram@us.ibm.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      c5e30033
Loading