1. 19 3月, 2014 1 次提交
  2. 14 3月, 2014 1 次提交
  3. 13 3月, 2014 1 次提交
  4. 12 3月, 2014 4 次提交
    • A
      x86: bpf_jit: support negative offsets · fdfaf64e
      Alexei Starovoitov 提交于
      Commit a998d434 claimed to introduce negative offset support to x86 jit,
      but it couldn't be working, since at the time of the execution
      of LD+ABS or LD+IND instructions via call into
      bpf_internal_load_pointer_neg_helper() the %edx (3rd argument of this func)
      had junk value instead of access size in bytes (1 or 2 or 4).
      
      Store size into %edx instead of %ecx (what original commit intended to do)
      
      Fixes: a998d434 ("bpf jit: Let the x86 jit handle negative offsets")
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Cc: Jan Seiffert <kaffeemonster@googlemail.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fdfaf64e
    • V
      cpufreq: SPEAr: Instantiate as platform_driver · 2449d33a
      Viresh Kumar 提交于
      As multiplatform build is being adopted by more and more
      ARM platforms, initcall function should be used very carefully.
      For example, when SPEAr cpufreq driver is enabled on a kernel
      booted on a non-SPEAr board, we will get following boot time error:
      
      	spear_cpufreq: Invalid cpufreq_tbl
      
      To eliminate this undesired the effect, the patch changes SPEAr
      driver to have it instantiated as a platform_driver. Then it will
      only run on platforms that create the platform_device "spear-cpufreq".
      
      This patch also creates platform node for SPEAr13xx boards.
      Reported-by: NJosh Cartwright <joshc@codeaurora.org>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2449d33a
    • S
      x86, fpu: Check tsk_used_math() in kernel_fpu_end() for eager FPU · 731bd6a9
      Suresh Siddha 提交于
      For non-eager fpu mode, thread's fpu state is allocated during the first
      fpu usage (in the context of device not available exception). This
      (math_state_restore()) can be a blocking call and hence we enable
      interrupts (which were originally disabled when the exception happened),
      allocate memory and disable interrupts etc.
      
      But the eager-fpu mode, call's the same math_state_restore() from
      kernel_fpu_end(). The assumption being that tsk_used_math() is always
      set for the eager-fpu mode and thus avoid the code path of enabling
      interrupts, allocating fpu state using blocking call and disable
      interrupts etc.
      
      But the below issue was noticed by Maarten Baert, Nate Eldredge and
      few others:
      
      If a user process dumps core on an ecrypt fs while aesni-intel is loaded,
      we get a BUG() in __find_get_block() complaining that it was called with
      interrupts disabled; then all further accesses to our ecrypt fs hang
      and we have to reboot.
      
      The aesni-intel code (encrypting the core file that we are writing) needs
      the FPU and quite properly wraps its code in kernel_fpu_{begin,end}(),
      the latter of which calls math_state_restore(). So after kernel_fpu_end(),
      interrupts may be disabled, which nobody seems to expect, and they stay
      that way until we eventually get to __find_get_block() which barfs.
      
      For eager fpu, most the time, tsk_used_math() is true. At few instances
      during thread exit, signal return handling etc, tsk_used_math() might
      be false.
      
      In kernel_fpu_end(), for eager-fpu, call math_state_restore()
      only if tsk_used_math() is set. Otherwise, don't bother. Kernel code
      path which cleared tsk_used_math() knows what needs to be done
      with the fpu state.
      Reported-by: NMaarten Baert <maarten-baert@hotmail.com>
      Reported-by: NNate Eldredge <nate@thatsmathematics.com>
      Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NSuresh Siddha <sbsiddha@gmail.com>
      Link: http://lkml.kernel.org/r/1391410583.3801.6.camel@europa
      Cc: George Spelvin <linux@horizon.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      731bd6a9
    • D
      x86: Remove CONFIG_X86_OOSTORE · 09df7c4c
      Dave Jones 提交于
      This was an optimization that made memcpy type benchmarks a little
      faster on ancient (Circa 1998) IDT Winchip CPUs.  In real-life
      workloads, it wasn't even noticable, and I doubt anyone is running
      benchmarks on 16 year old silicon any more.
      
      Given this code has likely seen very little use over the last decade,
      let's just remove it.
      Signed-off-by: NDave Jones <davej@fedoraproject.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09df7c4c
  5. 11 3月, 2014 3 次提交
  6. 08 3月, 2014 6 次提交
  7. 07 3月, 2014 3 次提交
    • A
      powerpc: Align p_dyn, p_rela and p_st symbols · a5b2cf5b
      Anton Blanchard 提交于
      The 64bit relocation code places a few symbols in the text segment.
      These symbols are only 4 byte aligned where they need to be 8 byte
      aligned. Add an explicit alignment.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Cc: stable@vger.kernel.org
      Tested-by: NLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a5b2cf5b
    • M
      powerpc/tm: Fix crash when forking inside a transaction · 621b5060
      Michael Neuling 提交于
      When we fork/clone we currently don't copy any of the TM state to the new
      thread.  This results in a TM bad thing (program check) when the new process is
      switched in as the kernel does a tmrechkpt with TEXASR FS not set.  Also, since
      R1 is from userspace, we trigger the bad kernel stack pointer detection.  So we
      end up with something like this:
      
         Bad kernel stack pointer 0 at c0000000000404fc
         cpu 0x2: Vector: 700 (Program Check) at [c00000003ffefd40]
             pc: c0000000000404fc: restore_gprs+0xc0/0x148
             lr: 0000000000000000
             sp: 0
            msr: 9000000100201030
           current = 0xc000001dd1417c30
           paca    = 0xc00000000fe00800   softe: 0        irq_happened: 0x01
             pid   = 0, comm = swapper/2
         WARNING: exception is not recoverable, can't continue
      
      The below fixes this by flushing the TM state before we copy the task_struct to
      the clone.  To do this we go through the tmreclaim patch, which removes the
      checkpointed registers from the CPU and transitions the CPU out of TM suspend
      mode.  Hence we need to call tmrechkpt after to restore the checkpointed state
      and the TM mode for the current task.
      
      To make this fail from userspace is simply:
      	tbegin
      	li	r0, 2
      	sc
      	<boom>
      
      Kudos to Adhemerval Zanella Neto for finding this.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      cc: Adhemerval Zanella Neto <azanella@br.ibm.com>
      cc: stable@vger.kernel.org
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      621b5060
    • P
      x86, trace: Further robustify CR2 handling vs tracing · d4078e23
      Peter Zijlstra 提交于
      Building on commit 0ac09f9f ("x86, trace: Fix CR2 corruption when
      tracing page faults") this patch addresses another few issues:
      
       - Now that read_cr2() is lifted into trace_do_page_fault(), we should
         pass the address to trace_page_fault_entries() to avoid it
         re-reading a potentially changed cr2.
      
       - Put both trace_do_page_fault() and trace_page_fault_entries() under
         CONFIG_TRACING.
      
       - Mark both fault entry functions {,trace_}do_page_fault() as notrace
         to avoid getting __mcount or other function entry trace callbacks
         before we've observed CR2.
      
       - Mark __do_page_fault() as noinline to guarantee the function tracer
         does get to see the fault.
      
      Cc: <jolsa@redhat.com>
      Cc: <vincent.weaver@maine.edu>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20140306145300.GO9987@twins.programming.kicks-ass.netSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      d4078e23
  8. 05 3月, 2014 3 次提交
    • J
      x86, trace: Fix CR2 corruption when tracing page faults · 0ac09f9f
      Jiri Olsa 提交于
      The trace_do_page_fault function trigger tracepoint
      and then handles the actual page fault.
      
      This could lead to error if the tracepoint caused page
      fault. The original cr2 value gets lost and the original
      page fault handler kills current process with SIGSEGV.
      
      This happens if you record page faults with callchain
      data, the user part of it will cause tracepoint handler
      to page fault:
      
        # perf record -g -e exceptions:page_fault_user ls
      
      Fixing this by saving the original cr2 value
      and using it after tracepoint handler is done.
      
      v2: Moving the cr2 read before exception_enter, because
          it could trigger tracepoint as well.
      Reported-by: NArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Reported-by: NVince Weaver <vincent.weaver@maine.edu>
      Tested-by: NVince Weaver <vincent.weaver@maine.edu>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1402211701380.6395@vincent-weaver-1.um.maine.edu
      Link: http://lkml.kernel.org/r/20140228160526.GD1133@krava.brq.redhat.com
      0ac09f9f
    • B
      x86/efi: Quirk out SGI UV · a5d90c92
      Borislav Petkov 提交于
      Alex reported hitting the following BUG after the EFI 1:1 virtual
      mapping work was merged,
      
       kernel BUG at arch/x86/mm/init_64.c:351!
       invalid opcode: 0000 [#1] SMP
       Call Trace:
        [<ffffffff818aa71d>] init_extra_mapping_uc+0x13/0x15
        [<ffffffff818a5e20>] uv_system_init+0x22b/0x124b
        [<ffffffff8108b886>] ? clockevents_register_device+0x138/0x13d
        [<ffffffff81028dbb>] ? setup_APIC_timer+0xc5/0xc7
        [<ffffffff8108b620>] ? clockevent_delta2ns+0xb/0xd
        [<ffffffff818a3a92>] ? setup_boot_APIC_clock+0x4a8/0x4b7
        [<ffffffff8153d955>] ? printk+0x72/0x74
        [<ffffffff818a1757>] native_smp_prepare_cpus+0x389/0x3d6
        [<ffffffff818957bc>] kernel_init_freeable+0xb7/0x1fb
        [<ffffffff81535530>] ? rest_init+0x74/0x74
        [<ffffffff81535539>] kernel_init+0x9/0xff
        [<ffffffff81541dfc>] ret_from_fork+0x7c/0xb0
        [<ffffffff81535530>] ? rest_init+0x74/0x74
      
      Getting this thing to work with the new mapping scheme would need more
      work, so automatically switch to the old memmap layout for SGI UV.
      Acked-by: NRuss Anderson <rja@sgi.com>
      Cc: Alex Thorlton <athorlton@sgi.com
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      a5d90c92
    • M
      c6x: fix build failure caused by cache.h · ae72758f
      Mark Salter 提交于
      A patch to linux/irqflags.h uncovered a problem with c6x asm/cache.h
      which causes a build failure:
      
      /arch/c6x/include/asm/cache.h:63:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c6x_cache_init’
       extern void __init c6x_cache_init(void);
      
      The asm/cache.h was relying on linux/irqflags.h to pull in linux/init.h
      but the recent patch changed that. The c6x header should have included
      linux/init.h all along.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      ae72758f
  9. 04 3月, 2014 1 次提交
  10. 03 3月, 2014 2 次提交
    • U
      ARM: XEN depends on having a MMU · 7693decc
      Uwe Kleine-König 提交于
      arch/arm/xen/enlighten.c (and maybe others) use MMU-specific functions
      like pte_mkspecial which are only available on MMU builds. So let XEN
      depend on MMU.
      Suggested-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Acked-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      7693decc
    • M
      ARM: dts: omap3-gta04: Add ti,omap36xx to compatible property to avoid problems with booting · ae41a303
      Marek Belisko 提交于
      Without that change booting leads to crash with more warnings like below:
      [    0.284454] omap_hwmod: uart4: cannot clk_get main_clk uart4_fck
      [    0.284484] omap_hwmod: uart4: cannot _init_clocks
      [    0.284484] ------------[ cut here ]------------
      [    0.284545] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2543 _init+0x300/0x3e4()
      [    0.284545] omap_hwmod: uart4: couldn't init clocks
      [    0.284576] Modules linked in:
      [    0.284606] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.13.0-next-20140124-00020-gd2aefec-dirty #26
      [    0.284637] [<c00151c0>] (unwind_backtrace) from [<c0011e20>] (show_stack+0x10/0x14)
      [    0.284667] [<c0011e20>] (show_stack) from [<c0568544>] (dump_stack+0x7c/0x94)
      [    0.284729] [<c0568544>] (dump_stack) from [<c003ff94>] (warn_slowpath_common+0x6c/0x90)
      [    0.284729] [<c003ff94>] (warn_slowpath_common) from [<c003ffe8>] (warn_slowpath_fmt+0x30/0x40)
      [    0.284759] [<c003ffe8>] (warn_slowpath_fmt) from [<c07d1be8>] (_init+0x300/0x3e4)
      [    0.284790] [<c07d1be8>] (_init) from [<c07d217c>] (__omap_hwmod_setup_all+0x40/0x8c)
      [    0.284820] [<c07d217c>] (__omap_hwmod_setup_all) from [<c0008918>] (do_one_initcall+0xe8/0x14c)
      [    0.284851] [<c0008918>] (do_one_initcall) from [<c07c5c18>] (kernel_init_freeable+0x104/0x1c8)
      [    0.284881] [<c07c5c18>] (kernel_init_freeable) from [<c0563524>] (kernel_init+0x8/0x118)
      [    0.284912] [<c0563524>] (kernel_init) from [<c000e368>] (ret_from_fork+0x14/0x2c)
      [    0.285064] ---[ end trace 63de210ad43b627d ]---
      
      Reference:
      https://lkml.org/lkml/2013/10/8/553Signed-off-by: NMarek Belisko <marek@goldelico.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ae41a303
  11. 01 3月, 2014 4 次提交
  12. 28 2月, 2014 11 次提交