1. 11 4月, 2014 1 次提交
  2. 11 1月, 2014 1 次提交
  3. 05 1月, 2014 1 次提交
  4. 29 12月, 2013 1 次提交
    • R
      ARM: make kernel oops easier to read · ef41b5c9
      Russell King 提交于
      We don't need the offset for the first function name in each backtrace
      entry; this needlessly consumes screen space.  This is virtually always
      the first or second instruction in the called function.
      
      Also, recognise stmfd instructions which include r10 as a valid stack
      saving instruction, and when dumping the registers, dump six registers
      per line rather than five, and fix the wrapping.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ef41b5c9
  5. 10 12月, 2013 1 次提交
  6. 19 11月, 2013 1 次提交
  7. 20 10月, 2013 2 次提交
  8. 20 8月, 2013 2 次提交
    • W
      ARM: cacheflush: don't bother rounding to nearest vma · 97c72d89
      Will Deacon 提交于
      do_cache_op finds the lowest VMA contained in the specified address
      range and rounds the range to cover only the mapped addresses.
      
      Since commit 4542b6a0 ("ARM: 7365/1: drop unused parameter from
      flush_cache_user_range") the VMA is not used for anything else in this
      code and seeing as the low-level cache flushing routines return -EFAULT
      if the address is not valid, there is no need for this range truncation.
      
      This patch removes the VMA handling code from the cacheflushing syscall.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      97c72d89
    • W
      ARM: cacheflush: split user cache-flushing into interruptible chunks · 28256d61
      Will Deacon 提交于
      Flushing a large, non-faulting VMA from userspace can potentially result
      in a long time spent flushing the cache line-by-line without preemption
      occurring (in the case of CONFIG_PREEMPT=n).
      
      Whilst this doesn't affect the stability of the system, it can certainly
      affect the responsiveness and CPU availability for other tasks.
      
      This patch splits up the user cacheflush code so that it flushes in
      chunks of a page. After each chunk has been flushed, we may reschedule
      if appropriate and, before processing the next chunk, we allow any
      pending signals to be handled before resuming from where we left off.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      28256d61
  9. 01 8月, 2013 4 次提交
    • R
      ARM: move signal handlers into a vdso-like page · 48be69a0
      Russell King 提交于
      Move the signal handlers into a VDSO page rather than keeping them in
      the vectors page.  This allows us to place them randomly within this
      page, and also map the page at a random location within userspace
      further protecting these code fragments from ROP attacks.  The new
      VDSO page is also poisoned in the same way as the vector page.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      48be69a0
    • R
      ARM: allow kuser helpers to be removed from the vector page · f6f91b0d
      Russell King 提交于
      Provide a kernel configuration option to allow the kernel user helpers
      to be removed from the vector page, thereby preventing their use with
      ROP (return orientated programming) attacks.  This option is only
      visible for CPU architectures which natively support all the operations
      which kernel user helpers would normally provide, and must be enabled
      with caution.
      
      Cc: <stable@vger.kernel.org>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      f6f91b0d
    • R
      ARM: move vector stubs · 19accfd3
      Russell King 提交于
      Move the machine vector stubs into the page above the vector page,
      which we can prevent from being visible to userspace.  Also move
      the reset stub, and place the swi vector at a location that the
      'ldr' can get to it.
      
      This hides pointers into the kernel which could give valuable
      information to attackers, and reduces the number of exploitable
      instructions at a fixed address.
      
      Cc: <stable@vger.kernel.org>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      19accfd3
    • R
      ARM: poison the vectors page · f928d4f2
      Russell King 提交于
      Fill the empty regions of the vectors page with an exception generating
      instruction.  This ensures that any inappropriate branch to the vector
      page is appropriately trapped, rather than just encountering some code
      to execute.  (The vectors page was filled with zero before, which
      corresponds with the "andeq r0, r0, r0" instruction - a no-op.)
      
      Cc: <stable@vger.kernel.org>
      Acked-by Nicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      f928d4f2
  10. 24 6月, 2013 1 次提交
  11. 01 5月, 2013 1 次提交
    • T
      dump_stack: consolidate dump_stack() implementations and unify their behaviors · 196779b9
      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:
        [<ffffffff81c614dc>] dump_stack+0x19/0x1b
        [<ffffffff8108f50f>] warn_slowpath_common+0x7f/0xc0
        [<ffffffff8108f56a>] warn_slowpath_null+0x1a/0x20
        [<ffffffff8234a071>] 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: NTejun Heo <tj@kernel.org>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>	[s390 bits]
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      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>
      196779b9
  12. 18 4月, 2013 1 次提交
  13. 21 1月, 2013 1 次提交
  14. 08 9月, 2012 1 次提交
  15. 31 7月, 2012 1 次提交
    • R
      ARM: Fix undefined instruction exception handling · 15ac49b6
      Russell King 提交于
      While trying to get a v3.5 kernel booted on the cubox, I noticed that
      VFP does not work correctly with VFP bounce handling.  This is because
      of the confusion over 16-bit vs 32-bit instructions, and where PC is
      supposed to point to.
      
      The rule is that FP handlers are entered with regs->ARM_pc pointing at
      the _next_ instruction to be executed.  However, if the exception is
      not handled, regs->ARM_pc points at the faulting instruction.
      
      This is easy for ARM mode, because we know that the next instruction and
      previous instructions are separated by four bytes.  This is not true of
      Thumb2 though.
      
      Since all FP instructions are 32-bit in Thumb2, it makes things easy.
      We just need to select the appropriate adjustment.  Do this by moving
      the adjustment out of do_undefinstr() into the assembly code, as only
      the assembly code knows whether it's dealing with a 32-bit or 16-bit
      instruction.
      
      Cc: <stable@vger.kernel.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      15ac49b6
  16. 28 7月, 2012 1 次提交
  17. 10 7月, 2012 1 次提交
    • R
      ARM: 7424/1: update die handler from x86 · 02df19b4
      Rabin Vincent 提交于
      Robustify ARM's die() handling with improvements from x86:
      
       - Fix for a deadlock (before panic in the case of panic_on_oops) if we
         oops under a spinlock which is also used from interrupt handler,
         since the old code was unconditionally enabling interrupts.
      
       - Usage of arch spinlock so lockdep etc doesn't get involved while
         we're trying to dump out oopses.
      
       - Deadlock prevention in the unlikely event that die() recurses.
      
      The changes all touch the same few lines of code, so they're done
      together in one patch.
      Signed-off-by: NRabin Vincent <rabin.vincent@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      02df19b4
  18. 05 7月, 2012 1 次提交
  19. 22 5月, 2012 1 次提交
  20. 02 5月, 2012 2 次提交
  21. 20 4月, 2012 1 次提交
  22. 29 3月, 2012 1 次提交
  23. 24 3月, 2012 1 次提交
  24. 10 2月, 2012 1 次提交
  25. 23 1月, 2012 1 次提交
  26. 17 10月, 2011 2 次提交
    • S
      ARM: 7017/1: Use generic BUG() handler · 87e040b6
      Simon Glass 提交于
      ARM uses its own BUG() handler which makes its output slightly different
      from other archtectures.
      
      One of the problems is that the ARM implementation doesn't report the function
      with the BUG() in it, but always reports the PC being in __bug(). The generic
      implementation doesn't have this problem.
      
      Currently we get something like:
      
      kernel BUG at fs/proc/breakme.c:35!
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      ...
      PC is at __bug+0x20/0x2c
      
      With this patch it displays:
      
      kernel BUG at fs/proc/breakme.c:35!
      Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP
      ...
      PC is at write_breakme+0xd0/0x1b4
      
      This implementation uses an undefined instruction to implement BUG, and sets up
      a bug table containing the relevant information. Many versions of gcc do not
      support %c properly for ARM (inserting a # when they shouldn't) so we work
      around this using distasteful macro magic.
      
      v1: Initial version to replace existing ARM BUG() implementation with something
      more similar to other architectures.
      
      v2: Add Thumb support, remove backtrace whitespace output changes. Change to
      use macros instead of requiring the asm %d flag to work (thanks to
      Dave Martin <dave.martin@linaro.org>)
      
      v3: Remove old BUG() implementation in favor of this one.
      Remove the Backtrace: message (will submit this separately).
      Use ARM_EXIT_KEEP() so that some architectures can dump exit text at link time
      thanks to Stephen Boyd <sboyd@codeaurora.org> (although since we always
      define GENERIC_BUG this might be academic.)
      Rebase to linux-2.6.git master.
      
      v4: Allow BUGS in modules (these were not reported correctly in v3)
      (thanks to Stephen Boyd <sboyd@codeaurora.org> for suggesting that.)
      Remove __bug() as this is no longer needed.
      
      v5: Add %progbits as the section flags.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
      Tested-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      87e040b6
    • J
      ARM: 7115/4: move __exception and friends to asm/exception.h · 5a567d78
      Jamie Iles 提交于
      The definition of __exception_irq_entry for
      CONFIG_FUNCTION_GRAPH_TRACER=y needs linux/ftrace.h, but this creates a
      circular dependency with it's current home in asm/system.h. Create
      asm/exception.h and update all current users.
      
      v4:	- rebase to rmk/for-next
      v3:	- remove redundant includes of linux/ftrace.h
      v2:	- document the usage restricitions of __exception*
      
      Cc: Zoltan Devai <zdevai@gmail.com>
      Signed-off-by: NJamie Iles <jamie@jamieiles.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5a567d78
  27. 13 9月, 2011 1 次提交
  28. 27 7月, 2011 1 次提交
  29. 14 7月, 2011 1 次提交
  30. 10 6月, 2011 1 次提交
  31. 09 6月, 2011 1 次提交
  32. 14 5月, 2011 1 次提交
  33. 14 4月, 2011 1 次提交