17 Sep, 2006

2 commits

  • We generate an which includes either or
    as appropriate. But we were doing this dependent on
    whether the file in question existed in the _unexported_ tree, not the
    exported tree. So if a file was exported to userspace in one asm- directory
    but not the other, the generated file in asm/ was incorrect.

    This only changed the failure mode if it _was_ included from a nice #error to
    a less explicable #include failure -- but it also gave false errors in 'make
    headers_check' output. Fix it by looking in the right place instead.

    Signed-off-by: David Woodhouse
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • Signed-off-by: Ross Biro
    Acked-by: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ross Biro
     

13 Sep, 2006

2 commits


16 Aug, 2006

1 commit

  • There is a small but annoying bug in scripts/mod/file2alias.c which causes
    it to generate invalid aliases for input devices on 64 bit archs. This causes
    joydev.ko to not be automaticly loaded when inserting a joystick, resulting in
    a non working joystick (for the average user).

    In scripts/mod/file2alias.c is the following code for generating the input
    aliases:
    static void do_input(char *alias,
    kernel_ulong_t *arr, unsigned int min, unsigned int max)
    {
    unsigned int i;

    for (i = min; i < max; i++)
    if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
    sprintf(alias + strlen(alias), "%X,*", i);
    }

    On 32 bits systems, this correctly generates "0,*" for the first alias, "8,*"
    for the second etc.

    However on 64 bits it generates: "0,*20,*" resp "8,*28,*" Notice how it adds 20
    + first entry (hex) ! to the list of hex codes, which is 32 more then the first
    entry, thus is because the bit test above wraps at 32 bits instead of 64.

    scripts/mod/file2alias.c, line 379 reads:
    if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
    That should be:
    if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG)))

    Notice the added 'L' after the 1, otherwise that is an 32 bit int instead of a
    64 bit long, and when that int gets shifted >= 32 times, appearantly the number
    by which to shift is wrapped at 5 bits ( % 32) causing it to test a bit 32 bits
    too low.

    The patch below makes the nescesarry 1 char change :)

    Signed-off-by: Hans de Goede
    Acked-by: Rusty Russell
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

01 Aug, 2006

6 commits

  • The possibility to specify an optional parameter did not work out as
    expected and it was not used - so remove the possibility.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • oldconfig currently ignores unset choice options and doesn't ask for them.
    Correct the SYMBOL_DEF_USER flag of the choice symbol to be only set if
    it's set for all values.

    Signed-off-by: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Roman Zippel
     
  • Reported by a Fedora user when they tried to build some out of tree module..

    Signed-off-by: Dave Jones
    Signed-off-by: Sam Ravnborg

    Dave Jones
     
  • The original errormessage was just plain unreadable.

    Sample error message after this update (not for real - I provoked it):

    FATAL: drivers/net/s2io: sizeof(struct pci_device_id)=33 is not a modulo of the
    size of section __mod_pci_device_table=160.
    Fix definition of struct pci_device_id in mod_devicetable.h

    Before a warning was generated - this is now a fatal error.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • The latest toolchains can produce a new ELF section in DSOs and
    dynamically-linked executables. The new section ".gnu.hash" replaces
    ".hash", and allows for more efficient runtime symbol lookups by the
    dynamic linker. The new ld option --hash-style={sysv|gnu|both} controls
    whether to produce the old ".hash", the new ".gnu.hash", or both. In some
    new systems such as Fedora Core 6, gcc by default passes --hash-style=gnu
    to the linker, so that a standard invocation of "gcc -shared" results in
    producing a DSO with only ".gnu.hash". The new ".gnu.hash" sections need
    to be dealt with the same way as ".hash" sections in all respects; only the
    dynamic linker cares about their contents. To work with older dynamic
    linkers (i.e. preexisting releases of glibc), a binary must have the old
    ".hash" section. The --hash-style=both option produces binaries that a new
    dynamic linker can use more efficiently, but an old dynamic linker can
    still handle.

    The new section runs afoul of the custom linker scripts used to build vDSO
    images for the kernel. On ia64, the failure mode for this is a boot-time
    panic because the vDSO's PT_IA_64_UNWIND segment winds up ill-formed.

    This patch addresses the problem in two ways.

    First, it mentions ".gnu.hash" in all the linker scripts alongside ".hash".
    This produces correct vDSO images with --hash-style=sysv (or old tools),
    with --hash-style=gnu, or with --hash-style=both.

    Second, it passes the --hash-style=sysv option when building the vDSO
    images, so that ".gnu.hash" is not actually produced. This is the most
    conservative choice for compatibility with any old userland. There is some
    concern that some ancient glibc builds (though not any known old production
    system) might choke on --hash-style=both binaries. The optimizations
    provided by the new style of hash section do not really matter for a DSO
    with a tiny number of symbols, as the vDSO has. If someone wants to use
    =gnu or =both for their vDSO builds and worry less about that
    compatibility, just change the option and the linker script changes will
    make any choice work fine.

    Signed-off-by: Roland McGrath
    Cc: "Luck, Tony"
    Cc: Kyle McMartin
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Jeff Dike
    Cc: Andi Kleen
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • Ignore __devinit in function definitions so that kernel-doc won't fail on
    them.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

05 Jul, 2006

1 commit

  • * git://git.infradead.org/hdrinstall-2.6:
    Remove export of include/linux/isdn/tpam.h
    Remove and from userspace export
    Restrict headers exported to userspace for SPARC and SPARC64
    Add empty Kbuild files for 'make headers_install' in remaining arches.
    Add Kbuild file for Alpha 'make headers_install'
    Add Kbuild file for SPARC 'make headers_install'
    Add Kbuild file for IA64 'make headers_install'
    Add Kbuild file for S390 'make headers_install'
    Add Kbuild file for i386 'make headers_install'
    Add Kbuild file for x86_64 'make headers_install'
    Add Kbuild file for PowerPC 'make headers_install'
    Add generic Kbuild files for 'make headers_install'
    Basic implementation of 'make headers_check'
    Basic implementation of 'make headers_install'

    Linus Torvalds
     

04 Jul, 2006

1 commit

  • include/linux/version.h contained both actual KERNEL version
    and UTS_RELEASE that contains a subset from git SHA1 for when
    kernel was compiled as part of a git repository.
    This had the unfortunate side-effect that all files including version.h
    would be recompiled when some git changes was made due to changes SHA1.
    Split it out so we keep independent parts in separate files.

    Also update checkversion.pl script to no longer check for UTS_RELEASE.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

02 Jul, 2006

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
    kbuild: documentation change on allowing checkers besides sparse
    kbuild: warn when a moduled uses a symbol marked UNUSED
    kbuild: fix segv in modpost
    kconfig: enhancing accessibility of lxdialog
    kbuild: fix ia64 breakage after introducing make -rR

    Linus Torvalds
     
  • Make output of function descriptions in text mode match contents of 'man'
    mode by adding Name: plus function-short-description ("purpose") and
    changing Function: to Synopsis:.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Add a space between data type and struct field name in man-mode
    bitfield struct output so that they don't run together.

    For text-mode struct output, print the struct 'purpose' or
    short description (as done in man-mode output).

    For text-mode enum output, print the enum 'purpose' or
    short description (as done in man-mode output).

    For text-mode typedef output, print the typedef 'purpose' or
    short description (as done in man-mode output).

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy.Dunlap
     

01 Jul, 2006

4 commits

  • We now have infrastructure in place to mark an EXPORTed symbol
    as unused. So the natural next step is to warn during buildtime when
    a module uses a symbol marked UNUSED.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Parsing an old Modules.symvers file casued modpost to SEGV.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Some fix that I forgot for good accessibility of lxdialog (the cursor
    should always be left at the focus location):

    Have the checklist display the currently highlighted entry last, for having
    the cursor left on it (rather than on the last line of the list).

    Signed-off-by: Samuel Thibault
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Samuel Thibault
     
  • kbuild used $¤(*F to get filename of target without extension.
    This was used in several places all over kbuild, but introducing
    make -rR broke his for all cases where we specified full path to
    target/prerequsite. It is assumed that make -rR disables old style
    suffix-rules which is why is suddenly failed.

    ia64 was impacted by this change because several div* routines in
    arch/ia64/lib are build using explicit paths and then kbuild failed.

    Thanks to David Mosberger-Tang for an explanation
    what was the root-cause and for testing on ia64.

    This patch also fixes two uses of $(*F) in arch/um

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

28 Jun, 2006

2 commits

  • Make test suite setscheduler calls asynchronously. Remove the waits in the
    test cases and add a new testcase to verify the correctness of the
    setscheduler priority propagation.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • RT-mutex tester: scriptable tester for rt mutexes, which allows userspace
    scripting of mutex unit-tests (and dynamic tests as well), using the actual
    rt-mutex implementation of the kernel.

    [akpm@osdl.org: fixlet]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

27 Jun, 2006

2 commits

  • This reverts commit e5c44fd88c146755da6941d047de4d97651404a9.

    Thanks to Daniel Ritz and Michal Piotrowski for noticing the problem.

    Daniel says:

    "[The] reason is a recent change that made modules always shows as
    module.mod. it breaks modprobe and probably many scripts..besides
    lsmod looking horrible

    stuff like this in modprobe.conf:
    install pcmcia_core /sbin/modprobe --ignore-install pcmcia_core; /sbin/modprobe pcmcia
    makes modprobe fork/exec endlessly calling itself...until oom
    interrupts it"

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
    kbuild: trivial fixes in Makefile
    kbuild: adding symbols in Kconfig and defconfig to TAGS
    kbuild: replace abort() with exit(1)
    kbuild: support for %.symtypes files
    kbuild: fix silentoldconfig recursion
    kbuild: add option for stripping modules while installing them
    kbuild: kill some false positives from modpost
    kbuild: export-symbol usage report generator
    kbuild: fix make -rR breakage
    kbuild: append -dirty for updated but uncommited changes
    kbuild: append git revision for all untagged commits
    kbuild: fix module.symvers parsing in modpost
    kbuild: ignore make's built-in rules & variables
    kbuild: bugfix with initramfs
    kbuild: modpost build fix
    kbuild: check license compatibility when building modules
    kbuild: export-type enhancement to modpost.c
    kbuild: add dependency on kernel.release to the package targets
    kbuild: `make kernelrelease' speedup
    kconfig: KCONFIG_OVERWRITECONFIG
    ...

    Linus Torvalds
     

26 Jun, 2006

7 commits

  • kernel-doc struct fields should be consistently called "Members", not
    "Arguments", so switch man-mode output to use "Members" like all of the
    other formats do.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • For kernel-doc output modes of text and man, do not use XML escapes for
    less-than, greater-than, and ampersand characters. I.e., leave the text
    and man output clean and readable.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • When the verbose (-v) option is used with scripts/kernel-doc, this option
    reports when the kernel-doc format is malformed and apparently contains
    function description lines before function parameters. In these cases, the
    kernel-doc script will print something like: Warning(filemap.c:335):
    contents before sections

    I have fixed the problems in mm/filemap.c and added lots of kernel-doc to
    that file (posted to the linux-mm mailing list Mon. 2006-June-12).

    The real goal (as requested by Andrew Morton) is to allow the short
    function description to be more than one line long. This patch is both a
    kernel-doc checker and a tool en route to that goal.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Finding "init_module" high stack usage problems is challenging when there
    are over 1600 "init_module" functions in the kernel tree, so make
    checkstack.pl print out the filename where the stack usage occurs. This is
    useful for code built as loadable modules.

    For built-in code, it just prints the kernel image file name, like
    "vmlinux". Examples:

    (before patch:)
    0x0000000d callback: 1928
    0xffffffff81678c09 huft_build: 1560
    0x0018 init_module: 1512

    (after patch:)
    0x0000000d callback [divacapi]: 1928
    0xffffffff81678c09 huft_build [vmlinux]: 1560
    0x0018 init_module [hdaps]: 1512

    Also change one if-series to use elsif to cut down on unneeded tests.

    Signed-off-by: Randy Dunlap
    Acked-by: Joern Engel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Fix indentation.
    Quote a brace '{' so that vi won't be fooled by it.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Drop leading space of kernel-doc section contents.

    "Section" data (contents) are split from the section header
    (e.g., Note: below is a section header:
    * Note: list_empty on entry does not return true after this, the entry is
    * in an undefined state.
    ).

    Currently the data/contents begins with a space and is left that way, which
    causes it to look bad when printed (in text mode; see example below), so
    just remove the leading space.

    Note:

    list_empty on entry does not return true after this, the entry is in an
    undefined state.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Upgrade scripts/bloat-o-meter to handle the names gcc 4 gives static
    symbols.

    Signed-off-by: Rob Landley
    Signed-off-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rob Landley
     

25 Jun, 2006

6 commits

  • We have had no use of the coredump file for a long time.
    So just exit(1) and avoid coredumping.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • 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
     
  • Add option for stripping modules while installing them.

    This function adds support for stripping modules while they are being
    installed. CONFIG_DEBUG_KERNEL (which will probably become more
    popular as developers use kdump) causes the size of the installed
    modules to grow by a factor of 9 or so.

    Some kernel package systems solve this problem by stripping the debug
    information from /lib/modules after running "make modules_install",
    but that may not work for people who are installing directly into
    /lib/modules --- root partitions that were sized to handle 16 megs
    worth of modules may not be quite so happy with 145 megs of modules,
    so the "make modules_install" never succeeds.

    This patch allows such users to request modules_install to strip the
    modules as they are installed.

    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Sam Ravnborg

    Theodore Ts'o
     
  • Signed-off-by: Al Viro
    Signed-off-by: Sam Ravnborg

    Al Viro
     
  • 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
     
  • make failed to supply the filename when using make -rR and using $(*F)
    to get target filename without extension.
    This bug was not reproduceable in small scale but using:
    $(basename $(notdir $@)) fixes it with same functionality.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

18 Jun, 2006

2 commits

  • Based on the 'headers_install' target, this performs a basic sanity check
    on the exported headers -- so far only checking that they do not include
    any other headers which aren't selected for import, but easily extendable.

    Signed-off-by: David Woodhouse

    David Woodhouse
     
  • This adds a make target which exports a subset of headers which contain
    definitions which are useful for system libraries and tools. It uses the
    BSD 'unifdef' tool to remove instances of #ifdef __KERNEL__, and uses
    sed to remove markers like __user.

    Based on an original implementation by Arnd Bergmann
    Hacked about by David Woodhouse
    Reviewed and cleaned up by Sam Ravnborg

    Signed-off-by: David Woodhouse

    David Woodhouse
     

17 Jun, 2006

1 commit