1. 11 6月, 2015 1 次提交
  2. 01 6月, 2015 1 次提交
  3. 19 5月, 2015 1 次提交
  4. 14 3月, 2015 1 次提交
  5. 24 10月, 2014 1 次提交
  6. 26 9月, 2014 2 次提交
  7. 12 9月, 2014 1 次提交
    • W
      arm64: flush TLS registers during exec · eb35bdd7
      Will Deacon 提交于
      Nathan reports that we leak TLS information from the parent context
      during an exec, as we don't clear the TLS registers when flushing the
      thread state.
      
      This patch updates the flushing code so that we:
      
        (1) Unconditionally zero the tpidr_el0 register (since this is fully
            context switched for native tasks and zeroed for compat tasks)
      
        (2) Zero the tp_value state in thread_info before clearing the
            tpidrr0_el0 register for compat tasks (since this is only writable
            by the set_tls compat syscall and therefore not fully switched).
      
      A missing compiler barrier is also added to the compat set_tls syscall.
      
      Cc: <stable@vger.kernel.org>
      Acked-by: NNathan Lynch <Nathan_Lynch@mentor.com>
      Reported-by: NNathan Lynch <Nathan_Lynch@mentor.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      eb35bdd7
  8. 08 9月, 2014 1 次提交
    • A
      arm64: convert part of soft_restart() to assembly · 5e051531
      Arun Chandran 提交于
      The current soft_restart() and setup_restart implementations incorrectly
      assume that compiler will not spill/fill values to/from stack. However
      this assumption seems to be wrong, revealed by the disassembly of the
      currently existing code (v3.16) built with Linaro GCC 4.9-2014.05.
      
      ffffffc000085224 <soft_restart>:
      ffffffc000085224:  a9be7bfd  stp    x29, x30, [sp,#-32]!
      ffffffc000085228:  910003fd  mov    x29, sp
      ffffffc00008522c:  f9000fa0  str    x0, [x29,#24]
      ffffffc000085230:  94003d21  bl     ffffffc0000946b4 <setup_mm_for_reboot>
      ffffffc000085234:  94003b33  bl     ffffffc000093f00 <flush_cache_all>
      ffffffc000085238:  94003dfa  bl     ffffffc000094a20 <cpu_cache_off>
      ffffffc00008523c:  94003b31  bl     ffffffc000093f00 <flush_cache_all>
      ffffffc000085240:  b0003321  adrp   x1, ffffffc0006ea000 <reset_devices>
      
      ffffffc000085244:  f9400fa0  ldr    x0, [x29,#24] ----> spilled addr
      ffffffc000085248:  f942fc22  ldr    x2, [x1,#1528] ----> global memstart_addr
      
      ffffffc00008524c:  f0000061  adrp   x1, ffffffc000094000 <__inval_cache_range+0x40>
      ffffffc000085250:  91290021  add    x1, x1, #0xa40
      ffffffc000085254:  8b010041  add    x1, x2, x1
      ffffffc000085258:  d2c00802  mov    x2, #0x4000000000           // #274877906944
      ffffffc00008525c:  8b020021  add    x1, x1, x2
      ffffffc000085260:  d63f0020  blr    x1
      ...
      
      Here the compiler generates memory accesses after the cache is disabled,
      loading stale values for the spilled value and global variable. As we cannot
      control when the compiler will access memory we must rewrite the
      functions in assembly to stash values we need in registers prior to
      disabling the cache, avoiding the use of memory.
      Reviewed-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NArun Chandran <achandran@mvista.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      5e051531
  9. 09 7月, 2014 1 次提交
  10. 17 5月, 2014 2 次提交
    • A
      arm64: Fix deadlock scenario with smp_send_stop() · b9acc49e
      Arun KS 提交于
      If one process calls sys_reboot and that process then stops other
      CPUs while those CPUs are within a spin_lock() region we can
      potentially encounter a deadlock scenario like below.
      
      CPU 0                   CPU 1
      -----                   -----
                              spin_lock(my_lock)
      smp_send_stop()
       <send IPI>             handle_IPI()
                               disable_preemption/irqs
                                while(1);
       <PREEMPT>
      spin_lock(my_lock) <--- Waits forever
      
      We shouldn't attempt to run any other tasks after we send a stop
      IPI to a CPU so disable preemption so that this task runs to
      completion. We use local_irq_disable() here for cross-arch
      consistency with x86.
      Based-on-work-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NArun KS <getarunks@gmail.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      b9acc49e
    • A
      arm64: Fix machine_shutdown() definition · 90f51a09
      Arun KS 提交于
      This patch ports most of commit 19ab428f "ARM: 7759/1: decouple CPU
      offlining from reboot/shutdown" by Stephen Warren from arch/arm to
      arch/arm64.
      
      machine_shutdown() is a hook for kexec. Add a comment saying so, since
      it isn't obvious from the function name.
      
      Halt, power-off, and restart have different requirements re: stopping
      secondary CPUs than kexec has. The former simply require the secondary
      CPUs to be quiesced somehow, whereas kexec requires them to be
      completely non-operational, so that no matter where the kexec target
      images are written in RAM, they won't influence operation of the
      secondary CPUS,which could happen if the CPUs were still executing some
      kind of pin loop. To this end, modify machine_halt, power_off, and
      restart to call smp_send_stop() directly, rather than calling
      machine_shutdown().
      
      In machine_shutdown(), replace the call to smp_send_stop() with a call
      to disable_nonboot_cpus(). This completely disables all but one CPU,
      thus satisfying the kexec requirements a couple paragraphs above.
      Signed-off-by: NArun KS <getarunks@gmail.com>
      Acked-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      90f51a09
  11. 12 5月, 2014 1 次提交
  12. 10 5月, 2014 1 次提交
  13. 08 5月, 2014 1 次提交
    • A
      arm64: add abstractions for FPSIMD state manipulation · c51f9269
      Ard Biesheuvel 提交于
      There are two tacit assumptions in the FPSIMD handling code that will no longer
      hold after the next patch that optimizes away some FPSIMD state restores:
      . the FPSIMD registers of this CPU contain the userland FPSIMD state of
        task 'current';
      . when switching to a task, its FPSIMD state will always be restored from
        memory.
      
      This patch adds the following functions to abstract away from straight FPSIMD
      register file saves and restores:
      - fpsimd_preserve_current_state -> ensure current's FPSIMD state is saved
      - fpsimd_update_current_state -> replace current's FPSIMD state
      
      Where necessary, the signal handling and fork code are updated to use the above
      wrappers instead of poking into the FPSIMD registers directly.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      c51f9269
  14. 26 2月, 2014 1 次提交
    • G
      arm64: Fix the soft_restart routine · 09024aa6
      Geoff Levand 提交于
      Change the soft_restart() routine to call cpu_reset() at its identity mapped
      physical address.
      
      The cpu_reset() routine must be called at its identity mapped physical address
      so that when the MMU is turned off the instruction pointer will be at the correct
      location in physical memory.
      
      Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      09024aa6
  15. 23 2月, 2014 1 次提交
  16. 30 1月, 2014 1 次提交
  17. 20 12月, 2013 1 次提交
  18. 17 12月, 2013 1 次提交
  19. 25 10月, 2013 1 次提交
  20. 20 9月, 2013 1 次提交
  21. 23 7月, 2013 1 次提交
  22. 19 7月, 2013 1 次提交
  23. 08 5月, 2013 1 次提交
  24. 01 5月, 2013 1 次提交
    • T
      dump_stack: unify debug information printed by show_regs() · a43cb95d
      Tejun Heo 提交于
      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:[<ffffffff8234a07e>]  [<ffffffff8234a07e>] 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:
        [<ffffffff81000312>] do_one_initcall+0x122/0x170
        [<ffffffff82335e5d>] kernel_init_freeable+0x9b/0x1c8
        [<ffffffff81c47760>] ? rest_init+0x140/0x140
        [<ffffffff81c4776e>] kernel_init+0xe/0xf0
        [<ffffffff81c6be9c>] ret_from_fork+0x7c/0xb0
        [<ffffffff81c47760>] ? 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: NTejun Heo <tj@kernel.org>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Acked-by: Chris Metcalf <cmetcalf@tilera.com>		[tile bits]
      Acked-by: Richard Kuo <rkuo@codeaurora.org>		[hexagon bits]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a43cb95d
  25. 26 4月, 2013 1 次提交
  26. 17 4月, 2013 1 次提交
  27. 08 4月, 2013 1 次提交
  28. 18 2月, 2013 1 次提交
  29. 12 2月, 2013 1 次提交
  30. 29 11月, 2012 2 次提交
  31. 09 11月, 2012 1 次提交
  32. 23 10月, 2012 1 次提交
  33. 17 10月, 2012 1 次提交
  34. 17 9月, 2012 1 次提交