08 Oct, 2016

1 commit

  • When doing an nmi backtrace of many cores, most of which are idle, the
    output is a little overwhelming and very uninformative. Suppress
    messages for cpus that are idling when they are interrupted and just
    emit one line, "NMI backtrace for N skipped: idling at pc 0xNNN".

    We do this by grouping all the cpuidle code together into a new
    .cpuidle.text section, and then checking the address of the interrupted
    PC to see if it lies within that section.

    This commit suitably tags x86 and tile idle routines, and only adds in
    the minimal framework for other architectures.

    Link: http://lkml.kernel.org/r/1472487169-14923-5-git-send-email-cmetcalf@mellanox.com
    Signed-off-by: Chris Metcalf
    Acked-by: Peter Zijlstra (Intel)
    Tested-by: Peter Zijlstra (Intel)
    Tested-by: Daniel Thompson [arm]
    Tested-by: Petr Mladek
    Cc: Aaron Tomlin
    Cc: Peter Zijlstra (Intel)
    Cc: "Rafael J. Wysocki"
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     

04 Aug, 2016

1 commit

  • The dma-mapping core and the implementations do not change the DMA
    attributes passed by pointer. Thus the pointer can point to const data.
    However the attributes do not have to be a bitfield. Instead unsigned
    long will do fine:

    1. This is just simpler. Both in terms of reading the code and setting
    attributes. Instead of initializing local attributes on the stack
    and passing pointer to it to dma_set_attr(), just set the bits.

    2. It brings safeness and checking for const correctness because the
    attributes are passed by value.

    Semantic patches for this change (at least most of them):

    virtual patch
    virtual context

    @r@
    identifier f, attrs;

    @@
    f(...,
    - struct dma_attrs *attrs
    + unsigned long attrs
    , ...)
    {
    ...
    }

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    and

    // Options: --all-includes
    virtual patch
    virtual context

    @r@
    identifier f, attrs;
    type t;

    @@
    t f(..., struct dma_attrs *attrs);

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.com
    Signed-off-by: Krzysztof Kozlowski
    Acked-by: Vineet Gupta
    Acked-by: Robin Murphy
    Acked-by: Hans-Christian Noren Egtvedt
    Acked-by: Mark Salter [c6x]
    Acked-by: Jesper Nilsson [cris]
    Acked-by: Daniel Vetter [drm]
    Reviewed-by: Bart Van Assche
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Fabien Dessenne [bdisp]
    Reviewed-by: Marek Szyprowski [vb2-core]
    Acked-by: David Vrabel [xen]
    Acked-by: Konrad Rzeszutek Wilk [xen swiotlb]
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Richard Kuo [hexagon]
    Acked-by: Geert Uytterhoeven [m68k]
    Acked-by: Gerald Schaefer [s390]
    Acked-by: Bjorn Andersson
    Acked-by: Hans-Christian Noren Egtvedt [avr32]
    Acked-by: Vineet Gupta [arc]
    Acked-by: Robin Murphy [arm64 and dma-iommu]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Kozlowski
     

21 May, 2016

1 commit

  • Define HAVE_EXIT_THREAD for archs which want to do something in
    exit_thread. For others, let's define exit_thread as an empty inline.

    This is a cleanup before we change the prototype of exit_thread to
    accept a task parameter.

    [akpm@linux-foundation.org: fix mips]
    Signed-off-by: Jiri Slaby
    Cc: "David S. Miller"
    Cc: "H. Peter Anvin"
    Cc: "James E.J. Bottomley"
    Cc: Aurelien Jacquiot
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: Chen Liqin
    Cc: Chris Metcalf
    Cc: Chris Zankel
    Cc: David Howells
    Cc: Fenghua Yu
    Cc: Geert Uytterhoeven
    Cc: Guan Xuetao
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Ivan Kokshaysky
    Cc: James Hogan
    Cc: Jeff Dike
    Cc: Jesper Nilsson
    Cc: Jiri Slaby
    Cc: Jonas Bonn
    Cc: Koichi Yasutake
    Cc: Lennox Wu
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Mikael Starvik
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Ralf Baechle
    Cc: Rich Felker
    Cc: Richard Henderson
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Russell King
    Cc: Steven Miao
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

26 Mar, 2016

1 commit

  • KASAN needs to know whether the allocation happens in an IRQ handler.
    This lets us strip everything below the IRQ entry point to reduce the
    number of unique stack traces needed to be stored.

    Move the definition of __irq_entry to so that the
    users don't need to pull in . Also introduce the
    __softirq_entry macro which is similar to __irq_entry, but puts the
    corresponding functions to the .softirqentry.text section.

    Signed-off-by: Alexander Potapenko
    Acked-by: Steven Rostedt
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: David Rientjes
    Cc: Joonsoo Kim
    Cc: Andrey Konovalov
    Cc: Dmitry Vyukov
    Cc: Andrey Ryabinin
    Cc: Konstantin Serebryany
    Cc: Dmitry Chernenkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Potapenko
     

09 Feb, 2016

1 commit

  • Lockdep is initialized at compile time now. Get rid of lockdep_init().

    Signed-off-by: Andrey Ryabinin
    Signed-off-by: Andrew Morton
    Cc: Linus Torvalds
    Cc: Mike Krinkin
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-kernel@vger.kernel.org
    Cc: mm-commits@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Andrey Ryabinin
     

21 Jan, 2016

1 commit

  • [dan.carpenter@oracle.com: C6X: fix build breakage]
    Signed-off-by: Christoph Hellwig
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Christian Borntraeger
    Cc: Joerg Roedel
    Cc: Sebastian Ott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

17 Apr, 2015

1 commit

  • Pull arch/c6x fixes from Mark Salter.

    * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
    c6x: platforms: cache: Export symbol L1P_cache_block_invalidate and L1D_cache_block_writeback
    c6x: kernel: setup: Export symbol memory_end
    c6x: kernel: setup: Add screen_info global variable
    c6x: include: asm: Kbuild: Add generic serial.h
    c6x: include: asm: dma-mapping: Add dummy dma_sync_single_range_for_device
    c6x: include: asm: setup: Include "linux/types.h"
    c6x: asm: Add default flat.h according to xtensa architecture
    c6x: kernel: setup: Remove 'const' for local variables in machine_init
    c6x: Makefile: Add -D__linux__
    C6x: time: Ensure consistency in __init
    c6x: kernel: setup: Include "linux/console.h"

    Linus Torvalds
     

12 Apr, 2015

1 commit


26 Mar, 2015

4 commits

  • It is needed by several modules, the related error with allmodconfig:

    MODPOST 3327 modules
    ERROR: "memory_end" [net/wireless/lib80211_crypt_tkip.ko] undefined!
    ERROR: "memory_end" [net/sunrpc/sunrpc.ko] undefined!
    ERROR: "memory_end" [net/sunrpc/auth_gss/rpcsec_gss_krb5.ko] undefined!
    ERROR: "memory_end" [net/rxrpc/rxkad.ko] undefined!
    ERROR: "memory_end" [net/mac802154/mac802154.ko] undefined!
    ERROR: "memory_end" [net/mac80211/mac80211.ko] undefined!
    ERROR: "memory_end" [net/ipv6/esp6.ko] undefined!
    ERROR: "memory_end" [net/ipv6/ah6.ko] undefined!
    ERROR: "memory_end" [net/ipv4/esp4.ko] undefined!
    ERROR: "memory_end" [net/ipv4/ah4.ko] undefined!
    ERROR: "memory_end" [net/ceph/libceph.ko] undefined!
    ERROR: "memory_end" [net/9p/9pnet_virtio.ko] undefined!
    ERROR: "memory_end" [drivers/usb/wusbcore/wusbcore.ko] undefined!
    ERROR: "memory_end" [drivers/usb/misc/usbtest.ko] undefined!
    ERROR: "memory_end" [drivers/usb/core/usbcore.ko] undefined!
    ERROR: "memory_end" [drivers/target/target_core_file.ko] undefined!
    ERROR: "memory_end" [drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.ko] undefined!
    ERROR: "memory_end" [drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko] undefined!
    ERROR: "memory_end" [drivers/net/virtio_net.ko] undefined!
    ERROR: "memory_end" [drivers/net/usb/usbnet.ko] undefined!
    ERROR: "memory_end" [drivers/net/ppp/ppp_mppe.ko] undefined!
    ERROR: "memory_end" [drivers/mtd/nand/nand.ko] undefined!
    ERROR: "memory_end" [drivers/mmc/card/mmc_block.ko] undefined!
    ERROR: "memory_end" [drivers/crypto/qce/qcrypto.ko] undefined!
    ERROR: "memory_end" [drivers/block/drbd/drbd.ko] undefined!
    ERROR: "memory_end" [drivers/block/aoe/aoe.ko] undefined!
    ERROR: "memory_end" [crypto/tcrypt.ko] undefined!
    ERROR: "memory_end" [crypto/gcm.ko] undefined!
    ERROR: "memory_end" [crypto/cts.ko] undefined!
    ERROR: "memory_end" [crypto/ccm.ko] undefined!
    ERROR: "memory_end" [crypto/authencesn.ko] undefined!
    ERROR: "memory_end" [crypto/authenc.ko] undefined!

    Signed-off-by: Chen Gang
    Signed-off-by: Mark Salter

    Chen Gang
     
  • Or can not pass building with allmodconfig:

    LD init/built-in.o
    drivers/built-in.o: In function `vgacon_switch':
    vgacon.c:(.text+0x47f8): undefined reference to `screen_info'
    vgacon.c:(.text+0x4810): undefined reference to `screen_info'
    drivers/built-in.o: In function `vgacon_resize':
    vgacon.c:(.text+0x4ac8): undefined reference to `screen_info'
    vgacon.c:(.text+0x4acc): undefined reference to `screen_info'
    drivers/built-in.o: In function `vgacon_save_screen':
    vgacon.c:(.text+0x4cc8): undefined reference to `screen_info'
    drivers/built-in.o:vgacon.c:(.text+0x4cd0): more undefined references to `screen_info' follow

    Signed-off-by: Chen Gang
    Signed-off-by: Mark Salter

    Chen Gang
     
  • early_init_dt_scan() accepts "void *", the related warning:

    CC arch/c6x/kernel/setup.o
    arch/c6x/kernel/setup.c: In function 'machine_init':
    arch/c6x/kernel/setup.c:290:21: warning: passing argument 1 of 'early_init_dt_scan' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    early_init_dt_scan(fdt);
    ^
    In file included from arch/c6x/kernel/setup.c:19:0:
    include/linux/of_fdt.h:75:13: note: expected 'void *' but argument is of type 'const void *'
    extern bool early_init_dt_scan(void *params);
    ^

    Signed-off-by: Chen Gang
    Signed-off-by: Mark Salter

    Chen Gang
     
  • time_init invokes timer64_init (which is __init annotation)
    since all of these are invoked at init time, lets maintain
    consistency by ensuring time_init is marked appropriately
    as well.

    This fixes the following warning with CONFIG_DEBUG_SECTION_MISMATCH=y

    WARNING: vmlinux.o(.text+0x3bfc): Section mismatch in reference from the function time_init() to the function .init.text:timer64_init()
    The function time_init() references
    the function __init timer64_init().
    This is often because time_init lacks a __init
    annotation or the annotation of timer64_init is wrong.

    Fixes: 546a39546c64 ("C6X: time management")
    Signed-off-by: Nishanth Menon
    Signed-off-by: Mark Salter

    Nishanth Menon
     

04 Mar, 2015

1 commit

  • Or c6x will cause building break for allmodconfig, the related error:

    CC arch/c6x/kernel/setup.o
    arch/c6x/kernel/setup.c: In function 'setup_arch':
    arch/c6x/kernel/setup.c:433:2: error: 'conswitchp' undeclared (first use in this function)
    conswitchp = &dummy_con;
    ^
    arch/c6x/kernel/setup.c:433:2: note: each undeclared identifier is reported only once for each function it appears in
    arch/c6x/kernel/setup.c:433:16: error: 'dummy_con' undeclared (first use in this function)
    conswitchp = &dummy_con;
    ^

    Signed-off-by: Chen Gang
    [removed unnecessary #ifdef around include]
    Signed-off-by: Mark Salter

    Chen Gang
     

13 Feb, 2015

1 commit

  • If an attacker can cause a controlled kernel stack overflow, overwriting
    the restart block is a very juicy exploit target. This is because the
    restart_block is held in the same memory allocation as the kernel stack.

    Moving the restart block to struct task_struct prevents this exploit by
    making the restart_block harder to locate.

    Note that there are other fields in thread_info that are also easy
    targets, at least on some architectures.

    It's also a decent simplification, since the restart code is more or less
    identical on all architectures.

    [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
    Signed-off-by: Andy Lutomirski
    Cc: Thomas Gleixner
    Cc: Al Viro
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: David Miller
    Acked-by: Richard Weinberger
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Steven Miao
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Richard Kuo
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Jonas Bonn
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Acked-by: Michael Ellerman (powerpc)
    Tested-by: Michael Ellerman (powerpc)
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Oleg Nesterov
    Cc: Guenter Roeck
    Signed-off-by: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     

06 Aug, 2014

2 commits


30 Apr, 2014

1 commit


10 Oct, 2013

3 commits

  • All arches do essentially the same thing now for
    early_init_dt_setup_initrd_arch, so it can now be removed.

    Signed-off-by: Rob Herring
    Acked-by: Vineet Gupta
    Cc: Russell King
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: James Hogan
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Jonas Bonn
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: x86@kernel.org
    Cc: Chris Zankel
    Cc: Max Filippov
    Acked-by: Grant Likely

    Rob Herring
     
  • Convert c6x to use new early_init_dt_scan function.

    Signed-off-by: Rob Herring
    Acked-by: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: linux-c6x-dev@linux-c6x.org

    Rob Herring
     
  • Save some pointless copying of the kernel command line and just use
    boot_command_line instead.

    Also remove default_command_line as it is not referenced anywhere, and
    the DT code already handles the default command line.

    Signed-off-by: Rob Herring
    Tested-by: Mark Salter
    Acked-by: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: linux-c6x-dev@linux-c6x.org
    Reviewed-by: Grant Likely

    Rob Herring
     

29 Aug, 2013

1 commit


24 Jul, 2013

1 commit

  • On some PAE architectures, the entire range of physical memory could reside
    outside the 32-bit limit. These systems need the ability to specify the
    initrd location using 64-bit numbers.

    This patch globally modifies the early_init_dt_setup_initrd_arch() function to
    use 64-bit numbers instead of the current unsigned long.

    There has been quite a bit of debate about whether to use u64 or phys_addr_t.
    It was concluded to stick to u64 to be consistent with rest of the device
    tree code. As summarized by Geert, "The address to load the initrd is decided
    by the bootloader/user and set at that point later in time. The dtb should not
    be tied to the kernel you are booting"

    More details on the discussion can be found here:
    https://lkml.org/lkml/2013/6/20/690
    https://lkml.org/lkml/2012/9/13/544

    Signed-off-by: Santosh Shilimkar
    Acked-by: Rob Herring
    Acked-by: Vineet Gupta
    Acked-by: Jean-Christophe PLAGNIOL-VILLARD
    Signed-off-by: Grant Likely

    Santosh Shilimkar
     

04 Jul, 2013

1 commit

  • Normalize global variables exported by vmlinux.lds to conform usage
    guidelines from include/asm-generic/sections.h.

    Use _text to mark the start of the kernel image including the head text,
    and _stext to mark the start of the .text section.

    This patch also fixes possible bugs due to current address layout that
    [__init_begin, __init_end] is a sub-range of [_stext, _etext] and pages
    within range [__init_begin, __init_end] will be freed by free_initmem().

    Signed-off-by: Jiang Liu
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     

01 May, 2013

2 commits

  • show_regs() is inherently arch-dependent but it does make sense to print
    generic debug information and some archs already do albeit in slightly
    different forms. This patch introduces a generic function to print debug
    information from show_regs() so that different archs print out the same
    information and it's much easier to modify what's printed.

    show_regs_print_info() prints out the same debug info as dump_stack()
    does plus task and thread_info pointers.

    * Archs which didn't print debug info now do.

    alpha, arc, blackfin, c6x, cris, frv, h8300, hexagon, ia64, m32r,
    metag, microblaze, mn10300, openrisc, parisc, score, sh64, sparc,
    um, xtensa

    * Already prints debug info. Replaced with show_regs_print_info().
    The printed information is superset of what used to be there.

    arm, arm64, avr32, mips, powerpc, sh32, tile, unicore32, x86

    * s390 is special in that it used to print arch-specific information
    along with generic debug info. Heiko and Martin think that the
    arch-specific extra isn't worth keeping s390 specfic implementation.
    Converted to use the generic version.

    Note that now all archs print the debug info before actual register
    dumps.

    An example BUG() dump follows.

    kernel BUG at /work/os/work/kernel/workqueue.c:4841!
    invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #7
    Hardware name: empty empty/S3992, BIOS 080011 10/26/2007
    task: ffff88007c85e040 ti: ffff88007c860000 task.ti: ffff88007c860000
    RIP: 0010:[] [] init_workqueues+0x4/0x6
    RSP: 0000:ffff88007c861ec8 EFLAGS: 00010246
    RAX: ffff88007c861fd8 RBX: ffffffff824466a8 RCX: 0000000000000001
    RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffffffff8234a07a
    RBP: ffff88007c861ec8 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff8234a07a
    R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
    FS: 0000000000000000(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: ffff88015f7ff000 CR3: 00000000021f1000 CR4: 00000000000007f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Stack:
    ffff88007c861ef8 ffffffff81000312 ffffffff824466a8 ffff88007c85e650
    0000000000000003 0000000000000000 ffff88007c861f38 ffffffff82335e5d
    ffff88007c862080 ffffffff8223d8c0 ffff88007c862080 ffffffff81c47760
    Call Trace:
    [] do_one_initcall+0x122/0x170
    [] kernel_init_freeable+0x9b/0x1c8
    [] ? rest_init+0x140/0x140
    [] kernel_init+0xe/0xf0
    [] ret_from_fork+0x7c/0xb0
    [] ? rest_init+0x140/0x140
    ...

    v2: Typo fix in x86-32.

    v3: CPU number dropped from show_regs_print_info() as
    dump_stack_print_info() has been updated to print it. s390
    specific implementation dropped as requested by s390 maintainers.

    Signed-off-by: Tejun Heo
    Acked-by: David S. Miller
    Acked-by: Jesper Nilsson
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Bjorn Helgaas
    Cc: Fengguang Wu
    Cc: Mike Frysinger
    Cc: Vineet Gupta
    Cc: Sam Ravnborg
    Acked-by: Chris Metcalf [tile bits]
    Acked-by: Richard Kuo [hexagon bits]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Both dump_stack() and show_stack() are currently implemented by each
    architecture. show_stack(NULL, NULL) dumps the backtrace for the
    current task as does dump_stack(). On some archs, dump_stack() prints
    extra information - pid, utsname and so on - in addition to the
    backtrace while the two are identical on other archs.

    The usages in arch-independent code of the two functions indicate
    show_stack(NULL, NULL) should print out bare backtrace while
    dump_stack() is used for debugging purposes when something went wrong,
    so it does make sense to print additional information on the task which
    triggered dump_stack().

    There's no reason to require archs to implement two separate but mostly
    identical functions. It leads to unnecessary subtle information.

    This patch expands the dummy fallback dump_stack() implementation in
    lib/dump_stack.c such that it prints out debug information (taken from
    x86) and invokes show_stack(NULL, NULL) and drops arch-specific
    dump_stack() implementations in all archs except blackfin. Blackfin's
    dump_stack() does something wonky that I don't understand.

    Debug information can be printed separately by calling
    dump_stack_print_info() so that arch-specific dump_stack()
    implementation can still emit the same debug information. This is used
    in blackfin.

    This patch brings the following behavior changes.

    * On some archs, an extra level in backtrace for show_stack() could be
    printed. This is because the top frame was determined in
    dump_stack() on those archs while generic dump_stack() can't do that
    reliably. It can be compensated by inlining dump_stack() but not
    sure whether that'd be necessary.

    * Most archs didn't use to print debug info on dump_stack(). They do
    now.

    An example WARN dump follows.

    WARNING: at kernel/workqueue.c:4841 init_workqueues+0x35/0x505()
    Hardware name: empty
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #9
    0000000000000009 ffff88007c861e08 ffffffff81c614dc ffff88007c861e48
    ffffffff8108f50f ffffffff82228240 0000000000000040 ffffffff8234a03c
    0000000000000000 0000000000000000 0000000000000000 ffff88007c861e58
    Call Trace:
    [] dump_stack+0x19/0x1b
    [] warn_slowpath_common+0x7f/0xc0
    [] warn_slowpath_null+0x1a/0x20
    [] init_workqueues+0x35/0x505
    ...

    v2: CPU number added to the generic debug info as requested by s390
    folks and dropped the s390 specific dump_stack(). This loses %ksp
    from the debug message which the maintainers think isn't important
    enough to keep the s390-specific dump_stack() implementation.

    dump_stack_print_info() is moved to kernel/printk.c from
    lib/dump_stack.c. Because linkage is per objecct file,
    dump_stack_print_info() living in the same lib file as generic
    dump_stack() means that archs which implement custom dump_stack()
    - at this point, only blackfin - can't use dump_stack_print_info()
    as that will bring in the generic version of dump_stack() too. v1
    The v1 patch broke build on blackfin due to this issue. The build
    breakage was reported by Fengguang Wu.

    Signed-off-by: Tejun Heo
    Acked-by: David S. Miller
    Acked-by: Vineet Gupta
    Acked-by: Jesper Nilsson
    Acked-by: Vineet Gupta
    Acked-by: Martin Schwidefsky [s390 bits]
    Cc: Heiko Carstens
    Cc: Mike Frysinger
    Cc: Fengguang Wu
    Cc: Bjorn Helgaas
    Cc: Sam Ravnborg
    Acked-by: Richard Kuo [hexagon bits]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

08 Apr, 2013

1 commit

  • Signed-off-by: Thomas Gleixner
    Cc: Linus Torvalds
    Cc: Rusty Russell
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Reviewed-by: Cc: Srivatsa S. Bhat
    Cc: Magnus Damm
    Cc: Mark Salter
    Link: http://lkml.kernel.org/r/20130321215234.087033904@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

04 Feb, 2013

1 commit


13 Dec, 2012

1 commit

  • Pull big execve/kernel_thread/fork unification series from Al Viro:
    "All architectures are converted to new model. Quite a bit of that
    stuff is actually shared with architecture trees; in such cases it's
    literally shared branch pulled by both, not a cherry-pick.

    A lot of ugliness and black magic is gone (-3KLoC total in this one):

    - kernel_thread()/kernel_execve()/sys_execve() redesign.

    We don't do syscalls from kernel anymore for either kernel_thread()
    or kernel_execve():

    kernel_thread() is essentially clone(2) with callback run before we
    return to userland, the callbacks either never return or do
    successful do_execve() before returning.

    kernel_execve() is a wrapper for do_execve() - it doesn't need to
    do transition to user mode anymore.

    As a result kernel_thread() and kernel_execve() are
    arch-independent now - they live in kernel/fork.c and fs/exec.c
    resp. sys_execve() is also in fs/exec.c and it's completely
    architecture-independent.

    - daemonize() is gone, along with its parts in fs/*.c

    - struct pt_regs * is no longer passed to do_fork/copy_process/
    copy_thread/do_execve/search_binary_handler/->load_binary/do_coredump.

    - sys_fork()/sys_vfork()/sys_clone() unified; some architectures
    still need wrappers (ones with callee-saved registers not saved in
    pt_regs on syscall entry), but the main part of those suckers is in
    kernel/fork.c now."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (113 commits)
    do_coredump(): get rid of pt_regs argument
    print_fatal_signal(): get rid of pt_regs argument
    ptrace_signal(): get rid of unused arguments
    get rid of ptrace_signal_deliver() arguments
    new helper: signal_pt_regs()
    unify default ptrace_signal_deliver
    flagday: kill pt_regs argument of do_fork()
    death to idle_regs()
    don't pass regs to copy_process()
    flagday: don't pass regs to copy_thread()
    bfin: switch to generic vfork, get rid of pointless wrappers
    xtensa: switch to generic clone()
    openrisc: switch to use of generic fork and clone
    unicore32: switch to generic clone(2)
    score: switch to generic fork/vfork/clone
    c6x: sanitize copy_thread(), get rid of clone(2) wrapper, switch to generic clone()
    take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h
    mn10300: switch to generic fork/vfork/clone
    h8300: switch to generic fork/vfork/clone
    tile: switch to generic clone()
    ...

    Conflicts:
    arch/microblaze/include/asm/Kbuild

    Linus Torvalds
     

29 Nov, 2012

2 commits


27 Nov, 2012

2 commits

  • A comment in entry.S incorrectly stated that interrupt vectors
    called __do_IRQ() and that int6 vector was used for syscalls.
    Both statements are incorrect for the current kernel, so this
    patch cleans up the wording to reflect current reality.

    Signed-off-by: Mark Salter

    Mark Salter
     
  • C6x was mistakenly running do_notify_resume with interrupts disabled.
    This would triggerlead to a warning in local_bh_enable() because interrupts
    were disabled:

    ------------[ cut here ]------------
    WARNING: at /es/linux/linux-next/kernel/softirq.c:160 local_bh_enable+0x5c/0x10c()
    Modules linked in:

    e02f384d e002cda8 e02f3469 e02f384d 000000a0 e00363fc e01cce58 e5005c00
    e0327986 00000000 e63c0aec 00000164 e00363fc 00000000 fffffffe e5005c00
    e61fde00 e0268184 00000134 e01c91dc 00000001 fffffffe 00000000 10000100
    e01c80e4 e5005c00 00000000 00000000 00000000 e63c0aec e526ce00 10000100
    e628f920 e63c0a88 e6010410 e6449750 e5005c20 00000000 00000000 e63c0a80
    e5005c20 e01c8590 e63c0a80 e5005c20 e63c0aec e00a0554 e009c758 e639e860
    irq_spurious_proc_fops+0x6ad/0x3438
    warn_slowpath_common+0x8c/0xb8
    irq_spurious_proc_fops+0x2c9/0x3438
    irq_spurious_proc_fops+0x6ad/0x3438
    local_bh_enable+0x5c/0x10c
    sk_alloc+0x34/0xa4
    local_bh_enable+0x5c/0x10c
    unix_release_sock+0x5c/0x2a0
    sys_connect+0x94/0xd4
    sock_release+0x38/0x104
    sock_close+0x3c/0x54
    __fput+0x154/0x2ec
    filp_close+0xc0/0xe4
    task_work_run+0xdc/0x12c
    sys_close+0x2c/0x74
    resume_userspace+0x0/0x30
    ---[ end trace a70cbd610ae1f6b4 ]---

    This patch enables interrupts before calling do_notify_resume().

    Signed-off-by: Mark Salter

    Mark Salter
     

16 Oct, 2012

1 commit


01 Oct, 2012

5 commits


25 Jul, 2012

1 commit

  • Pull networking changes from David S Miller:

    1) Remove the ipv4 routing cache. Now lookups go directly into the FIB
    trie and use prebuilt routes cached there.

    No more garbage collection, no more rDOS attacks on the routing
    cache. Instead we now get predictable and consistent performance,
    no matter what the pattern of traffic we service.

    This has been almost 2 years in the making. Special thanks to
    Julian Anastasov, Eric Dumazet, Steffen Klassert, and others who
    have helped along the way.

    I'm sure that with a change of this magnitude there will be some
    kind of fallout, but such things ought the be simple to fix at this
    point. Luckily I'm not European so I'll be around all of August to
    fix things :-)

    The major stages of this work here are each fronted by a forced
    merge commit whose commit message contains a top-level description
    of the motivations and implementation issues.

    2) Pre-demux of established ipv4 TCP sockets, saves a route demux on
    input.

    3) TCP SYN/ACK performance tweaks from Eric Dumazet.

    4) Add namespace support for netfilter L4 conntrack helpers, from Gao
    Feng.

    5) Add config mechanism for Energy Efficient Ethernet to ethtool, from
    Yuval Mintz.

    6) Remove quadratic behavior from /proc/net/unix, from Eric Dumazet.

    7) Support for connection tracker helpers in userspace, from Pablo
    Neira Ayuso.

    8) Allow userspace driven TX load balancing functions in TEAM driver,
    from Jiri Pirko.

    9) Kill off NLMSG_PUT and RTA_PUT macros, more gross stuff with
    embedded gotos.

    10) TCP Small Queues, essentially minimize the amount of TCP data queued
    up in the packet scheduler layer. Whereas the existing BQL (Byte
    Queue Limits) limits the pkt_sched --> netdevice queuing levels,
    this controls the TCP --> pkt_sched queueing levels.

    From Eric Dumazet.

    11) Reduce the number of get_page/put_page ops done on SKB fragments,
    from Alexander Duyck.

    12) Implement protection against blind resets in TCP (RFC 5961), from
    Eric Dumazet.

    13) Support the client side of TCP Fast Open, basically the ability to
    send data in the SYN exchange, from Yuchung Cheng.

    Basically, the sender queues up data with a sendmsg() call using
    MSG_FASTOPEN, then they do the connect() which emits the queued up
    fastopen data.

    14) Avoid all the problems we get into in TCP when timers or PMTU events
    hit a locked socket. The TCP Small Queues changes added a
    tcp_release_cb() that allows us to queue work up to the
    release_sock() caller, and that's what we use here too. From Eric
    Dumazet.

    15) Zero copy on TX support for TUN driver, from Michael S. Tsirkin.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1870 commits)
    genetlink: define lockdep_genl_is_held() when CONFIG_LOCKDEP
    r8169: revert "add byte queue limit support".
    ipv4: Change rt->rt_iif encoding.
    net: Make skb->skb_iif always track skb->dev
    ipv4: Prepare for change of rt->rt_iif encoding.
    ipv4: Remove all RTCF_DIRECTSRC handliing.
    ipv4: Really ignore ICMP address requests/replies.
    decnet: Don't set RTCF_DIRECTSRC.
    net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse.
    ipv4: Remove redundant assignment
    rds: set correct msg_namelen
    openvswitch: potential NULL deref in sample()
    tcp: dont drop MTU reduction indications
    bnx2x: Add new 57840 device IDs
    tcp: avoid oops in tcp_metrics and reset tcpm_stamp
    niu: Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return value
    niu: Fix to check for dma mapping errors.
    net: Fix references to out-of-scope variables in put_cmsg_compat()
    net: ethernet: davinci_emac: add pm_runtime support
    net: ethernet: davinci_emac: Remove unnecessary #include
    ...

    Linus Torvalds
     

19 Jul, 2012

1 commit

  • commit a610d6e6: pull clearing RESTORE_SIGMASK into block_sigmask()
    left behind a compiler warning:

    arch/c6x/kernel/signal.c:252:6: warning: unused variable 'ret'

    This patch cleans up the warning by removing the unused variable.

    Signed-off-by: Mark Salter

    Mark Salter