09 Jul, 2020

1 commit

  • In order to perform future tests against the cred saved during open(),
    switch kallsyms_show_value() to operate on a cred, and have all current
    callers pass current_cred(). This makes it very obvious where callers
    are checking the wrong credential in their "read" contexts. These will
    be fixed in the coming patches.

    Additionally switch return value to bool, since it is always used as a
    direct permission check, not a 0-on-success, negative-on-error style
    function return.

    Cc: stable@vger.kernel.org
    Signed-off-by: Kees Cook

    Kees Cook
     

10 Jun, 2020

1 commit

  • Patch series "Add log level to show_stack()", v3.

    Add log level argument to show_stack().

    Done in three stages:
    1. Introducing show_stack_loglvl() for every architecture
    2. Migrating old users with an explicit log level
    3. Renaming show_stack_loglvl() into show_stack()

    Justification:

    - It's a design mistake to move a business-logic decision into platform
    realization detail.

    - I have currently two patches sets that would benefit from this work:
    Removing console_loglevel jumps in sysrq driver [1] Hung task warning
    before panic [2] - suggested by Tetsuo (but he probably didn't realise
    what it would involve).

    - While doing (1), (2) the backtraces were adjusted to headers and other
    messages for each situation - so there won't be a situation when the
    backtrace is printed, but the headers are missing because they have
    lesser log level (or the reverse).

    - As the result in (2) plays with console_loglevel for kdb are removed.

    The least important for upstream, but maybe still worth to note that every
    company I've worked in so far had an off-list patch to print backtrace
    with the needed log level (but only for the architecture they cared
    about). If you have other ideas how you will benefit from show_stack()
    with a log level - please, reply to this cover letter.

    See also discussion on v1:
    https://lore.kernel.org/linux-riscv/20191106083538.z5nlpuf64cigxigh@pathway.suse.cz/

    This patch (of 50):

    print_ip_sym() needs to have a log level parameter to comply with other
    parts being printed. Otherwise, half of the expected backtrace would be
    printed and other may be missing with some logging level.

    The following callee(s) are using now the adjusted log level:
    - microblaze/unwind: the same level as headers & userspace unwind.
    Note that pr_debug()'s there are for debugging the unwinder itself.
    - nds32/traps: symbol addresses are printed with the same log level
    as backtrace headers.
    - lockdep: ip for locking issues is printed with the same log level
    as other part of the warning.
    - sched: ip where preemption was disabled is printed as error like
    the rest part of the message.
    - ftrace: bug reports are now consistent in the log level being used.

    Signed-off-by: Dmitry Safonov
    Signed-off-by: Andrew Morton
    Acked-by: Steven Rostedt (VMware)
    Cc: Albert Ou
    Cc: Ben Segall
    Cc: Dietmar Eggemann
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Ingo Molnar
    Cc: James Hogan
    Cc: Juri Lelli
    Cc: Mel Gorman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Paul Walmsley
    Cc: Peter Zijlstra
    Cc: Ralf Baechle
    Cc: Thomas Gleixner
    Cc: Vincent Chen
    Cc: Vincent Guittot
    Cc: Will Deacon
    Cc: Dmitry Safonov
    Cc: Dmitry Safonov
    Cc: Jiri Slaby
    Cc: Petr Mladek
    Cc: Sergey Senozhatsky
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Richard Henderson
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Aurelien Jacquiot
    Cc: Mark Salter
    Cc: Guo Ren
    Cc: Yoshinori Sato
    Cc: Brian Cain
    Cc: Fenghua Yu
    Cc: Tony Luck
    Cc: Geert Uytterhoeven
    Cc: Ley Foon Tan
    Cc: Jonas Bonn
    Cc: Stafford Horne
    Cc: Stefan Kristiansson
    Cc: Helge Deller
    Cc: "James E.J. Bottomley"
    Cc: Benjamin Herrenschmidt
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Christian Borntraeger
    Cc: Heiko Carstens
    Cc: Vasily Gorbik
    Cc: Rich Felker
    Cc: "David S. Miller"
    Cc: Anton Ivanov
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Guan Xuetao
    Cc: Borislav Petkov
    Cc: "H. Peter Anvin"
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Len Brown
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: "Rafael J. Wysocki"
    Cc: Daniel Thompson
    Cc: Douglas Anderson
    Cc: Jason Wessel
    Link: http://lkml.kernel.org/r/20200418201944.482088-2-dima@arista.com
    Signed-off-by: Linus Torvalds

    Dmitry Safonov
     

07 Feb, 2018

1 commit

  • print_ip_sym() is mostly used for debugging, so I think it should print
    the raw addresses.

    Link: http://lkml.kernel.org/r/1514519382-405-1-git-send-email-chenhc@lemote.com
    Signed-off-by: Huacai Chen
    Cc: Kees Cook
    Cc: Fuxin Zhang
    Cc: "Tobin C. Harding"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huacai Chen
     

02 Feb, 2018

1 commit

  • Pull printk updates from Petr Mladek:

    - Add a console_msg_format command line option:

    The value "default" keeps the old "[time stamp] text\n" format. The
    value "syslog" allows to see the syslog-like "[timestamp] text" format.

    This feature was requested by people doing regression tests, for
    example, 0day robot. They want to have both filtered and full logs
    at hands.

    - Reduce the risk of softlockup:

    Pass the console owner in a busy loop.

    This is a new approach to the old problem. It was first proposed by
    Steven Rostedt on Kernel Summit 2017. It marks a context in which
    the console_lock owner calls console drivers and could not sleep.
    On the other side, printk() callers could detect this state and use
    a busy wait instead of a simple console_trylock(). Finally, the
    console_lock owner checks if there is a busy waiter at the end of
    the special context and eventually passes the console_lock to the
    waiter.

    The hand-off works surprisingly well and helps in many situations.
    Well, there is still a possibility of the softlockup, for example,
    when the flood of messages stops and the last owner still has too
    much to flush.

    There is increasing number of people having problems with
    printk-related softlockups. We might eventually need to get better
    solution. Anyway, this looks like a good start and promising
    direction.

    - Do not allow to schedule in console_unlock() called from printk():

    This reverts an older controversial commit. The reschedule helped
    to avoid softlockups. But it also slowed down the console output.
    This patch is obsoleted by the new console waiter logic described
    above. In fact, the reschedule made the hand-off less effective.

    - Deprecate "%pf" and "%pF" format specifier:

    It was needed on ia64, ppc64 and parisc64 to dereference function
    descriptors and show the real function address. It is done
    transparently by "%ps" and "pS" format specifier now.

    Sergey Senozhatsky found that all the function descriptors were in
    a special elf section and could be easily detected.

    - Remove printk_symbol() API:

    It has been obsoleted by "%pS" format specifier, and this change
    helped to remove few continuous lines and a less intuitive old API.

    - Remove redundant memsets:

    Sergey removed unnecessary memset when processing printk.devkmsg
    command line option.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: (27 commits)
    printk: drop redundant devkmsg_log_str memsets
    printk: Never set console_may_schedule in console_trylock()
    printk: Hide console waiter logic into helpers
    printk: Add console owner and waiter logic to load balance console writes
    kallsyms: remove print_symbol() function
    checkpatch: add pF/pf deprecation warning
    symbol lookup: introduce dereference_symbol_descriptor()
    parisc64: Add .opd based function descriptor dereference
    powerpc64: Add .opd based function descriptor dereference
    ia64: Add .opd based function descriptor dereference
    sections: split dereference_function_descriptor()
    openrisc: Fix conflicting types for _exext and _stext
    lib: do not use print_symbol()
    irq debug: do not use print_symbol()
    sysfs: do not use print_symbol()
    drivers: do not use print_symbol()
    x86: do not use print_symbol()
    unicore32: do not use print_symbol()
    sh: do not use print_symbol()
    mn10300: do not use print_symbol()
    ...

    Linus Torvalds
     

22 Jan, 2018

1 commit


16 Jan, 2018

1 commit

  • No more print_symbol()/__print_symbol() users left, remove these
    symbols.

    It was a very old API that encouraged people use continuous lines.
    It had been obsoleted by %pS format specifier in a normal printk()
    call.

    Link: http://lkml.kernel.org/r/20180105102538.GC471@jagdpanzerIV
    Cc: Andrew Morton
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Mark Salter
    Cc: Tony Luck
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Guan Xuetao
    Cc: Borislav Petkov
    Cc: Greg Kroah-Hartman
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Vineet Gupta
    Cc: Fengguang Wu
    Cc: Steven Rostedt
    Cc: LKML
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-c6x-dev@linux-c6x.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-am33-list@redhat.com
    Cc: linux-sh@vger.kernel.org
    Cc: linux-edac@vger.kernel.org
    Cc: x86@kernel.org
    Cc: linux-snps-arc@lists.infradead.org
    Cc: Sergey Senozhatsky
    Signed-off-by: Sergey Senozhatsky
    Suggested-by: Joe Perches
    [pmladek@suse.com: updated commit message]
    Signed-off-by: Petr Mladek

    Sergey Senozhatsky
     

09 Jan, 2018

1 commit

  • dereference_symbol_descriptor() invokes appropriate ARCH specific
    function descriptor dereference callbacks:
    - dereference_kernel_function_descriptor() if the pointer is a
    kernel symbol;

    - dereference_module_function_descriptor() if the pointer is a
    module symbol.

    This is the last step needed to make '%pS/%ps' smart enough to
    handle function descriptor dereference on affected ARCHs and
    to retire '%pF/%pf'.

    To refresh it:
    Some architectures (ia64, ppc64, parisc64) use an indirect pointer
    for C function pointers - the function pointer points to a function
    descriptor and we need to dereference it to get the actual function
    pointer.

    Function descriptors live in .opd elf section and all affected
    ARCHs (ia64, ppc64, parisc64) handle it properly for kernel and
    modules. So we, technically, can decide if the dereference is
    needed by simply looking at the pointer: if it belongs to .opd
    section then we need to dereference it.

    The kernel and modules have their own .opd sections, obviously,
    that's why we need to split dereference_function_descriptor()
    and use separate kernel and module dereference arch callbacks.

    Link: http://lkml.kernel.org/r/20171206043649.GB15885@jagdpanzerIV
    Cc: Fenghua Yu
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: James Bottomley
    Cc: Andrew Morton
    Cc: Jessica Yu
    Cc: Steven Rostedt
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Sergey Senozhatsky
    Tested-by: Tony Luck #ia64
    Tested-by: Santosh Sivaraj #powerpc
    Tested-by: Helge Deller #parisc64
    Signed-off-by: Petr Mladek

    Sergey Senozhatsky
     

30 Nov, 2017

1 commit

  • The conditional kallsym hex printing used a special fixed-width '%lx'
    output (KALLSYM_FMT) in preparation for the hashing of %p, but that
    series ended up adding a %px specifier to help with the conversions.

    Use it, and avoid the "print pointer as an unsigned long" code.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

14 Nov, 2017

1 commit

  • As reported by kernelci and other build bots, we now get a link
    failure without CONFIG_KALLSYMS:

    module.c:(.text+0xf2c): undefined reference to `kallsyms_show_value'

    This adds a dummy helper with the same name that can be used
    for compilation. It's not entirely clear to me what this
    should return for !CONFIG_KALLSYMS, I picked an unconditional
    'false', which leads to the module address being unavailable
    to user space.

    Link: https://kernelci.org/build/mainline/branch/master/kernel/v4.14-5-g516fb7f2e73d/
    Fixes: 516fb7f2e73d ("/proc/module: use the same logic as /proc/kallsyms for address exposure")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

13 Nov, 2017

1 commit


02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

30 May, 2012

1 commit

  • Using %ps in a printk format will sometimes fail silently and print the
    empty string if the address passed in does not match a symbol that
    kallsyms knows about. But using %pS will fall back to printing the full
    address if kallsyms can't find the symbol. Make %ps act the same as %pS
    by falling back to printing the address.

    While we're here also make %ps print the module that a symbol comes from
    so that it matches what %pS already does. Take this simple function for
    example (in a module):

    static void test_printk(void)
    {
    int test;
    pr_info("with pS: %pS\n", &test);
    pr_info("with ps: %ps\n", &test);
    }

    Before this patch:

    with pS: 0xdff7df44
    with ps:

    After this patch:

    with pS: 0xdff7df44
    with ps: 0xdff7df44

    Signed-off-by: Stephen Boyd
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

01 Nov, 2011

1 commit

  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

24 Mar, 2011

1 commit

  • The %pB format specifier is for stack backtrace. Its handler
    sprint_backtrace() does symbol lookup using (address-1) to
    ensure the address will not point outside of the function.

    If there is a tail-call to the function marked "noreturn",
    gcc optimized out the code after the call then causes saved
    return address points outside of the function (i.e. the start
    of the next function), so pollutes call trace somewhat.

    This patch adds the %pB printk mechanism that allows architecture
    call-trace printout functions to improve backtrace printouts.

    Signed-off-by: Namhyung Kim
    Acked-by: Steven Rostedt
    Acked-by: Frederic Weisbecker
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: linux-arch@vger.kernel.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Namhyung Kim
     

16 Dec, 2009

1 commit


31 Mar, 2009

1 commit

  • Impact: New API

    kallsyms_lookup_name only returns the first match that it finds. Ksplice
    needs information about all symbols with a given name in order to correctly
    resolve local symbols.

    kallsyms_on_each_symbol provides a generic mechanism for iterating over the
    kallsyms table.

    Cc: Jeff Arnold
    Cc: Tim Abbott
    Signed-off-by: Anders Kaseorg
    Signed-off-by: Rusty Russell

    Anders Kaseorg
     

17 Oct, 2008

1 commit

  • Use the '%pF' format to get rid of an "#ifdef DEBUG" and make some printks
    atomic.

    This removes the last in-tree uses of print_fn_descriptor_symbol(). I
    marked print_fn_descriptor_symbol() deprecated and scheduled it for
    removal next year to give time for out-of-tree modules to be updated.

    parisc's print_fn_descriptor_symbol() is currently broken there (it needs
    to dereference the function pointer similar to ia64 and power). This
    patch shouldn't make anything worse, but it means we need to fix
    dereference_function_descriptor() instead of print_fn_descriptor_symbol()
    to get meaningful initcall_debug output.

    Signed-off-by: Bjorn Helgaas
    Cc: Jesse Barnes
    Cc: Kyle McMartin
    Cc: "Rafael J. Wysocki"
    Cc: Kay Sievers
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

31 Jul, 2008

1 commit


26 Jul, 2008

1 commit

  • Use the %p format string which already accounts for the padding you need
    with a pointer type on a particular architecture.

    Also replace the macro with a static inline function to match the rest of
    the file.

    Cc: Heiko Carstens
    Cc: Arjan van de Ven
    Signed-off-by: Vegard Nossum
    Cc: Sam Ravnborg
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vegard Nossum
     

16 May, 2008

1 commit

  • Everybody wants to pass it a function pointer, and in fact, that is what
    you _must_ pass it for it to make sense (since it knows that ia64 and
    ppc64 use descriptors for function pointers and fetches the actual
    address from there).

    So don't make the argument be a 'unsigned long' and force everybody to
    add a cast.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

06 Nov, 2007

1 commit

  • The Build with randconfig fails with following error with the
    2.6.24-rc4-git9

    include/linux/kallsyms.h:56: error: `NULL' undeclared (first use in this
    function)
    include/linux/kallsyms.h:56: error: (Each undeclared identifier is
    reported only once
    include/linux/kallsyms.h:56: error: for each function it appears in.)
    make[2]: *** [arch/powerpc/platforms/cell/spu_callbacks.o] Error 1
    make[1]: *** [arch/powerpc/platforms/cell] Error 2
    make: *** [arch/powerpc/platforms] Error 2

    Signed-off-by: Kamalesh Babulal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kamalesh Babulal
     

18 Jul, 2007

1 commit

  • KSYM_NAME_LEN is peculiar in that it does not include the space for the
    trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating
    buffer. This is nonsense and error-prone. Moreover, when the caller
    forgets that it's very likely to subtly bite back by corrupting the stack
    because the last position of the buffer is always cleared to zero.

    This patch increments KSYM_NAME_LEN by one and updates code accordingly.

    * off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro
    is fixed.

    * Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together,
    MODULE_NAME_LEN was treated as if it didn't include space for the
    trailing '\0'. Fix it.

    Signed-off-by: Tejun Heo
    Acked-by: Paulo Marques
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

08 Jul, 2007

1 commit

  • This patch fixes the following 2.6.22 regression with CONFIG_KALLSYMS=n:

    ...
    CC arch/m32r/kernel/traps.o
    In file included from /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/arch/m32r/kernel/traps.c:14:
    /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h: In function 'lookup_symbol_name':
    /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: 'ERANGE' undeclared (first use in this function)
    /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: (Each undeclared identifier is reported only once
    /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: for each function it appears in.)
    /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h: In function 'lookup_symbol_attrs':
    /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:71: error: 'ERANGE' undeclared (first use in this function)
    make[2]: *** [arch/m32r/kernel/traps.o] Error 1

    Signed-off-by: Adrian Bunk
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

09 May, 2007

2 commits

  • Same story as with cat /proc/*/wchan race vs rmmod race, only
    /proc/slab_allocators want more info than just symbol name.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • kallsyms_lookup() can go iterating over modules list unprotected which is OK
    for emergency situations (oops), but not OK for regular stuff like
    /proc/*/wchan.

    Introduce lookup_symbol_name()/lookup_module_symbol_name() which copy symbol
    name into caller-supplied buffer or return -ERANGE. All copying is done with
    module_mutex held, so...

    Signed-off-by: Alexey Dobriyan
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

01 May, 2007

1 commit

  • Today's print_symbol function dumps a kernel symbol with printk. This
    patch extends the functionality of kallsyms.c so that the symbol lookup
    function may be used without the printk. This is useful for modules that
    want to dump symbols elsewhere, for example, to debugfs. I intend to use
    the new function call in the GFS2 file system (which will be a separate
    patch).

    [akpm@linux-foundation.org: build fix]
    [clameter@sgi.com: sprint_symbol should return length of string like sprintf]
    Signed-off-by: Robert Peterson
    Cc: Rusty Russell
    Cc: Roman Zippel
    Cc: "Randy.Dunlap"
    Cc: Sam Ravnborg
    Acked-by: Paulo Marques
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert Peterson
     

03 Oct, 2006

1 commit

  • Some uses of kallsyms_lookup() do not need to find out the name of a symbol
    and its module's name it belongs. This is specially true in arch specific
    code, which needs to unwind the stack to show the back trace during oops
    (mips is an example). In this specific case, we just need to retreive the
    function's size and the offset of the active intruction inside it.

    Adds a new entry "kallsyms_lookup_size_offset()" This new entry does
    exactly the same as kallsyms_lookup() but does not require any buffers to
    store any names.

    It returns 0 if it fails otherwise 1.

    Signed-off-by: Franck Bui-Huu
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Franck Bui-Huu
     

04 Jul, 2006

2 commits

  • Provide a common print_ip_sym() function that prints the passed instruction
    pointer as well as the symbol belonging to it. Avoids adding a bunch of
    #ifdef CONFIG_64BIT in order to get the printk format right on 32/64 bit
    platforms.

    Acked-by: Ingo Molnar
    Cc: Arjan van de Ven
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Have a special version of print_symbol() for s390 which clears the most
    significant bit of addr before calling __print_symbol(). This seems to be
    better than checking/changing each place in the kernel that saves an
    instruction pointer.

    Without this the output would look like:

    hardirqs last enabled at (30907): [] 0x80018c6a
    hardirqs last disabled at (30908): [] 0x8001e48c
    softirqs last enabled at (30904): [] 0x8001dc96
    softirqs last disabled at (30897): [] 0x8001dc50

    instead of this:

    hardirqs last enabled at (19421): [] cpu_idle+0x176/0x1c4
    hardirqs last disabled at (19422): [] io_no_vtime+0xa/0x1a
    softirqs last enabled at (19418): [] do_softirq+0xa6/0xe8
    softirqs last disabled at (19411): [] do_softirq+0x60/0xe8

    Acked-by: Ingo Molnar
    Cc: Arjan van de Ven
    Cc: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     

26 Apr, 2006

1 commit


17 Apr, 2005

1 commit

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

    Linus Torvalds