03 Sep, 2008

1 commit

  • This bug is causing random crashes
    (http://bugzilla.kernel.org/show_bug.cgi?id=11414).

    -fno-omit-frame-pointer is only needed on powerpc when -pg is also
    supplied, and there is a gcc bug that causes incorrect code generation
    on 32-bit powerpc when -fno-omit-frame-pointer is used---it uses stack
    locations below the stack pointer, which is not allowed by the ABI
    because those locations can and sometimes do get corrupted by an
    interrupt.

    This ensures that CONFIG_FRAME_POINTER is only selected by ftrace.
    When CONFIG_FTRACE is enabled we also pass -mno-sched-epilog to work
    around the gcc codegen bug.

    Patch based on work by:
    Andreas Schwab
    Segher Boessenkool

    Signed-off-by: Tony Breeds
    Signed-off-by: Paul Mackerras

    Tony Breeds
     

17 Aug, 2008

1 commit

  • I noticed that sysctl_check.o was the largest object file in
    a allnoconfig build in kernel/*.

    36243 0 0 36243 8d93 kernel/sysctl_check.o

    This is because it was default y and && EMBEDDED. But I don't
    really see a need for a non kernel developer to have their
    sysctls checked all the time.

    So move the Kconfig into the kernel debugging section and
    also drop the default y and the EMBEDDED check.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

13 Aug, 2008

1 commit

  • Currently source files in the Documentation/ sub-dir can easily bit-rot
    since they are not generally buildable, either because they are hidden in
    text files or because there are no Makefile rules for them. This needs to
    be fixed so that the source files remain usable and good examples of code
    instead of bad examples.

    Add the ability to build source files that are in the Documentation/ dir.
    Add to Kconfig as "BUILD_DOCSRC" config symbol.

    Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
    Documentation/ sources. Or enable BUILD_DOCSRC in the *config system.
    However, this symbol depends on HEADERS_CHECK since the header files need
    to be installed (for userspace builds).

    Built (using cross-tools) for x86-64, i386, alpha, ia64, sparc32,
    sparc64, powerpc, sh, m68k, & mips.

    Signed-off-by: Randy Dunlap
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

25 Jul, 2008

1 commit

  • Boot initialisation is very complex, with significant numbers of
    architecture-specific routines, hooks and code ordering. While significant
    amounts of the initialisation is architecture-independent, it trusts the data
    received from the architecture layer. This is a mistake, and has resulted in
    a number of difficult-to-diagnose bugs.

    This patchset adds some validation and tracing to memory initialisation. It
    also introduces a few basic defensive measures. The validation code can be
    explicitly disabled for embedded systems.

    This patch:

    Add additional debugging and verification code for memory initialisation.

    Once enabled, the verification checks are always run and when required
    additional debugging information may be outputted via a mminit_loglevel=
    command-line parameter.

    The verification code is placed in a new file mm/mm_init.c. Ideally other mm
    initialisation code will be moved here over time.

    Signed-off-by: Mel Gorman
    Cc: Christoph Lameter
    Cc: Andy Whitcroft
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     

24 Jul, 2008

1 commit

  • …ernel/git/tip/linux-2.6-tip

    * 'core/softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    softlockup: fix invalid proc_handler for softlockup_panic
    softlockup: fix watchdog task wakeup frequency
    softlockup: fix watchdog task wakeup frequency
    softlockup: show irqtrace
    softlockup: print a module list on being stuck
    softlockup: fix NMI hangs due to lock race - 2.6.26-rc regression
    softlockup: fix false positives on nohz if CPU is 100% idle for more than 60 seconds
    softlockup: fix softlockup_thresh fix
    softlockup: fix softlockup_thresh unaligned access and disable detection at runtime
    softlockup: allow panic on lockup

    Linus Torvalds
     

22 Jul, 2008

1 commit


16 Jul, 2008

3 commits


28 Jun, 2008

1 commit

  • This patch adds saved stack-traces to the backtrace suite of self-tests.

    Note that we don't depend on or unconditionally enable CONFIG_STACKTRACE
    because not all architectures may have it (and we still want to enable the
    other tests for those architectures).

    Cc: Arjan van de Ven
    Signed-off-by: Vegard Nossum
    Cc: Arjan van de Ven
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar

    Vegard Nossum
     

19 Jun, 2008

1 commit

  • This patch re-institutes the ability to build rcutorture directly into
    the Linux kernel. The reason that this capability was removed was that
    this could result in your kernel being pretty much useless, as rcutorture
    would be running starting from early boot. This problem has been avoided
    by (1) making rcutorture run only three seconds of every six by default,
    (2) adding a CONFIG_RCU_TORTURE_TEST_RUNNABLE that permits rcutorture
    to be quiesced at boot time, and (3) adding a sysctl in /proc named
    /proc/sys/kernel/rcutorture_runnable that permits rcutorture to be
    quiesced and unquiesced when built into the kernel.

    Please note that this /proc file is -not- available when rcutorture
    is built as a module. Please also note that to get the earlier
    take-no-prisoners behavior, you must use the boot command line to set
    rcutorture's "stutter" parameter to zero.

    The rcutorture quiescing mechanism is currently quite crude: loops
    in each rcutorture process that poll a global variable once per tick.
    Suggestions for improvement are welcome. The default action will
    be to reduce the polling rate to a few times per second.

    Signed-off-by: Paul E. McKenney
    Suggested-by: Ingo Molnar
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

16 Jun, 2008

1 commit

  • This reverts commit 9aaffc898ff4a3df18c5fc4b9e0fa47e779ad726.

    That commit was a very bad idea. RCU_TORTURE found many boot timing
    bugs and other sorts of bugs in the past, so excluding it from
    boot images is very silly.

    The option already depends on DEBUG_KERNEL and is disabled by default.
    Even when it runs, the test threads are reniced. If it annoys people
    we could add a runtime sysctl.

    Ingo Molnar
     

25 May, 2008

2 commits

  • Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     
  • allow users to configure the softlockup detector to generate a panic
    instead of a warning message.

    high-availability systems might opt for this strict method (combined
    with panic_timeout= boot option/sysctl), instead of generating
    softlockup warnings ad infinitum.

    also, automated tests work better if the system reboots reliably (into
    a safe kernel) in case of a lockup.

    The full spectrum of configurability is supported: boot option, sysctl
    option and Kconfig option.

    it's default-disabled.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     

24 May, 2008

1 commit

  • If CONFIG_FTRACE is selected and /proc/sys/kernel/ftrace_enabled is
    set to a non-zero value the ftrace routine will be called everytime
    we enter a kernel function that is not marked with the "notrace"
    attribute.

    The ftrace routine will then call a registered function if a function
    happens to be registered.

    [ This code has been highly hacked by Steven Rostedt and Ingo Molnar,
    so don't blame Arnaldo for all of this ;-) ]

    Update:
    It is now possible to register more than one ftrace function.
    If only one ftrace function is registered, that will be the
    function that ftrace calls directly. If more than one function
    is registered, then ftrace will call a function that will loop
    through the functions to call.

    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Arnaldo Carvalho de Melo
     

30 Apr, 2008

2 commits

  • Add calls to the generic object debugging infrastructure and provide fixup
    functions which allow to keep the system alive when recoverable problems have
    been detected by the object debugging core code.

    Signed-off-by: Thomas Gleixner
    Acked-by: Ingo Molnar
    Cc: Greg KH
    Cc: Randy Dunlap
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • We can see an ever repeating problem pattern with objects of any kind in the
    kernel:

    1) freeing of active objects
    2) reinitialization of active objects

    Both problems can be hard to debug because the crash happens at a point where
    we have no chance to decode the root cause anymore. One problem spot are
    kernel timers, where the detection of the problem often happens in interrupt
    context and usually causes the machine to panic.

    While working on a timer related bug report I had to hack specialized code
    into the timer subsystem to get a reasonable hint for the root cause. This
    debug hack was fine for temporary use, but far from a mergeable solution due
    to the intrusiveness into the timer code.

    The code further lacked the ability to detect and report the root cause
    instantly and keep the system operational.

    Keeping the system operational is important to get hold of the debug
    information without special debugging aids like serial consoles and special
    knowledge of the bug reporter.

    The problems described above are not restricted to timers, but timers tend to
    expose it usually in a full system crash. Other objects are less explosive,
    but the symptoms caused by such mistakes can be even harder to debug.

    Instead of creating specialized debugging code for the timer subsystem a
    generic infrastructure is created which allows developers to verify their code
    and provides an easy to enable debug facility for users in case of trouble.

    The debugobjects core code keeps track of operations on static and dynamic
    objects by inserting them into a hashed list and sanity checking them on
    object operations and provides additional checks whenever kernel memory is
    freed.

    The tracked object operations are:
    - initializing an object
    - adding an object to a subsystem list
    - deleting an object from a subsystem list

    Each operation is sanity checked before the operation is executed and the
    subsystem specific code can provide a fixup function which allows to prevent
    the damage of the operation. When the sanity check triggers a warning message
    and a stack trace is printed.

    The list of operations can be extended if the need arises. For now it's
    limited to the requirements of the first user (timers).

    The core code enqueues the objects into hash buckets. The hash index is
    generated from the address of the object to simplify the lookup for the check
    on kfree/vfree. Each bucket has it's own spinlock to avoid contention on a
    global lock.

    The debug code can be compiled in without being active. The runtime overhead
    is minimal and could be optimized by asm alternatives. A kernel command line
    option enables the debugging code.

    Thanks to Ingo Molnar for review, suggestions and cleanup patches.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: Greg KH
    Cc: Randy Dunlap
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

26 Apr, 2008

1 commit

  • Add option to enable -Wframe-larger-than= on gcc 4.4

    gcc mainline (upcoming 4.4) added a new -Wframe-larger-than=...
    option to warn at build time about too large stack frames. Add a config
    option to enable this warning, since this very useful for the kernel.

    I choose (somewhat arbitarily) 2048 as default warning threshold for 64bit
    and 1024 as default for 32bit architectures. With some research and
    fixing all the code for smaller values these defaults should be probably
    lowered.

    With the default allyesconfigs have some new warnings, but I think
    that is all code that should be just fixed.

    At some point (when gcc 4.4 is released and widely used) this should
    obsolete make checkstack

    Signed-off-by: Andi Kleen
    Signed-off-by: Sam Ravnborg

    Andi Kleen
     

19 Apr, 2008

2 commits

  • There have been a few oopses caused by 'struct file's with NULL f_vfsmnts.
    There was also a set of potentially missed mnt_want_write()s from
    dentry_open() calls.

    This patch provides a very simple debugging framework to catch these kinds of
    bugs. It will WARN_ON() them, but should stop us from having any oopses or
    mnt_writer count imbalances.

    I'm quite convinced that this is a good thing because it found bugs in the
    stuff I was working on as soon as I wrote it.

    [hch: made it conditional on a debug option.
    But it's still a little bit too ugly]

    [hch: merged forced remount r/o fix from Dave and akpm's fix for the fix]

    Signed-off-by: Dave Hansen
    Acked-by: Al Viro
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Dave Hansen
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (43 commits)
    firewire: cleanups
    firewire: fix synchronization of gap counts
    firewire: wait until PHY configuration packet was transmitted (fix bus reset loop)
    firewire: remove unused struct member
    firewire: use bitwise and to get reg in handle_registers
    firewire: replace more hex values with defined csr constants
    firewire: reread config ROM when device reset the bus
    firewire: replace static ROM cache by allocated cache
    firewire: fw-ohci: work around generation bug in TI controllers (fix AV/C and more)
    firewire: fw-ohci: extend logging of bus generations and node ID
    firewire: fw-ohci: conditionally log busReset interrupts
    firewire: fw-ohci: don't append to AT context when it's not active
    firewire: fw-ohci: log regAccessFail events
    firewire: fw-ohci: make sure HCControl register LPS bit is set
    firewire: fw-ohci: missing PPC PMac feature calls in failure path
    firewire: fw-ohci: untangle a mixed unsigned/signed expression
    firewire: debug interrupt events
    firewire: fw-ohci: catch self_id_count == 0
    firewire: fw-ohci: add self ID error check
    firewire: fw-ohci: refactor probe, remove, suspend, resume
    ...

    Linus Torvalds
     

18 Apr, 2008

4 commits

  • This way firewire-ohci can be used for remote debugging like ohci1394.
    Version with amendment from Fri, 11 Apr 2008 00:08:08 +0200.

    Signed-off-by: Stefan Richter
    Acked-by: Bernhard Kaindl

    Stefan Richter
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-kgdb:
    kgdb: always use icache flush for sw breakpoints
    kgdb: fix SMP NMI kgdb_handle_exception exit race
    kgdb: documentation fixes
    kgdb: allow static kgdbts boot configuration
    kgdb: add documentation
    kgdb: Kconfig fix
    kgdb: add kgdb internal test suite
    kgdb: fix several kgdb regressions
    kgdb: kgdboc pl011 I/O module
    kgdb: fix optional arch functions and probe_kernel_*
    kgdb: add x86 HW breakpoints
    kgdb: print breakpoint removed on exception
    kgdb: clocksource watchdog
    kgdb: fix NMI hangs
    kgdb: fix kgdboc dynamic module configuration
    kgdb: document parameters
    x86: kgdb support
    consoles: polling support, kgdboc
    kgdb: core
    uaccess: add probe_kernel_write()

    Linus Torvalds
     
  • * 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc:
    Remove DEBUG_SEMAPHORE from Kconfig
    Improve semaphore documentation
    Simplify semaphore implementation
    Add down_timeout and change ACPI to use it
    Introduce down_killable()
    Generic semaphore implementation
    Add semaphore.h to kernel_lock.c
    Fix quota.h includes

    Linus Torvalds
     
  • kgdb core code. Handles the protocol and the arch details.

    [ mingo@elte.hu: heavily modified, simplified and cleaned up. ]
    [ xemul@openvz.org: use find_task_by_pid_ns ]

    Signed-off-by: Jason Wessel
    Signed-off-by: Ingo Molnar
    Signed-off-by: Jan Kiszka
    Reviewed-by: Thomas Gleixner

    Jason Wessel
     

17 Apr, 2008

1 commit

  • Alpha and FRV mutexes had an option to print lots of debugging messages
    in their semaphore implementation. This feature has not been carried
    over to the generic semaphores, so remove the stale Kconfig option.

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     

14 Apr, 2008

1 commit

  • count_partial() is used by both slabinfo and the sysfs proc support. Move
    the function directly before the beginning of the sysfs code so that it can
    be easily found. Rework the preprocessor conditional to take into account
    that slub sysfs support depends on CONFIG_SYSFS *and* CONFIG_SLUB_DEBUG.

    Make CONFIG_SLUB_STATS depend on CONFIG_SLUB_DEBUG and CONFIG_SYSFS. There
    is no point of keeping statistics if no one can restrive them.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Pekka Enberg

    Christoph Lameter
     

24 Feb, 2008

1 commit

  • Make LKDTM depend on BLOCK to prevent build failures with certain configs.

    Signed-off-by: Chris Snook
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Snook
     

15 Feb, 2008

1 commit


10 Feb, 2008

1 commit


09 Feb, 2008

1 commit

  • Add architecture support for the MN10300/AM33 CPUs produced by MEI to the
    kernel.

    This patch also adds board support for the ASB2303 with the ASB2308 daughter
    board, and the ASB2305. The only processor supported is the MN103E010, which
    is an AM33v2 core plus on-chip devices.

    [akpm@linux-foundation.org: nuke cvs control strings]
    Signed-off-by: Masakazu Urade
    Signed-off-by: Koichi Yasutake
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

08 Feb, 2008

1 commit

  • The statistics provided here allow the monitoring of allocator behavior but
    at the cost of some (minimal) loss of performance. Counters are placed in
    SLUB's per cpu data structure. The per cpu structure may be extended by the
    statistics to grow larger than one cacheline which will increase the cache
    footprint of SLUB.

    There is a compile option to enable/disable the inclusion of the runtime
    statistics and its off by default.

    The slabinfo tool is enhanced to support these statistics via two options:

    -D Switches the line of information displayed for a slab from size
    mode to activity mode.

    -A Sorts the slabs displayed by activity. This allows the display of
    the slabs most important to the performance of a certain load.

    -r Report option will report detailed statistics on

    Example (tbench load):

    slabinfo -AD ->Shows the most active slabs

    Name Objects Alloc Free %Fast
    skbuff_fclone_cache 33 111953835 111953835 99 99
    :0000192 2666 5283688 5281047 99 99
    :0001024 849 5247230 5246389 83 83
    vm_area_struct 1349 119642 118355 91 22
    :0004096 15 66753 66751 98 98
    :0000064 2067 25297 23383 98 78
    dentry 10259 28635 18464 91 45
    :0000080 11004 18950 8089 98 98
    :0000096 1703 12358 10784 99 98
    :0000128 762 10582 9875 94 18
    :0000512 184 9807 9647 95 81
    :0002048 479 9669 9195 83 65
    anon_vma 777 9461 9002 99 71
    kmalloc-8 6492 9981 5624 99 97
    :0000768 258 7174 6931 58 15

    So the skbuff_fclone_cache is of highest importance for the tbench load.
    Pretty high load on the 192 sized slab. Look for the aliases

    slabinfo -a | grep 000192
    :0000192 -r option implied if cache name is mentioned

    .... Usual output ...

    Slab Perf Counter Alloc Free %Al %Fr
    --------------------------------------------------
    Fastpath 111953360 111946981 99 99
    Slowpath 1044 7423 0 0
    Page Alloc 272 264 0 0
    Add partial 25 325 0 0
    Remove partial 86 264 0 0
    RemoteObj/SlabFrozen 350 4832 0 0
    Total 111954404 111954404

    Flushes 49 Refill 0
    Deactivate Full=325(92%) Empty=0(0%) ToHead=24(6%) ToTail=1(0%)

    Looks good because the fastpath is overwhelmingly taken.

    skbuff_head_cache:

    Slab Perf Counter Alloc Free %Al %Fr
    --------------------------------------------------
    Fastpath 5297262 5259882 99 99
    Slowpath 4477 39586 0 0
    Page Alloc 937 824 0 0
    Add partial 0 2515 0 0
    Remove partial 1691 824 0 0
    RemoteObj/SlabFrozen 2621 9684 0 0
    Total 5301739 5299468

    Deactivate Full=2620(100%) Empty=0(0%) ToHead=0(0%) ToTail=0(0%)

    Descriptions of the output:

    Total: The total number of allocation and frees that occurred for a
    slab

    Fastpath: The number of allocations/frees that used the fastpath.

    Slowpath: Other allocations

    Page Alloc: Number of calls to the page allocator as a result of slowpath
    processing

    Add Partial: Number of slabs added to the partial list through free or
    alloc (occurs during cpuslab flushes)

    Remove Partial: Number of slabs removed from the partial list as a result of
    allocations retrieving a partial slab or by a free freeing
    the last object of a slab.

    RemoteObj/Froz: How many times were remotely freed object encountered when a
    slab was about to be deactivated. Frozen: How many times was
    free able to skip list processing because the slab was in use
    as the cpuslab of another processor.

    Flushes: Number of times the cpuslab was flushed on request
    (kmem_cache_shrink, may result from races in __slab_alloc)

    Refill: Number of times we were able to refill the cpuslab from
    remotely freed objects for the same slab.

    Deactivate: Statistics how slabs were deactivated. Shows how they were
    put onto the partial list.

    In general fastpath is very good. Slowpath without partial list processing is
    also desirable. Any touching of partial list uses node specific locks which
    may potentially cause list lock contention.

    Signed-off-by: Christoph Lameter

    Christoph Lameter
     

03 Feb, 2008

2 commits


02 Feb, 2008

1 commit

  • Change latencytop Kconfig entry so it doesn't list the archictectures
    that support it. Instead introduce HAVE_LATENCY_SUPPORT which any
    architecture can set. Should reduce patch conflicts.

    Cc: Arjan van de Ven
    Cc: Martin Schwidefsky
    Cc: Holger Wolf
    Signed-off-by: Heiko Carstens
    Signed-off-by: Ingo Molnar

    Heiko Carstens
     

30 Jan, 2008

3 commits

  • This patch adds a new configuration option, which adds support for a new
    early_param which gets checked in arch/x86/kernel/setup_{32,64}.c:setup_arch()
    to decide wether OHCI-1394 FireWire controllers should be initialized and
    enabled for physical DMA access to allow remote debugging of early problems
    like issues ACPI or other subsystems which are executed very early.

    If the config option is not enabled, no code is changed, and if the boot
    paramenter is not given, no new code is executed, and independent of that,
    all new code is freed after boot, so the config option can be even enabled
    in standard, non-debug kernels.

    With specialized tools, it is then possible to get debugging information
    from machines which have no serial ports (notebooks) such as the printk
    buffer contents, or any data which can be referenced from global pointers,
    if it is stored below the 4GB limit and even memory dumps of of the physical
    RAM region below the 4GB limit can be taken without any cooperation from the
    CPU of the host, so the machine can be crashed early, it does not matter.

    In the extreme, even kernel debuggers can be accessed in this way. I wrote
    a small kgdb module and an accompanying gdb stub for FireWire which allows
    to gdb to talk to kgdb using remote remory reads and writes over FireWire.

    An version of the gdb stub fore FireWire is able to read all global data
    from a system which is running a a normal kernel without any kernel debugger,
    without any interruption or support of the system's CPU. That way, e.g. the
    task struct and so on can be read and even manipulated when the physical DMA
    access is granted.

    A HOWTO is included in this patch, in Documentation/debugging-via-ohci1394.txt
    and I've put a copy online at
    ftp://ftp.suse.de/private/bk/firewire/docs/debugging-via-ohci1394.txt

    It also has links to all the tools which are available to make use of it
    another copy of it is online at:
    ftp://ftp.suse.de/private/bk/firewire/kernel/ohci1394_dma_early-v2.diff

    Signed-Off-By: Bernhard Kaindl
    Tested-By: Thomas Renninger
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Bernhard Kaindl
     
  • During the work on the x86 32 and 64 bit backtrace code I found it useful
    to have a simple test module to test a process and irq context backtrace.
    Since the existing backtrace code was buggy, I figure it might be useful
    to have such a test module in the kernel so that maybe we can even
    detect such bugs earlier..

    [ mingo@elte.hu: build fix ]

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Arjan van de Ven
     
  • Here is a quick and naive smoke test for kprobes. This is intended to
    just verify if some unrelated change broke the *probes subsystem. It is
    self contained, architecture agnostic and isn't of any great use by itself.

    This needs to be built in the kernel and runs a basic set of tests to
    verify if kprobes, jprobes and kretprobes run fine on the kernel. In case
    of an error, it'll print out a message with a "BUG" prefix.

    This is a start; we intend to add more tests to this bucket over time.

    Thanks to Jim Keniston and Masami Hiramatsu for comments and suggestions.

    Tested on x86 (32/64) and powerpc.

    Signed-off-by: Ananth N Mavinakayanahalli
    Acked-by: Masami Hiramatsu
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Ananth N Mavinakayanahalli
     

29 Jan, 2008

2 commits

  • If the config option CONFIG_SECTION_MISMATCH is not set and
    we see a Section mismatch present the following to the user:

    modpost: Found 1 section mismatch(es).
    To see additional details select "Enable full Section mismatch analysis"
    in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH).

    If the option CONFIG_SECTION_MISMATCH is selected
    then be verbose in the Section mismatch reporting from mdopost.
    Sample outputs:

    WARNING: o-x86_64/vmlinux.o(.text+0x7396): Section mismatch in reference from the function discover_ebda() to the variable .init.data:ebda_addr
    The function discover_ebda() references
    the variable __initdata ebda_addr.
    This is often because discover_ebda lacks a __initdata
    annotation or the annotation of ebda_addr is wrong.

    WARNING: o-x86_64/vmlinux.o(.data+0x74d58): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
    The variable pci_serial_quirks references
    the function __devexit pci_plx9050_exit()
    If the reference is valid then annotate the
    variable with __exit* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    WARNING: o-x86_64/vmlinux.o(__ksymtab+0x630): Section mismatch in reference from the variable __ksymtab_arch_register_cpu to the function .cpuinit.text:arch_register_cpu()
    The symbol arch_register_cpu is exported and annotated __cpuinit
    Fix this by removing the __cpuinit annotation of arch_register_cpu or drop the export.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Setting the option DEBUG_SECTION_MISMATCH will
    report additional section mismatch'es but this
    should in the end makes it possible to get rid of
    all of them.

    See help text in lib/Kconfig.debug for details.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

26 Jan, 2008

1 commit