Skip to content
  1. Oct 11, 2011
    • Michal Marek's avatar
      genksyms: Do not expand internal types · 2c5925d6
      Michal Marek authored
      Consider structures, unions and enums defined in the source file as
      internal and do not expand them. This way, changes to e.g. struct
      serial_private in drivers/tty/serial/8250_pci.c will not affect the
      checksum of the pciserial_* exports.
      2c5925d6
  2. Mar 17, 2011
    • Michal Marek's avatar
      genksyms: Track changes to enum constants · e37ddb82
      Michal Marek authored
      
      
      Enum constants can be used as array sizes; if the enum itself does not
      appear in the symbol expansion, a change in the enum constant will go
      unnoticed. Example patch that changes the ABI but does not change the
      checksum with current genksyms:
      
      | enum e {
      |	E1,
      |	E2,
      |+	E3,
      |	E_MAX
      | };
      |
      | struct s {
      |	int a[E_MAX];
      | }
      |
      | int f(struct s *s) { ... }
      | EXPORT_SYMBOL(f)
      
      Therefore, remember the value of each enum constant and
      expand each occurence to <constant> <value>. The value is not actually
      computed, but instead an expression in the form
      (last explicitly assigned value) + N
      is used. This avoids having to parse and semantically understand whole
      of C.
      
      Note: The changes won't take effect until the lexer and parser are
      rebuilt by the next patch.
      
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      e37ddb82
    • Michal Marek's avatar
      genksyms: simplify usage of find_symbol() · 01762c4e
      Michal Marek authored
      
      
      Allow searching for symbols of an exact type. The lexer does this and a
      subsequent patch will add one more usage.
      
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      01762c4e
  3. Dec 03, 2008
    • Andreas Gruenbacher's avatar
      genksyms: allow to ignore symbol checksum changes · 5dae9a55
      Andreas Gruenbacher authored
      
      
      This adds an "override" keyword for use in *.symvers / *.symref files.
      When a symbol is overridden, the symbol's old definition will be used for
      computing checksums instead of the new one, preserving the previous
      checksum.  (Genksyms will still warn about the change.)
      
      This is meant to allow distributions to hide minor actual as well as fake
      ABI changes.  (For example, when extra type information becomes available
      because additional headers are included, this may change checksums even
      though none of the types used have actully changed.)
      
      This approach also allows to get rid of "#ifdef __GENKSYMS__" hacks in the
      code, which are currently used in some vendor kernels to work around
      checksum changes.
      
      Signed-off-by: default avatarAndreas Gruenbacher <agruen@suse.de>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      5dae9a55
    • Andreas Gruenbacher's avatar
      genksyms: track symbol checksum changes · 64e6c1e1
      Andreas Gruenbacher authored
      
      
      Sometimes it is preferable to avoid changes of exported symbol checksums
      (to avoid breaking externally provided modules).  When a checksum change
      occurs, it can be hard to figure out what caused this change: underlying
      types may have changed, or additional type information may simply have
      become available at the point where a symbol is exported.
      
      Add a new --reference option to genksyms which allows it to report why
      checksums change, based on the type information dumps it creates with the
      --dump-types flag.  Genksyms will read in such a dump from a previous run,
      and report which symbols have changed (and why).
      
      The behavior can be controlled for an entire build as follows: If
      KBUILD_SYMTYPES is set, genksyms uses --dump-types to produce *.symtypes
      dump files.  If any *.symref files exist, those will be used as the
      reference to check against.  If KBUILD_PRESERVE is set, checksum changes
      will fail the build.
      
      Signed-off-by: default avatarAndreas Gruenbacher <agruen@suse.de>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      64e6c1e1
  4. Jun 24, 2006
    • Andreas Gruenbacher's avatar
      kbuild: support for %.symtypes files · 15fde675
      Andreas Gruenbacher authored
      
      
      Here is a patch that adds a new -T option to genksyms for generating dumps of
      the type definition that makes up the symbol version hashes. This allows to
      trace modversion changes back to what caused them. The dump format is the
      name of the type defined, followed by its definition (which is almost C):
      
        s#list_head struct list_head { s#list_head * next , * prev ; }
      
      The s#, u#, e#, and t# prefixes stand for struct, union, enum, and typedef.
      The exported symbols do not define types, and thus do not have an x# prefix:
      
        nfs4_acl_get_whotype int nfs4_acl_get_whotype ( char * , t#u32 )
      
      The symbol type defintion of a single file can be generated with:
      
        make fs/jbd/journal.symtypes
      
      If KBUILD_SYMTYPES is defined, all the *.symtypes of all object files that
      export symbols are generated.
      
      The single *.symtypes files can be combined into a single file after a kernel
      build with a script like the following:
      
      for f in $(find -name '*.symtypes' | sort); do
          f=${f#./}
          echo "/* ${f%.symtypes}.o */"
          cat $f
          echo
      done \
      | sed -e '\:UNKNOWN:d' \
            -e 's:[,;] }:}:g' \
            -e 's:\([[({]\) :\1:g' \
            -e 's: \([])},;]\):\1:g' \
            -e 's: $::' \
            $f \
      | awk '
      /^.#/   { if (defined[$1] == $0) {
                  print $1
                  next
                }
                defined[$1] = $0
              }
              { print }
      '
      
      When the kernel ABI changes, diffing individual *.symtype files, or the
      combined files, against each other will show which symbol changes caused the
      ABI changes. This can save a tremendous amount of time.
      
      Dump the types that make up modversions
      
      Signed-off-by: default avatarAndreas Gruenbacher <agruen@suse.de>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      15fde675
  5. Mar 12, 2006
  6. Apr 16, 2005
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
Loading