Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on May 20, 2011
  1. @rostedt

    extable, core_kernel_data(): Make sure all archs define _sdata

    rostedt authored Ingo Molnar committed
    A new utility function (core_kernel_data()) is used to determine if a
    passed in address is part of core kernel data or not. It may or may not
    return true for RO data, but this utility must work for RW data.
    Thus both _sdata and _edata must be defined and continuous,
    without .init sections that may later be freed and replaced by
    volatile memory (memory that can be freed).
    This utility function is used to determine if data is safe from
    ever being freed. Thus it should return true for all RW global
    data that is not in a module or has been allocated, or false
    Also change core_kernel_data() back to the more precise _sdata condition
    and document the function.
    Signed-off-by: Steven Rostedt <>
    Acked-by: Ralf Baechle <>
    Acked-by: Hirokazu Takata <>
    Cc: Richard Henderson <>
    Cc: Ivan Kokshaysky <>
    Cc: Matt Turner <>
    Cc: Geert Uytterhoeven <>
    Cc: Roman Zippel <>
    Cc: Kyle McMartin <>
    Cc: Helge Deller <>
    Cc: JamesE.J.Bottomley <>
    Signed-off-by: Ingo Molnar <>
     arch/alpha/kernel/   |    1 +
     arch/m32r/kernel/    |    1 +
     arch/m68k/kernel/  |    2 ++
     arch/m68k/kernel/ |    1 +
     arch/mips/kernel/    |    1 +
     arch/parisc/kernel/  |    3 +++
     kernel/extable.c                  |   12 +++++++++++-
     7 files changed, 20 insertions(+), 1 deletion(-)
Commits on May 19, 2011
  1. core_kernel_data(): Fix architectures that do not define _sdata

    Ingo Molnar authored
    Some architectures such as Alpha do not define _sdata but _data:
      kernel/built-in.o: In function `core_kernel_data':
      kernel/extable.c:77: undefined reference to `_sdata'
    So expand the scope of the data range to the text addresses too,
    this might be more correct anyway because this way we can
    cover readonly variables as well.
    Cc: Paul E. McKenney <>
    Cc: Steven Rostedt <>
    Signed-off-by: Ingo Molnar <>
Commits on May 18, 2011
  1. @rostedt

    ftrace: Allow dynamically allocated function tracers

    Steven Rostedt authored rostedt committed
    Now that functions may be selected individually, it only makes sense
    that we should allow dynamically allocated trace structures to
    be traced. This will allow perf to allocate a ftrace_ops structure
    at runtime and use it to pick and choose which functions that
    structure will trace.
    Note, a dynamically allocated ftrace_ops will always be called
    indirectly instead of being called directly from the mcount in
    entry.S. This is because there's no safe way to prevent mcount
    from being preempted before calling the function, unless we
    modify every entry.S to do so (not likely). Thus, dynamically allocated
    functions will now be called by the ftrace_ops_list_func() that
    loops through the ops that are allocated if there are more than
    one op allocated at a time. This loop is protected with a
    To determine if an ftrace_ops structure is allocated or not, a new
    util function was added to the kernel/extable.c called
    core_kernel_data(), which returns 1 if the address is between
    _sdata and _edata.
    Cc: Paul E. McKenney <>
    Signed-off-by: Steven Rostedt <>
Commits on Apr 5, 2009
  1. @torvalds

    Merge branch 'tracing-for-linus' of git://…

    torvalds authored
    * 'tracing-for-linus' of git:// (413 commits)
      tracing, net: fix net tree and tracing tree merge interaction
      tracing, powerpc: fix powerpc tree and tracing tree interaction
      ring-buffer: do not remove reader page from list on ring buffer free
      function-graph: allow unregistering twice
      trace: make argument 'mem' of trace_seq_putmem() const
      tracing: add missing 'extern' keywords to trace_output.h
      tracing: provide trace_seq_reserve()
      blktrace: print out BLK_TN_MESSAGE properly
      blktrace: extract duplidate code
      blktrace: fix memory leak when freeing struct blk_io_trace
      blktrace: fix blk_probes_ref chaos
      blktrace: make classic output more classic
      blktrace: fix off-by-one bug
      blktrace: fix the original blktrace
      blktrace: fix a race when creating blk_tree_root in debugfs
      blktrace: fix timestamp in binary output
      tracing, Text Edit Lock: cleanup
      tracing: filter fix for TRACE_EVENT_FORMAT events
      ftrace: Using FTRACE_WARN_ON() to check "freed record" in ftrace_release()
      x86: kretprobe-booster interrupt emulation code fix
    Fix up trivial conflicts in
  2. @torvalds

    Merge git://…

    torvalds authored
    * git://
      module: use strstarts()
      strstarts: helper function for !strncmp(str, prefix, strlen(prefix))
      arm: allow usage of string functions in linux/string.h
      module: don't use stop_machine on module load
      module: create a request_module_nowait()
      module: include other structures in module version check
      module: remove the SHF_ALLOC flag on the __versions section.
      module: clarify the force-loading taint message.
      module: Export symbols needed for Ksplice
      Ksplice: Add functions for walking kallsyms symbols
      module: remove module_text_address()
      module: __module_address
      module: Make find_symbol return a struct kernel_symbol
      kernel/module.c: fix an unused goto label
      param: fix charp parameters set via sysfs
    Fix trivial conflicts in kernel/extable.c manually.
Commits on Mar 31, 2009
  1. @rustyrussell

    module: remove module_text_address()

    rustyrussell authored
    Impact: Replace and remove risky (non-EXPORTed) API
    module_text_address() returns a pointer to the module, which given locking
    improvements in module.c, is useless except to test for NULL:
    1) If the module can't go away, use __module_text_address.
    2) Otherwise, just use is_module_text_address().
    Signed-off-by: Rusty Russell <>
Commits on Mar 22, 2009
  1. tracing, Text Edit Lock: Fix one sparse warning in kernel/extable.c

    Dmitri Vorobiev authored Ingo Molnar committed
    Impact: cleanup.
    The global mutex text_mutex if declared in linux/memory.h, so
    this file needs to be included into kernel/extable.c, where the
    same mutex is defined. This fixes the following sparse warning:
     kernel/extable.c:32:1: warning: symbol 'text_mutex' was not declared.
     Should it be static?
    Signed-off-by: Dmitri Vorobiev <>
    LKML-Reference: <>
    Signed-off-by: Ingo Molnar <>
Commits on Mar 20, 2009
  1. tracing, Text Edit Lock - kprobes architecture independent support, n…

    Ingo Molnar authored
    …ommu fix
    Impact: build fix on SH !CONFIG_MMU
    Stephen Rothwell reported this linux-next build failure on the SH
      kernel/built-in.o: In function `disable_all_kprobes':
      kernel/kprobes.c:1382: undefined reference to `text_mutex'
    And observed:
    | Introduced by commit 4460fda ("tracing,
    | Text Edit Lock - kprobes architecture independent support") from the
    | tracing tree.  text_mutex is defined in mm/memory.c which is only built
    | if CONFIG_MMU is defined, which is not true for sh allmodconfig.
    Move this lock to kernel/extable.c (which is already home to various
    kernel text related routines), which file is always built-in.
    Reported-by: Stephen Rothwell <>
    Cc: Paul Mundt <>
    Cc: Mathieu Desnoyers <>
    LKML-Reference: <>
    Signed-off-by: Ingo Molnar <>
Commits on Mar 19, 2009
  1. symbols, stacktrace: look up init symbols after module symbols

    Ingo Molnar authored
    Impact: fix incomplete stacktraces
    I noticed such weird stacktrace entries in lockdep dumps:
    [    0.285956] {HARDIRQ-ON-W} state was registered at:
    [    0.285956]   [<ffffffff802bce90>] mark_irqflags+0xbe/0x125
    [    0.285956]   [<ffffffff802bf2fd>] __lock_acquire+0x674/0x82d
    [    0.285956]   [<ffffffff802bf5b2>] lock_acquire+0xfc/0x128
    [    0.285956]   [<ffffffff8135b636>] rt_spin_lock+0xc8/0xd0
    [    0.285956]   [<ffffffffffffffff>] 0xffffffffffffffff
    The stacktrace entry is cut off after rt_spin_lock.
    After much debugging i found out that stacktrace entries that
    belong to init symbols dont get printed out, due to commit:
      a2da405: module: Don't report discarded init pages as kernel text.
    The reason is this check added to core_kernel_text():
    -       if (addr >= (unsigned long)_sinittext &&
    +       if (system_state == SYSTEM_BOOTING &&
    +           addr >= (unsigned long)_sinittext &&
                addr <= (unsigned long)_einittext)
                    return 1;
    This will discard inittext symbols even though their symbol table
    is still present and even though stacktraces done while the system
    was booting up might still be relevant.
    To not reintroduce the (not well-specified) bug addressed in that
    commit, first do a module symbols lookup, then a final init-symbols
    This will work fine on architectures that have separate address
    spaces for modules (such as x86) - and should not crash any other
    architectures either.
    Acked-by: Peter Zijlstra <>
    Cc: Rusty Russell <>
    LKML-Reference: <new-discussion>
    Signed-off-by: Ingo Molnar <>
Commits on Feb 9, 2009
  1. @fweisbec

    tracing/function-graph-tracer: drop the kernel_text_address check

    fweisbec authored Ingo Molnar committed
    When the function graph tracer picks a return address, it ensures this address
    is really a kernel text one by calling __kernel_text_address()
    Actually this path has never been taken.Its role was more likely to debug the tracer
    on the beginning of its development but this function is wasteful since it is called
    for every traced function.
    The fault check is already sufficient.
    Signed-off-by: Frederic Weisbecker <>
    Signed-off-by: Ingo Molnar <>
Commits on Dec 31, 2008
  1. @torvalds

    Merge branch 'core-for-linus' of git://…

    torvalds authored
    * 'core-for-linus' of git:// (63 commits)
      stacktrace: provide save_stack_trace_tsk() weak alias
      rcu: provide RCU options on non-preempt architectures too
      printk: fix discarding message when recursion_bug
      futex: clean up futex_(un)lock_pi fault handling
      "Tree RCU": scalable classic RCU implementation
      futex: rename field in futex_q to clarify single waiter semantics
      x86/swiotlb: add default swiotlb_arch_range_needs_mapping
      x86/swiotlb: add default phys<->bus conversion
      x86: unify pci iommu setup and allow swiotlb to compile for 32 bit
      x86: add swiotlb allocation functions
      swiotlb: consolidate swiotlb info message printing
      swiotlb: support bouncing of HighMem pages
      swiotlb: factor out copy to/from device
      swiotlb: add arch hook to force mapping
      swiotlb: allow architectures to override phys<->bus<->phys conversions
      swiotlb: add comment where we handle the overflow of a dma mask on 32 bit
      rcu: fix rcutorture behavior during reboot
      resources: skip sanity check of busy resources
      swiotlb: move some definitions to header
      swiotlb: allow architectures to override swiotlb pool allocation
    Fix up trivial conflicts in
    as per Ingo's suggestions.
Commits on Dec 8, 2008
  1. @fweisbec

    tracing/function-graph-tracer: introduce __notrace_funcgraph to filte…

    fweisbec authored Ingo Molnar committed
    …r special functions
    Impact: trace more functions
    When the function graph tracer is configured, three more files are not
    traced to prevent only four functions to be traced. And this impacts the
    normal function tracer too.
    I had crashes when I let this file traced. After some debugging, I saw
    that the "current" task point was changed inside__swtich_to(), ie:
    "write_pda(pcurrent, next_p);" inside process_64.c Since the tracer store
    the original return address of the function inside current, we had
    crashes. Only __switch_to() has to be excluded from tracing.
    kernel/module.c and kernel/extable.c:
    Because of a function used internally by the function graph tracer:
    To let the other functions inside these files to be traced, this patch
    introduces the __notrace_funcgraph function prefix which is __notrace if
    function graph tracer is configured and nothing if not.
    Signed-off-by: Frederic Weisbecker <>
    Signed-off-by: Ingo Molnar <>
Commits on Sep 10, 2008
  1. @fenrus75

    debug: add notifier chain debugging, v2

    fenrus75 authored Ingo Molnar committed
    - unbreak ia64 (and powerpc) where function pointers dont
      point at code but at data (reported by Tony Luck)
    [ various cleanups ]
    Signed-off-by: Arjan van de Ven <>
    Signed-off-by: Ingo Molnar <>
Commits on Jan 29, 2008
  1. @rustyrussell

    module: Don't report discarded init pages as kernel text.

    rustyrussell authored
    Current code could cause a bug in symbol_put_addr() if an arch used
    kmalloc module text: we might think the symbol belongs to the core
    The downside is that this might make backtraces through (discarded)
    init functions harder to read on some archs, but we already have that
    issue for modules and noone has complained.
    Signed-off-by: Rusty Russell <>
Commits on May 15, 2006
  1. [PATCH] symbol_put_addr() locks kernel

    Trent Piepho authored Linus Torvalds committed
    Even since a previous patch:
    Fix race between CONFIG_DEBUG_SLABALLOC and modules
    Sun, 27 Jun 2004 17:55:19 +0000 (17:55 +0000);a=commit;h=92b3db26d31cf21b70e3c1eadc56c179506d8fbe
    The function symbol_put_addr() will deadlock the kernel.
    symbol_put_addr() would acquire modlist_lock, then while holding the lock call
    two functions kernel_text_address() and module_text_address() which also try
    to acquire the same lock.  This deadlocks the kernel of course.
    This patch changes symbol_put_addr() to not acquire the modlist_lock, it
    doesn't need it since it never looks at the module list directly.  Also, it
    now uses core_kernel_text() instead of kernel_text_address().  The latter has
    an additional check for addr inside a module, but we don't need to do that
    since we call module_text_address() (the same function kernel_text_address
    uses) ourselves.
    Signed-off-by: Trent Piepho <>
    Cc: Zwane Mwaikambo <>
    Acked-by: Rusty Russell <>
    Cc: Johannes Stezenbach <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
Commits on Apr 16, 2005
  1. Linux-2.6.12-rc2

    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!
Something went wrong with that request. Please try again.