07 Oct, 2008

1 commit

  • * Theodore Ts'o (tytso@mit.edu) wrote:
    >
    > I've been playing with adding some markers into ext4 to see if they
    > could be useful in solving some problems along with Systemtap. It
    > appears, though, that as of 2.6.27-rc8, markers defined in code which is
    > compiled directly into the kernel (i.e., not as modules) don't show up
    > in Module.markers:
    >
    > kvm_trace_entryexit arch/x86/kvm/kvm-intel %u %p %u %u %u %u %u %u
    > kvm_trace_handler arch/x86/kvm/kvm-intel %u %p %u %u %u %u %u %u
    > kvm_trace_entryexit arch/x86/kvm/kvm-amd %u %p %u %u %u %u %u %u
    > kvm_trace_handler arch/x86/kvm/kvm-amd %u %p %u %u %u %u %u %u
    >
    > (Note the lack of any of the kernel_sched_* markers, and the markers I
    > added for ext4_* and jbd2_* are missing as wel.)
    >
    > Systemtap apparently depends on in-kernel trace_mark being recorded in
    > Module.markers, and apparently it's been claimed that it used to be
    > there. Is this a bug in systemtap, or in how Module.markers is getting
    > built? And is there a file that contains the equivalent information
    > for markers located in non-modules code?

    I think the problem comes from "markers: fix duplicate modpost entry"
    (commit d35cb360c29956510b2fe1a953bd4968536f7216)

    Especially :

    - add_marker(mod, marker, fmt);
    + if (!mod->skip)
    + add_marker(mod, marker, fmt);
    }
    return;
    fail:

    Here is a fix that should take care if this problem.

    Thanks for the bug report!

    Signed-off-by: Mathieu Desnoyers
    Tested-by: "Theodore Ts'o"
    CC: Greg KH
    CC: David Smith
    CC: Roland McGrath
    CC: Sam Ravnborg
    CC: Wenji Huang
    CC: Takashi Nishiie
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     

29 Sep, 2008

2 commits

  • Commit f072181e6403b0fe2e2aa800a005497b748fd284 ("kconfig: drop the
    ""trying to assign nonexistent symbol" warning") simply dropped the
    warnings, but it does a little more than that, it also marks the current
    .config as needed saving, so add this back.

    Signed-off-by: Roman Zippel
    Signed-off-by: Linus Torvalds

    zippel@linux-m68k.org
     
  • Recent changes to oldconfig have mixed up the silentoldconfig handling,
    so this fixes that by clearly separating that special mode, e.g.
    KCONFIG_NOSILENTUPDATE is only relevant here, the .config is written as
    needed.

    This will also properly close Bug 11230.

    Signed-off-by: Roman Zippel
    Signed-off-by: Linus Torvalds

    zippel@linux-m68k.org
     

23 Sep, 2008

1 commit

  • Struct members may be marked as private by using
    /* private: */
    before them, as noted in Documentation/kernel-doc-nano-HOWTO.txt

    Fix kernel-doc to handle structs whose members are all private;
    otherwise invalid XML is generated:

    xmlto: input does not validate (status 3)
    linux-2.6.27-rc6-git4/Documentation/DocBook/debugobjects.xml:146: element variablelist: validity error : Element variablelist content does not follow the DTD, expecting ((title , titleabbrev?)? , varlistentry+), got ()
    Document linux-2.6.27-rc6-git4/Documentation/DocBook/debugobjects.xml does not validate
    make[1]: *** [Documentation/DocBook/debugobjects.html] Error 3

    Signed-off-by: Randy Dunlap
    Reported-by: Roland McGrath
    Cc: Roland McGrath
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

22 Aug, 2008

1 commit


07 Aug, 2008

1 commit


06 Aug, 2008

1 commit

  • Fix handling of nested structs or unions. The regex to strip (eliminate)
    nested structs or unions was limited to only 0 or 1 matches. This can
    cause an uneven number of left/right braces to be stripped, which causes
    this:

    Warning(linux-2.6.27-rc1-git2//include/net/mac80211.h:336): No description found for parameter '}'

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

    Randy Dunlap
     

05 Aug, 2008

3 commits


02 Aug, 2008

1 commit


01 Aug, 2008

3 commits

  • It would have saved both a bug submitter and me a few hours if
    scripts/ver_linux had picked the same gcc as the build.

    Since I can't see any reason why it fiddles with PATH at all this patch
    therefore removes the PATH setting.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Sam Ravnborg

    Adrian Bunk
     
  • The extern flag currently is not included in type dump files
    (genksyms --dump-types). Include that flag there for completeness.

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Sam Ravnborg

    Andreas Gruenbacher
     
  • We are having two kinds of problems with genksyms today: fake checksum
    changes without actual ABI changes, and changes which we would rather like
    to ignore (such as an additional field at the end of a structure that
    modules are not supposed to touch, for example).

    I have thought about ways to improve genksyms and compute checksums
    differently to avoid those problems, but in the end I don't see a
    fundamentally better way. So here are some genksyms patches for at least
    making the checksums more easily manageable, if we cannot fully fix them.

    In addition to the bugfixes (the first two patches), this allows genksyms
    to track checksum changes and report why a checksum changed (third patch),
    and to selectively ignore changes (fourth patch).

    This patch:

    Gcc __attribute__ definitions may occur repeatedly, e.g.,

    static int foo __attribute__((__used__))
    __attribute__((aligned (16)));

    The genksyms parser does not understand this, and generates a syntax error.
    Fix this case.

    Signed-off-by: Andreas Gruenbacher
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Andreas Gruenbacher
     

31 Jul, 2008

3 commits

  • gcc 4.3 correctly determines that input() is unused and gives the
    following warning:

    ...
    HOSTCC scripts/genksyms/lex.o
    scripts/genksyms/lex.c:1487: warning: ‘input’ defined but not used
    ...

    Fix it by adding %option noinput to scripts/genksyms/lex.l and
    regeneration of scripts/genksyms/lex.c_shipped.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Sam Ravnborg

    Adrian Bunk
     
  • gcc 4.3 correctly determines that input() is unused and gives the
    following warning:

    ...
    HOSTCC scripts/kconfig/zconf.tab.o
    scripts/kconfig/lex.zconf.c:1628: warning: ‘input’ defined but not used
    ...

    Fix it by adding %option noinput to scripts/kconfig/zconf.l and
    regeneration of scripts/kconfig/lex.zconf.c_shipped.

    Signed-off-by: Adrian Bunk
    Cc: Roman Zippel
    Signed-off-by: Sam Ravnborg

    Adrian Bunk
     
  • Spelling fixes in scripts/mod/modpost.c

    Signed-off-by: Ben Dooks
    Cc: Rusty Russell
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     

28 Jul, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (25 commits)
    setlocalversion: do not describe if there is nothing to describe
    kconfig: fix typos: "Suport" -> "Support"
    kconfig: make defconfig is no longer chatty
    kconfig: make oldconfig is now less chatty
    kconfig: speed up all*config + randconfig
    kconfig: set all new symbols automatically
    kconfig: add diffconfig utility
    kbuild: remove Module.markers during mrproper
    kbuild: sparse needs CF not CHECKFLAGS
    kernel-doc: handle/strip __init
    vmlinux.lds: move __attribute__((__cold__)) functions back into final .text section
    init: fix URL of "The GNU Accounting Utilities"
    kbuild: add arch/$ARCH/include to search path
    kbuild: asm symlink support for arch/$ARCH/include
    kbuild: support arch/$ARCH/include for tags, cscope
    kbuild: prepare headers_* for arch/$ARCH/include
    kbuild: install all headers when arch is changed
    kbuild: make clean removes *.o.* as well
    kbuild: optimize headers_* targets
    kbuild: only one call for include/ in make headers_*
    ...

    Linus Torvalds
     

26 Jul, 2008

18 commits

  • Jan Engelhardt wrote:
    > Just a note that when you run git-describe, you should probably quiten it.
    >
    > fatal: cannot describe 'bd7364a0fd5a4a2878fe4a224be1b142a4e6698e'
    >
    > This happens when tags are not present, which can happen if Linus's tree
    > is sent upwards again, IOW:
    >
    > machine1$ git-clone torvalds/linux-2.6.git
    > machine1$ git push elsewhere master
    >
    > machine2$ git-clone elsewhere:/linux
    > machine2$ git-describe HEAD
    > fatal: cannot describe that

    Signed-off-by: Sebastian Siewior
    Acked-by: Jan Engelhardt
    Signed-off-by: Sam Ravnborg

    Sebastian Siewior
     
  • make defconfig generated a lot of output
    then noone actually read.
    Use conf_set_all_new_symbols() to generate the default
    configuration and avoid the chatty output.

    A typical run now looks like this:
    $ make defconfig
    *** Default configuration is based on 'i386_defconfig'
    arch/x86/configs/i386_defconfig:13:warning: trying to assign nonexistent symbol SEMAPHORE_SLEEPERS
    arch/x86/configs/i386_defconfig:176:warning: trying to assign nonexistent symbol PREEMPT_BKL
    ...
    arch/x86/configs/i386_defconfig:1386:warning: trying to assign nonexistent symbol INSTRUMENTATION
    $

    As an added benefit we now clearly see the warnings generated
    in the start of the process.

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

    Sam Ravnborg
     
  • Previously when running "make oldconfig" we saw all the propmt lines
    from kconfig and noone actully read this.

    With this patch the user will only see output if there is new symbols.
    This will be seen as "make oldconfig" runs which does not generate any output.

    A typical run now looks like this:

    $ make oldconfig
    scripts/kconfig/conf -o arch/x86/Kconfig
    $

    If a new symbol is found then we restart the config process like this:
    $ make oldconfig
    scripts/kconfig/conf -o arch/x86/Kconfig
    *
    * Restart config...
    *
    *
    * General setup
    *
    Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] y
    Local version - append to kernel release (LOCALVERSION) []
    ...

    The bahaviour is similar to what we know when running the implicit
    oldconfig target "make silentoldconfig".
    "make silentoldconfig" are run as part of the kernel build process
    if the configuration has changed.

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

    Sam Ravnborg
     
  • Drop the chatty mode when we generate the all*config, randconfig
    configurations.
    Ths speeds up the process considerably and noone looked
    at the output anyway.
    This patch uses the conf_set_all_new_symbols() function
    just added to kconfig.

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

    Sam Ravnborg
     
  • Add conf_set_all_new_symbols() which set all symbols (which don't have a
    value yet) to a specifed value.

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

    Roman Zippel
     
  • Diffconfig is a simple utility for comparing two kernel configuration files.
    See usage in the script for more info.

    Signed-off-by: Tim Bird
    Signed-off-by: Sam Ravnborg

    Tim Bird
     
  • Handle __init in functions with kernel-doc notation by stripping the
    __init away from the output doc. This is already being done for
    "__devinit". This patch fixes these kernel-doc error/aborts:

    Error(linux-next-20080619//drivers/usb/gadget/config.c:132): cannot understand prototype: 'struct usb_descriptor_header **__init usb_copy_descriptors(struct usb_descriptor_header **src) '
    Error(linux-next-20080619//drivers/usb/gadget/config.c:182): cannot understand prototype: 'struct usb_endpoint_descriptor *__init usb_find_endpoint( struct usb_descriptor_header **src, struct usb_descriptor_header **copy, struct usb_endpoint_descriptor *match ) '

    Signed-off-by: Randy Dunlap
    Cc: David Brownell
    Signed-off-by: Sam Ravnborg

    Randy Dunlap
     
  • Factor out the headers_*_all support to a seperate
    shell script and add support for arch specific
    header files can be located in either

    arch/$ARCH/include/asm
    or
    include/asm-$ARCH/

    In "make help" always display the headers_* targets.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • We see some header files that are selected dependent on
    the actual architecture so force a reinstallation
    of all header files when the arch changes.
    This slows down "make headers_check_all" but then
    we better reflect reality.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Move the core functionality of headers_install
    and headers_check to two small perl scripts.
    The makefile is adapted to use the perl scrip and
    changed to operate on all files in a directory.
    So if one file is changed then all files in the
    directory is processed.

    perl were chosen for the helper scripts because this
    is pure text processing which perl is good at and
    especially the headers_check.pl script are expected to
    see changes / new checks implmented.

    The speed is ~300% faster on this box.
    And the output generated to the screen is now down to
    two lines per directory (one for install, one for check)
    so it is easier to scroll back after a kernel build.

    The perl scripts has been brought to sanity by patient
    feedback from: Vegard Nossum

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Move it to the top-level file to decide if we install/check
    the generic headers or the arch specific headers.

    This revealed a long standing bug where "make headers_check_all"
    relied on the files in asm/ for the current architecture.
    So make headers_check_all is now broken by this commit.

    In addition:

    o add a simpler way to detect if an arch support
    exporting header files.

    o add 'set -e;' so we error out early if
    make headers_check_all fails.

    o add sparc64 and cris to arch we do not process
    in make headers_*_all because:

    sparc64 - use sparc to export headers
    cris - is know seriously broken

    Includes suggestions from: David Woodhouse
    .

    Signed-off-by: Sam Ravnborg
    Cc: David Woodhouse

    Sam Ravnborg
     
  • No functional changes just improved readability

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • ALTARCH is no longer used by any arch(*) so drop
    support for this from Makefile.headerinst

    Dropping ALTARCH support simplifies Makefile.headerinst

    (*) sparc64 uses it but work is ongoing to drop it
    and no furter usage is planned.

    Signed-off-by: Sam Ravnborg
    Cc: David Woodhouse
    Cc: David Miller

    Sam Ravnborg
     
  • unifdef utility is fast enough to warrant that we always
    run the scripts through unifdef.

    This patch runs all headers listed with header-y and unifdef-y
    through unifdef.
    Next step is to drop unifdef-y in all Kbuild files and
    that can now be done in smaller steps.

    Signed-off-by: Sam Ravnborg
    Cc: David Woodhouse
    Cc: Adrian Bunk

    Sam Ravnborg
     
  • * git://git.infradead.org/~dwmw2/random-2.6:
    remove dummy asm/kvm.h files
    firmware: create firmware binaries during 'make modules'.

    Linus Torvalds
     
  • This means that we no longer need write access to the source tree while
    doing 'make modules_install'.

    Signed-off-by: David Woodhouse

    David Woodhouse
     
  • uname -m was leaving a newline in $arch, and not passing the tests.

    Also, printing the unknown arch on failure is probably helpful.

    Signed-off-by: Eric Sandeen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     
  • Currently, checkstack.pl only looks for fixed subtractions from the stack
    pointer. However, things like this:

    void function(int size)
    {
    char stackbuster[size << 2];
    ...

    are certainly worth pointing out, I think.

    This could perhaps be done more cleanly, and the following patch only
    adds "dynamic" REs for x86 and x86_64, but it works:

    0x00b0 crypto_cbc_decrypt_inplace [cbc]: Dynamic (%rax)
    0x00ad crypto_pcbc_decrypt_inplace [pcbc]: Dynamic (%rax)
    0x02f6 crypto_pcbc_encrypt_inplace [pcbc]: Dynamic (%rax)
    0x036c _crypto_xcbc_digest_setkey [xcbc]: Dynamic (%rax)
    ...

    (Inspired by Keith Owens' old stack-check script)

    Signed-off-by: Eric Sandeen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     

25 Jul, 2008

4 commits