31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

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

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

06 Jun, 2017

1 commit

  • When compiling with -Wsuggest-attribute=format in HOSTCFLAGS, gcc
    complains that error_with_pos() may be declared with a printf format
    attribute:

    scripts/genksyms/genksyms.c:726:3: warning: function might be
    possible candidate for ‘gnu_printf’ format attribute
    [-Wsuggest-attribute=format]
    vfprintf(stderr, fmt, args);
    ^~~~~~~~

    This would allow catching printf-format errors at compile time in
    callers to error_with_pos(). Add this attribute.

    Signed-off-by: Nicolas Iooss
    Signed-off-by: Masahiro Yamada

    Nicolas Iooss
     

11 Oct, 2011

1 commit

  • 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.

    Michal Marek
     

17 Mar, 2011

2 commits

  • 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 . 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: Michal Marek
    Acked-by: Sam Ravnborg

    Michal Marek
     
  • Allow searching for symbols of an exact type. The lexer does this and a
    subsequent patch will add one more usage.

    Signed-off-by: Michal Marek
    Acked-by: Sam Ravnborg

    Michal Marek
     

04 Dec, 2008

2 commits

  • 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: Andreas Gruenbacher
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Andreas Gruenbacher
     
  • 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: Andreas Gruenbacher
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Andreas Gruenbacher
     

25 Jun, 2006

1 commit

  • 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: Andreas Gruenbacher
    Signed-off-by: Sam Ravnborg

    Andreas Gruenbacher
     

13 Mar, 2006

1 commit

  • o remove all inlines
    o declare everything static which is only used by genksyms.c
    o delete unused functions
    o delete unused variables
    o delete unused stuff in genksyms.h
    o properly ident genksyms.h

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg