12 Jan, 2012

1 commit

  • * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/intel config: Fix the APB_TIMER selection
    x86/mrst: Add additional debug prints for pb_keys
    x86/intel config: Revamp configuration to allow for Moorestown and Medfield
    x86/intel/scu/ipc: Match the changes in the x86 configuration
    x86/apb: Fix configuration constraints
    x86: Fix INTEL_MID silly
    x86/Kconfig: Cyclone-timer depends on x86-summit
    x86: Reduce clock calibration time during slave cpu startup
    x86/config: Revamp configuration for MID devices
    x86/sfi: Kill the IRQ as id hack

    Linus Torvalds
     

08 Dec, 2011

1 commit


05 Dec, 2011

3 commits

  • This follows on from the patch applied in 3.2rc1 which creates
    an INTEL_MID configuration. We can now add the entry for
    Medfield specific code. After this is merged the final patch
    will be submitted which moves the rest of the device Kconfig
    dependancies to MRST/MEDFIELD/INTEL_MID as appropriate.

    Signed-off-by: Alan Cox
    Signed-off-by: Ingo Molnar

    Alan Cox
     
  • The previous patch modified the stop cpus path to use NMI
    instead of IRQ as the way to communicate to the other cpus to
    shutdown. There were some concerns that various machines may
    have problems with using an NMI IPI.

    This patch creates a selftest to check if NMI is working at
    boot. The idea is to help catch any issues before the machine
    panics and we learn the hard way.

    Loosely based on the locking-selftest.c file, this separate file
    runs a couple of simple tests and reports the results. The
    output looks like:

    ...
    Brought up 4 CPUs
    ----------------
    | NMI testsuite:
    --------------------
    remote IPI: ok |
    local IPI: ok |
    --------------------
    Good, all 2 testcases passed! |
    ---------------------------------
    Total of 4 processors activated (21330.61 BogoMIPS).
    ...

    Signed-off-by: Don Zickus
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: seiji.aguchi@hds.com
    Cc: vgoyal@redhat.com
    Cc: mjg@redhat.com
    Cc: tony.luck@intel.com
    Cc: gong.chen@intel.com
    Cc: satoru.moriya@hds.com
    Cc: avi@redhat.com
    Cc: Andi Kleen
    Link: http://lkml.kernel.org/r/1318533267-18880-3-git-send-email-dzickus@redhat.com
    Signed-off-by: Ingo Molnar

    Don Zickus
     
  • Currently, only kernel stack is checked for the overflow, which
    is not sufficient for systems that need a high reliability. To
    enhance it, it is required to check the IRQ and exception
    stacks, as well.

    This patch checks all the stack types and will cause messages of
    stacks in detail when free stack space drops below a certain
    limit except user stack.

    Signed-off-by: Mitsuo Hayasaka
    Cc: yrl.pp-manager.tt@hitachi.com
    Cc: Randy Dunlap
    Link: http://lkml.kernel.org/r/20111129060829.11076.51733.stgit@ltc219.sdl.hitachi.co.jp
    Signed-off-by: Ingo Molnar
    Cc: "H. Peter Anvin"

    Mitsuo Hayasaka
     

28 Sep, 2011

1 commit

  • There are numerous broken references to Documentation files (in other
    Documentation files, in comments, etc.). These broken references are
    caused by typo's in the references, and by renames or removals of the
    Documentation files. Some broken references are simply odd.

    Fix these broken references, sometimes by dropping the irrelevant text
    they were part of.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

25 May, 2011

2 commits

  • Most arches define CONFIG_DEBUG_STACK_USAGE exactly the same way. Move it
    to lib/Kconfig.debug so each arch doesn't have to define it. This
    obviously makes the option generic, but that's fine because the config is
    already used in generic code.

    It's not obvious to me that sysrq-P actually does anything caution by
    keeping the most inclusive wording.

    Signed-off-by: Stephen Boyd
    Cc: Chris Metcalf
    Acked-by: David S. Miller
    Acked-by: Richard Weinberger
    Acked-by: Mike Frysinger
    Cc: Russell King
    Cc: Hirokazu Takata
    Acked-by: Ralf Baechle
    Cc: Paul Mackerras
    Acked-by: Benjamin Herrenschmidt
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • DEBUG_PER_CPU_MAPS is used in lib/cpumask.c as well as in
    inlcude/linux/cpumask.h and thus it has outgrown its use within x86 and
    powerpc alone. Any arch with SMP support may want to get some more
    debugging, so make this option generic.

    Signed-off-by: Stephen Boyd
    Cc:
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

21 Jan, 2011

1 commit

  • The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
    is used to configure any non-standard kernel with a much larger scope than
    only small devices.

    This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
    references to the option throughout the kernel. A new CONFIG_EMBEDDED
    option is added that automatically selects CONFIG_EXPERT when enabled and
    can be used in the future to isolate options that should only be
    considered for embedded systems (RISC architectures, SLOB, etc).

    Calling the option "EXPERT" more accurately represents its intention: only
    expert users who understand the impact of the configuration changes they
    are making should enable it.

    Reviewed-by: Ingo Molnar
    Acked-by: David Woodhouse
    Signed-off-by: David Rientjes
    Cc: Greg KH
    Cc: "David S. Miller"
    Cc: Jens Axboe
    Cc: Arnd Bergmann
    Cc: Robin Holt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

18 Nov, 2010

1 commit

  • This patch is a logical extension of the protection provided by
    CONFIG_DEBUG_RODATA to LKMs. The protection is provided by
    splitting module_core and module_init into three logical parts
    each and setting appropriate page access permissions for each
    individual section:

    1. Code: RO+X
    2. RO data: RO+NX
    3. RW data: RW+NX

    In order to achieve proper protection, layout_sections() have
    been modified to align each of the three parts mentioned above
    onto page boundary. Next, the corresponding page access
    permissions are set right before successful exit from
    load_module(). Further, free_module() and sys_init_module have
    been modified to set module_core and module_init as RW+NX right
    before calling module_free().

    By default, the original section layout and access flags are
    preserved. When compiled with CONFIG_DEBUG_SET_MODULE_RONX=y,
    the patch will page-align each group of sections to ensure that
    each page contains only one type of content and will enforce
    RO/NX for each group of pages.

    -v1: Initial proof-of-concept patch.
    -v2: The patch have been re-written to reduce the number of #ifdefs
    and to make it architecture-agnostic. Code formatting has also
    been corrected.
    -v3: Opportunistic RO/NX protection is now unconditional. Section
    page-alignment is enabled when CONFIG_DEBUG_RODATA=y.
    -v4: Removed most macros and improved coding style.
    -v5: Changed page-alignment and RO/NX section size calculation
    -v6: Fixed comments. Restricted RO/NX enforcement to x86 only
    -v7: Introduced CONFIG_DEBUG_SET_MODULE_RONX, added
    calls to set_all_modules_text_rw() and set_all_modules_text_ro()
    in ftrace
    -v8: updated for compatibility with linux 2.6.33-rc5
    -v9: coding style fixes
    -v10: more coding style fixes
    -v11: minor adjustments for -tip
    -v12: minor adjustments for v2.6.35-rc2-tip
    -v13: minor adjustments for v2.6.37-rc1-tip

    Signed-off-by: Siarhei Liakh
    Signed-off-by: Xuxian Jiang
    Acked-by: Arjan van de Ven
    Reviewed-by: James Morris
    Signed-off-by: H. Peter Anvin
    Cc: Andi Kleen
    Cc: Rusty Russell
    Cc: Stephen Rothwell
    Cc: Dave Jones
    Cc: Kees Cook
    Cc: Linus Torvalds
    LKML-Reference:
    [ minor cleanliness edits, -v14: build failure fix ]
    Signed-off-by: Ingo Molnar

    matthieu castet
     

22 Oct, 2010

1 commit


08 Oct, 2010

1 commit

  • Intel Moorestown platform has a spi-uart device(Maxim3110),
    which connects to a Designware spi core controller. This patch
    will add early console function based on it.

    As it will be used long before Linux spi subsystem get
    initialised, we simply directly manipulate the spi controller's
    register to acheive the early console func. This is safe as it
    will be disabled when devices subsytem get initialised.

    To use it, user need enable CONFIG_X86_MRST_EARLY_PRINTK in
    kenrel config and add "earlyprintk=mrst" in kernel command line.

    Signed-off-by: Feng Tang
    Acked-by: Alan Cox
    Cc: greg@kroah.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Feng Tang
     

29 Jun, 2010

2 commits

  • These days 4 kilobytes of stack just aren't enough for reliably operation,
    and people using lots of threads have long switched to 64-bit kernels, so
    remove the CONFIG_4KSTACKS option.

    Signed-off-by: Christoph Hellwig
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Christoph Hellwig
     
  • IRQ stacks provide much better safety against unexpected stack use from
    interrupts, at the minimal downside of slightly higher memory usage.
    Enable irq stacks also for the default 8k stack on 32-bit kernels to
    minimize the problem of stack overflows through interrupt activity.

    This is what the 64-bit kernel and various other architectures already do.

    Signed-off-by: Christoph Hellwig
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Christoph Hellwig
     

18 May, 2010

1 commit


29 Apr, 2010

1 commit


26 Mar, 2010

1 commit

  • Support for the PMU's BTS features has been upstreamed in
    v2.6.32, but we still have the old and disabled ptrace-BTS,
    as Linus noticed it not so long ago.

    It's buggy: TIF_DEBUGCTLMSR is trampling all over that MSR without
    regard for other uses (perf) and doesn't provide the flexibility
    needed for perf either.

    Its users are ptrace-block-step and ptrace-bts, since ptrace-bts
    was never used and ptrace-block-step can be implemented using a
    much simpler approach.

    So axe all 3000 lines of it. That includes the *locked_memory*()
    APIs in mm/mlock.c as well.

    Reported-by: Linus Torvalds
    Signed-off-by: Peter Zijlstra
    Cc: Roland McGrath
    Cc: Oleg Nesterov
    Cc: Markus Metzger
    Cc: Steven Rostedt
    Cc: Andrew Morton
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

12 Dec, 2009

1 commit

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

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (57 commits)
    x86, perf events: Check if we have APIC enabled
    perf_event: Fix variable initialization in other codepaths
    perf kmem: Fix unused argument build warning
    perf symbols: perf_header__read_build_ids() offset'n'size should be u64
    perf symbols: dsos__read_build_ids() should read both user and kernel buildids
    perf tools: Align long options which have no short forms
    perf kmem: Show usage if no option is specified
    sched: Mark sched_clock() as notrace
    perf sched: Add max delay time snapshot
    perf tools: Correct size given to memset
    perf_event: Fix perf_swevent_hrtimer() variable initialization
    perf sched: Fix for getting task's execution time
    tracing/kprobes: Fix field creation's bad error handling
    perf_event: Cleanup for cpu_clock_perf_event_update()
    perf_event: Allocate children's perf_event_ctxp at the right time
    perf_event: Clean up __perf_event_init_context()
    hw-breakpoints: Modify breakpoints without unregistering them
    perf probe: Update perf-probe document
    perf probe: Support --del option
    trace-kprobe: Support delete probe syntax
    ...

    Linus Torvalds
     

07 Dec, 2009

1 commit


06 Dec, 2009

1 commit

  • * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    include/linux/compiler-gcc4.h: Fix build bug - gcc-4.0.2 doesn't understand __builtin_object_size
    x86/alternatives: No need for alternatives-asm.h to re-invent stuff already in asm.h
    x86/alternatives: Check replacementlen t use the strict copy checks when branch profiling is in use
    x86, 64-bit: Move K8 B step iret fixup to fault entry asm
    x86: Generate cmpxchg build failures
    x86: Add a Kconfig option to turn the copy_from_user warnings into errors
    x86: Turn the copy_from_user check into an (optional) compile time warning
    x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy
    x86: Use __builtin_object_size() to validate the buffer size for copy_from_user()

    Linus Torvalds
     

13 Oct, 2009

1 commit

  • The branch profiling creates very complex code for each if
    statement, to the point that gcc has trouble even analyzing
    something as simple as

    if (count > 5)
    count = 5;

    This then means that causing an error on code that gcc cannot
    analyze for copy_from_user() and co is not very productive.

    This patch excludes the strict copy checks in the case of branch
    profiling being enabled.

    Signed-off-by: Arjan van de Ven
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     

03 Oct, 2009

1 commit

  • For automated testing it is useful to have the option to turn
    the warnings on copy_from_user() etc checks into errors:

    In function ‘copy_from_user’,
    inlined from ‘fd_copyin’ at drivers/block/floppy.c:3080,
    inlined from ‘fd_ioctl’ at drivers/block/floppy.c:3503:
    linux/arch/x86/include/asm/uaccess_32.h:213:
    error: call to ‘copy_from_user_overflow’ declared with attribute error:
    copy_from_user buffer size is not provably correct

    Signed-off-by: Arjan van de Ven
    Cc: Linus Torvalds
    Cc: Andrew Morton
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     

27 Aug, 2009

1 commit

  • Add a user-space selftest of x86 instruction decoder at kernel build
    time.
    When CONFIG_X86_DECODER_SELFTEST=y, Kbuild builds a test harness of x86
    instruction decoder and performs it after building vmlinux.
    The test compares the results of objdump and x86 instruction decoder
    code and check there are no differences.

    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Jim Keniston
    Cc: Ananth N Mavinakayanahalli
    Cc: Avi Kivity
    Cc: Andi Kleen
    Cc: Christoph Hellwig
    Cc: Frank Ch. Eigler
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: Jason Baron
    Cc: K.Prasad
    Cc: Lai Jiangshan
    Cc: Li Zefan
    Cc: Przemysław Pawełczyk
    Cc: Roland McGrath
    Cc: Sam Ravnborg
    Cc: Srikar Dronamraju
    Cc: Steven Rostedt
    Cc: Tom Zanussi
    Cc: Vegard Nossum
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Masami Hiramatsu
     

11 Jun, 2009

1 commit

  • * 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (244 commits)
    Revert "x86, bts: reenable ptrace branch trace support"
    tracing: do not translate event helper macros in print format
    ftrace/documentation: fix typo in function grapher name
    tracing/events: convert block trace points to TRACE_EVENT(), fix !CONFIG_BLOCK
    tracing: add protection around module events unload
    tracing: add trace_seq_vprint interface
    tracing: fix the block trace points print size
    tracing/events: convert block trace points to TRACE_EVENT()
    ring-buffer: fix ret in rb_add_time_stamp
    ring-buffer: pass in lockdep class key for reader_lock
    tracing: add annotation to what type of stack trace is recorded
    tracing: fix multiple use of __print_flags and __print_symbolic
    tracing/events: fix output format of user stack
    tracing/events: fix output format of kernel stack
    tracing/trace_stack: fix the number of entries in the header
    ring-buffer: discard timestamps that are at the start of the buffer
    ring-buffer: try to discard unneeded timestamps
    ring-buffer: fix bug in ring_buffer_discard_commit
    ftrace: do not profile functions when disabled
    tracing: make trace pipe recognize latency format flag
    ...

    Linus Torvalds
     

28 May, 2009

1 commit

  • This Kconfig option is intended to enable various code paths or
    parameters in IOMMU implementations to stress test the code and/or the
    hardware. This can also be done by disabling optimizations in the code
    when this option is switched on.

    Signed-off-by: Joerg Roedel
    Cc: David Woodhouse
    Cc: FUJITA Tomonori

    Joerg Roedel
     

15 Apr, 2009

1 commit

  • IOMMU_LEAK, GART's own feature, dumps the used IOMMU entries when
    IOMMU entries is full, which might be useful to find a bad driver that
    eats IOMMU entries.

    DMA_API_DEBUG provides the similar feature, debug_dma_dump_mappings,
    and it's better than GART's IOMMU_LEAK feature. GART's IOMMU_LEAK
    feature doesn't say who uses IOMMU entries so it's hard to find a bad
    driver.

    This patch reimplements the GART's IOMMU_LEAK feature by using
    DMA_API_DEBUG.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Joerg Roedel
    Cc: Andrew Morton
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

07 Apr, 2009

1 commit


03 Apr, 2009

1 commit

  • This fixes a build failure with generic debug pagealloc:

    mm/debug-pagealloc.c: In function 'set_page_poison':
    mm/debug-pagealloc.c:8: error: 'struct page' has no member named 'debug_flags'
    mm/debug-pagealloc.c: In function 'clear_page_poison':
    mm/debug-pagealloc.c:13: error: 'struct page' has no member named 'debug_flags'
    mm/debug-pagealloc.c: In function 'page_poison':
    mm/debug-pagealloc.c:18: error: 'struct page' has no member named 'debug_flags'
    mm/debug-pagealloc.c: At top level:
    mm/debug-pagealloc.c:120: error: redefinition of 'kernel_map_pages'
    include/linux/mm.h:1278: error: previous definition of 'kernel_map_pages' was here
    mm/debug-pagealloc.c: In function 'kernel_map_pages':
    mm/debug-pagealloc.c:122: error: 'debug_pagealloc_enabled' undeclared (first use in this function)

    by fixing

    - debug_flags should be in struct page
    - define DEBUG_PAGEALLOC config option for all architectures

    Signed-off-by: Akinobu Mita
    Reported-by: Alexander Beregalov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

01 Apr, 2009

1 commit

  • CONFIG_DEBUG_PAGEALLOC is now supported by x86, powerpc, sparc64, and
    s390. This patch implements it for the rest of the architectures by
    filling the pages with poison byte patterns after free_pages() and
    verifying the poison patterns before alloc_pages().

    This generic one cannot detect invalid page accesses immediately but
    invalid read access may cause invalid dereference by poisoned memory and
    invalid write access can be detected after a long delay.

    Signed-off-by: Akinobu Mita
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

13 Mar, 2009

1 commit


23 Feb, 2009

1 commit


16 Feb, 2009

1 commit

  • Impact: cosmetic change in Kconfig menu layout

    This patch was originally suggested by Peter Zijlstra, but seems it
    was forgotten.

    CONFIG_MMIOTRACE and CONFIG_MMIOTRACE_TEST were selectable
    directly under the Kernel hacking / debugging menu in the kernel
    configuration system. They were present only for x86 and x86_64.

    Other tracers that use the ftrace tracing framework are in their own
    sub-menu. This patch moves the mmiotrace configuration options there.
    Since the Kconfig file, where the tracer menu is, is not architecture
    specific, HAVE_MMIOTRACE_SUPPORT is introduced and provided only by
    x86/x86_64. CONFIG_MMIOTRACE now depends on it.

    Signed-off-by: Pekka Paalanen
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Pekka Paalanen
     

06 Feb, 2009

1 commit


29 Jan, 2009

1 commit

  • The x86/Voyager subarch used to have this distinction between
    'x86 SMP support' and 'Voyager SMP support':

    config X86_SMP
    bool
    depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64)

    This is a pointless distinction - Voyager can (and already does) use
    smp_ops to implement various SMP quirks it has - and it can be extended
    more to cover all the specialities of Voyager.

    So remove this complication in the Kconfig space.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

31 Dec, 2008

1 commit


29 Dec, 2008

1 commit

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

    * 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (241 commits)
    sched, trace: update trace_sched_wakeup()
    tracing/ftrace: don't trace on early stage of a secondary cpu boot, v3
    Revert "x86: disable X86_PTRACE_BTS"
    ring-buffer: prevent false positive warning
    ring-buffer: fix dangling commit race
    ftrace: enable format arguments checking
    x86, bts: memory accounting
    x86, bts: add fork and exit handling
    ftrace: introduce tracing_reset_online_cpus() helper
    tracing: fix warnings in kernel/trace/trace_sched_switch.c
    tracing: fix warning in kernel/trace/trace.c
    tracing/ring-buffer: remove unused ring_buffer size
    trace: fix task state printout
    ftrace: add not to regex on filtering functions
    trace: better use of stack_trace_enabled for boot up code
    trace: add a way to enable or disable the stack tracer
    x86: entry_64 - introduce FTRACE_ frame macro v2
    tracing/ftrace: add the printk-msg-only option
    tracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp()
    x86, bts: correctly report invalid bts records
    ...

    Fixed up trivial conflict in scripts/recordmcount.pl due to SH bits
    being already partly merged by the SH merge.

    Linus Torvalds
     

23 Dec, 2008

1 commit

  • …86/debug', 'x86/defconfig', 'x86/detect-hyper', 'x86/doc', 'x86/dumpstack', 'x86/early-printk', 'x86/fpu', 'x86/idle', 'x86/io', 'x86/memory-corruption-check', 'x86/microcode', 'x86/mm', 'x86/mtrr', 'x86/nmi-watchdog', 'x86/pat2', 'x86/pci-ioapic-boot-irq-quirks', 'x86/ptrace', 'x86/quirks', 'x86/reboot', 'x86/setup-memory', 'x86/signal', 'x86/sparse-fixes', 'x86/time', 'x86/uv' and 'x86/xen' into x86/core

    Ingo Molnar
     

27 Oct, 2008

1 commit


24 Oct, 2008

1 commit

  • Impact: clarify Kconfig help text

    The OPTIMIZE_INLINING help currently says "The gcc 4.x series have a
    rewritten inlining algorithm and disabling this option will generate a
    smaller kernel there."

    This contradicts other parts of the help text and my own tests:

    5463127 2008-10-11 19:51 vmlinux.no-opt
    5456152 2008-10-11 19:56 vmlinux.opt

    Reword text to say that enabling OPTIMIZE_INLINING will lead to smaller
    kernels with gcc 4.x or later.

    Signed-off-by: Sitsofe Wheeler
    Signed-off-by: Ingo Molnar

    Sitsofe Wheeler
     

22 Oct, 2008

1 commit