1. 24 9月, 2015 1 次提交
    • R
      ARM: alignment: fix alignment handling for uaccess changes · 274e91b8
      Russell King 提交于
      Jonathan Liu reports that the recent addition of CPU_SW_DOMAIN_PAN
      causes wpa_supplicant to die due to the following kernel oops:
      
      Unhandled fault: page domain fault (0x81b) at 0x001017a2
      pgd = ee1b8000
      [001017a2] *pgd=6ebee831, *pte=6c35475f, *ppte=6c354c7f
      Internal error: : 81b [#1] SMP ARM
      Modules linked in: rt2800usb rt2x00usb rt2800librt2x00lib crc_ccitt mac80211
      CPU: 1 PID: 202 Comm: wpa_supplicant Not tainted 4.3.0-rc2 #1
      Hardware name: Allwinner sun7i (A20) Family
      task: ec872f80 ti: ee364000 task.ti: ee364000
      PC is at do_alignment_ldmstm+0x1d4/0x238
      LR is at 0x0
      pc : [<c001d1d8>]    lr : [<00000000>]    psr: 600c0113
      sp : ee365e18  ip : 00000000  fp : 00000002
      r10: 001017a2  r9 : 00000002  r8 : 001017aa
      r7 : ee365fb0  r6 : e8820018  r5 : 001017a2  r4 : 00000003
      r3 : d49e30e0  r2 : 00000000  r1 : ee365fbc  r0 : 00000000
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none[   34.393106] Control: 10c5387d  Table: 6e1b806a  DAC: 00000051
      Process wpa_supplicant (pid: 202, stack limit = 0xee364210)
      Stack: (0xee365e18 to 0xee366000)
      ...
      [<c001d1d8>] (do_alignment_ldmstm) from [<c001d510>] (do_alignment+0x1f0/0x904)
      [<c001d510>] (do_alignment) from [<c00092a0>] (do_DataAbort+0x38/0xb4)
      [<c00092a0>] (do_DataAbort) from [<c0013d7c>] (__dabt_usr+0x3c/0x40)
      Exception stack(0xee365fb0 to 0xee365ff8)
      5fa0:                                     00000000 56c728c0 001017a2 d49e30e0
      5fc0: 775448d2 597d4e74 00200800 7a9e1625 00802001 00000021 b6deec84 00000100
      5fe0: 08020200 be9f4f20 0c0b0d0a b6d9b3e0 600c0010 ffffffff
      Code: e1a0a005 e1a0000c 1affffe8 e5913000 (e4ea3001)
      ---[ end trace 0acd3882fcfdf9dd ]---
      
      This is caused by the alignment handler not being fixed up for the
      uaccess changes, and userspace issuing an unaligned LDM instruction.
      So, fix the problem by adding the necessary fixups.
      Reported-by: NJonathan Liu <net147@gmail.com>
      Tested-by: NJonathan Liu <net147@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      274e91b8
  2. 30 3月, 2015 1 次提交
  3. 21 11月, 2014 1 次提交
  4. 25 9月, 2014 1 次提交
  5. 18 7月, 2014 1 次提交
  6. 02 6月, 2014 4 次提交
  7. 22 5月, 2014 1 次提交
  8. 20 10月, 2013 1 次提交
  9. 26 2月, 2013 1 次提交
    • R
      ARM: fix scheduling while atomic warning in alignment handling code · b255188f
      Russell King 提交于
      Paolo Pisati reports that IPv6 triggers this warning:
      
      BUG: scheduling while atomic: swapper/0/0/0x40000100
      Modules linked in:
      [<c001b1c4>] (unwind_backtrace+0x0/0xf0) from [<c0503c5c>] (__schedule_bug+0x48/0x5c)
      [<c0503c5c>] (__schedule_bug+0x48/0x5c) from [<c0508608>] (__schedule+0x700/0x740)
      [<c0508608>] (__schedule+0x700/0x740) from [<c007007c>] (__cond_resched+0x24/0x34)
      [<c007007c>] (__cond_resched+0x24/0x34) from [<c05086dc>] (_cond_resched+0x3c/0x44)
      [<c05086dc>] (_cond_resched+0x3c/0x44) from [<c0021f6c>] (do_alignment+0x178/0x78c)
      [<c0021f6c>] (do_alignment+0x178/0x78c) from [<c00083e0>] (do_DataAbort+0x34/0x98)
      [<c00083e0>] (do_DataAbort+0x34/0x98) from [<c0509a60>] (__dabt_svc+0x40/0x60)
      Exception stack(0xc0763d70 to 0xc0763db8)
      3d60:                                     e97e805e e97e806e 2c000000 11000000
      3d80: ea86bb00 0000002c 00000011 e97e807e c076d2a8 e97e805e e97e806e 0000002c
      3da0: 3d000000 c0763dbc c04b98fc c02a8490 00000113 ffffffff
      [<c0509a60>] (__dabt_svc+0x40/0x60) from [<c02a8490>] (__csum_ipv6_magic+0x8/0xc8)
      
      Fix this by using probe_kernel_address() stead of __get_user().
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NPaolo Pisati <p.pisati@gmail.com>
      Tested-by: NPaolo Pisati <p.pisati@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b255188f
  10. 01 2月, 2013 1 次提交
  11. 04 11月, 2012 1 次提交
  12. 10 10月, 2012 1 次提交
    • A
      ARM: Fix another build warning in arch/arm/mm/alignment.c · 31d2a638
      Arnd Bergmann 提交于
      One such warning was recently fixed in a761cebf "ARM: Fix build warning
      in arch/arm/mm/alignment.c" but only for the thumb2 case, this fixes
      the other half.
      
      arch/arm/mm/alignment.c: In function 'do_alignment':
      arch/arm/mm/alignment.c:327:15: error: 'offset.un' may be used uninitialized in this function
      arch/arm/mm/alignment.c:748:21: note: 'offset.un' was declared here
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      31d2a638
  13. 16 9月, 2012 1 次提交
    • R
      ARM: Fix build warning in arch/arm/mm/alignment.c · a761cebf
      Russell King 提交于
      Fix this harmless build warning:
      
      arch/arm/mm/alignment.c: In function 'do_alignment':
      arch/arm/mm/alignment.c:749:21: warning: 'offset.un' may be used uninitialized in this function
      
      This is caused by the compiler not being able to properly analyse the
      code to prove that offset.un is assigned in every case.  The case it
      struggles with is where we assign the handler from the Thumb parser -
      do_alignment_t32_to_handler().  As this starts by zeroing this variable
      via a pointer, move it into the calling function.  This fixes the
      warning.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      a761cebf
  14. 29 3月, 2012 2 次提交
  15. 24 3月, 2012 1 次提交
  16. 08 12月, 2011 1 次提交
  17. 02 10月, 2011 1 次提交
  18. 09 8月, 2011 2 次提交
  19. 02 7月, 2011 1 次提交
  20. 23 9月, 2010 1 次提交
    • N
      ARM: 6401/1: plug a race in the alignment trap handler · 2f27bf83
      Nicolas Pitre 提交于
      When the policy for user space is to ignore misaligned accesses from user
      space, the processor then performs a documented rotation on the accessed
      data.  This is the result of the access being trapped, and the kernel
      disabling the alignment trap before returning to user space again.
      
      In kernel space we always want misaligned accesses to be fixed up.  This
      is enforced by always re-enabling the alignment trap on every entry into
      kernel space from user space.  No such re-enabling is performed when an
      exception occurs while already in kernel space as the alignment trap is
      always supposed to be enabled in that case.
      
      There is however a small race window when a misaligned access in user
      space is trapped and the alignment trap disabled, but the CPU didn't
      return to user space just yet.  Any exception would be entered from kernel
      space at that point and the kernel would then execute with the alignment
      trap disabled.
      
      Thanks to Maxime Bizon <mbizon@freebox.fr> for providing a test module
      that made this issue reproducible.
      Signed-off-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      2f27bf83
  21. 27 7月, 2010 3 次提交
  22. 15 5月, 2010 1 次提交
  23. 21 4月, 2010 1 次提交
    • R
      ARM: fix build error in arch/arm/kernel/process.c · 4260415f
      Russell King 提交于
      /tmp/ccJ3ssZW.s: Assembler messages:
      /tmp/ccJ3ssZW.s:1952: Error: can't resolve `.text' {.text section} - `.LFB1077'
      
      This is caused because:
      
      	.section .data
      	.section .text
      	.section .text
      	.previous
      
      does not return us to the .text section, but the .data section; this
      makes use of .previous dangerous if the ordering of previous sections
      is not known.
      
      Fix up the other users of .previous; .pushsection and .popsection are
      a safer pairing to use than .section and .previous.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4260415f
  24. 21 2月, 2010 1 次提交
    • R
      ARM: allow alignment fault mode to be configured at kernel boot · d944d549
      Russell King 提交于
      Some glibc versions intentionally create lots of alignment faults in
      their gconv code, which if not fixed up, results in segfaults during
      boot.  This can prevent systems booting properly.
      
      There is no clear hard-configurable default for this; the desired
      default depends on the nature of the userspace which is going to be
      booted.
      
      So, provide a way for the alignment fault handler to be configured via
      the kernel command line.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d944d549
  25. 16 2月, 2010 1 次提交
  26. 24 7月, 2009 1 次提交
  27. 19 6月, 2009 1 次提交
  28. 07 12月, 2008 1 次提交
  29. 30 11月, 2008 1 次提交
  30. 06 9月, 2008 1 次提交
  31. 20 10月, 2007 1 次提交
  32. 01 6月, 2007 1 次提交
    • Y
      parse errors in ifdefs · f8343685
      Yoann Padioleau 提交于
      Fix various bits of obviously-busted code which we're not happening to
      compile, due to ifdefs.
      
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f8343685
  33. 21 5月, 2007 1 次提交