1. 03 2月, 2015 3 次提交
  2. 30 1月, 2015 1 次提交
    • L
      vm: add VM_FAULT_SIGSEGV handling support · 33692f27
      Linus Torvalds 提交于
      The core VM already knows about VM_FAULT_SIGBUS, but cannot return a
      "you should SIGSEGV" error, because the SIGSEGV case was generally
      handled by the caller - usually the architecture fault handler.
      
      That results in lots of duplication - all the architecture fault
      handlers end up doing very similar "look up vma, check permissions, do
      retries etc" - but it generally works.  However, there are cases where
      the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV.
      
      In particular, when accessing the stack guard page, libsigsegv expects a
      SIGSEGV.  And it usually got one, because the stack growth is handled by
      that duplicated architecture fault handler.
      
      However, when the generic VM layer started propagating the error return
      from the stack expansion in commit fee7e49d ("mm: propagate error
      from stack expansion even for guard page"), that now exposed the
      existing VM_FAULT_SIGBUS result to user space.  And user space really
      expected SIGSEGV, not SIGBUS.
      
      To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those
      duplicate architecture fault handlers about it.  They all already have
      the code to handle SIGSEGV, so it's about just tying that new return
      value to the existing code, but it's all a bit annoying.
      
      This is the mindless minimal patch to do this.  A more extensive patch
      would be to try to gather up the mostly shared fault handling logic into
      one generic helper routine, and long-term we really should do that
      cleanup.
      
      Just from this patch, you can generally see that most architectures just
      copied (directly or indirectly) the old x86 way of doing things, but in
      the meantime that original x86 model has been improved to hold the VM
      semaphore for shorter times etc and to handle VM_FAULT_RETRY and other
      "newer" things, so it would be a good idea to bring all those
      improvements to the generic case and teach other architectures about
      them too.
      Reported-and-tested-by: NTakashi Iwai <tiwai@suse.de>
      Tested-by: NJan Engelhardt <jengelh@inai.de>
      Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # "s390 still compiles and boots"
      Cc: linux-arch@vger.kernel.org
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      33692f27
  3. 11 1月, 2015 1 次提交
    • G
      m68k: Wire up execveat · f27bd5bf
      Geert Uytterhoeven 提交于
      Check success of execveat(3, '../execveat', 0)... [OK]
      Check success of execveat(5, 'execveat', 0)... [OK]
      Check success of execveat(6, 'execveat', 0)... [OK]
      Check success of execveat(-100, '/root/selftest-exec/exec/execveat', 0)... [OK]
      Check success of execveat(99, '/root/selftest-exec/exec/execveat', 0)... [OK]
      Check success of execveat(8, '', 4096)... [OK]
      Check success of execveat(17, '', 4096)... [OK]
      Check success of execveat(9, '', 4096)... [OK]
      Check success of execveat(14, '', 4096)... [OK]
      Check success of execveat(14, '', 4096)... [OK]
      Check success of execveat(15, '', 4096)... [OK]
      Check failure of execveat(8, '', 0) with ENOENT... [OK]
      Check failure of execveat(8, '(null)', 4096) with EFAULT... [OK]
      Check success of execveat(5, 'execveat.symlink', 0)... [OK]
      Check success of execveat(6, 'execveat.symlink', 0)... [OK]
      Check success of execveat(-100, '/root/selftest-exec/...xec/execveat.symlink', 0)... [OK]
      Check success of execveat(10, '', 4096)... [OK]
      Check success of execveat(10, '', 4352)... [OK]
      Check failure of execveat(5, 'execveat.symlink', 256) with ELOOP... [OK]
      Check failure of execveat(6, 'execveat.symlink', 256) with ELOOP... [OK]
      Check failure of execveat(-100, '/root/selftest-exec/exec/execveat.symlink', 256) with ELOOP... [OK]
      Check success of execveat(3, '../script', 0)... [OK]
      Check success of execveat(5, 'script', 0)... [OK]
      Check success of execveat(6, 'script', 0)... [OK]
      Check success of execveat(-100, '/root/selftest-exec/exec/script', 0)... [OK]
      Check success of execveat(13, '', 4096)... [OK]
      Check success of execveat(13, '', 4352)... [OK]
      Check failure of execveat(18, '', 4096) with ENOENT... [OK]
      Check failure of execveat(7, 'script', 0) with ENOENT... [OK]
      Check success of execveat(16, '', 4096)... [OK]
      Check success of execveat(16, '', 4096)... [OK]
      Check success of execveat(4, '../script', 0)... [OK]
      Check success of execveat(4, 'script', 0)... [OK]
      Check success of execveat(4, '../script', 0)... [OK]
      Check failure of execveat(4, 'script', 0) with ENOENT... [OK]
      Check failure of execveat(5, 'execveat', 65535) with EINVAL... [OK]
      Check failure of execveat(5, 'no-such-file', 0) with ENOENT... [OK]
      Check failure of execveat(6, 'no-such-file', 0) with ENOENT... [OK]
      Check failure of execveat(-100, 'no-such-file', 0) with ENOENT... [OK]
      Check failure of execveat(5, '', 4096) with EACCES... [OK]
      Check failure of execveat(5, 'Makefile', 0) with EACCES... [OK]
      Check failure of execveat(11, '', 4096) with EACCES... [OK]
      Check failure of execveat(12, '', 4096) with EACCES... [OK]
      Check failure of execveat(99, '', 4096) with EBADF... [OK]
      Check failure of execveat(99, 'execveat', 0) with EBADF... [OK]
      Check failure of execveat(8, 'execveat', 0) with ENOTDIR... [OK]
      Invoke copy of 'execveat' via filename of length 4093:
      Check success of execveat(19, '', 4096)... [OK]
      Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
      Invoke copy of 'script' via filename of length 4093:
      Check success of execveat(20, '', 4096)... [OK]
      Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      f27bd5bf
  4. 11 12月, 2014 1 次提交
  5. 20 11月, 2014 4 次提交
  6. 10 11月, 2014 1 次提交
  7. 27 10月, 2014 1 次提交
  8. 21 10月, 2014 1 次提交
  9. 10 10月, 2014 1 次提交
  10. 03 10月, 2014 3 次提交
  11. 29 9月, 2014 11 次提交
    • G
      m68k: AMIGA_BUILTIN_SERIAL should depend on TTY · 2c8faf3d
      Geert Uytterhoeven 提交于
      If CONFIG_TTY=n:
      
      drivers/built-in.o: In function `rs_flush_buffer':
      amiserial.c:(.text+0x1f626): undefined reference to `tty_wakeup'
      drivers/built-in.o: In function `transmit_chars':
      amiserial.c:(.text+0x1f6c8): undefined reference to `tty_wakeup'
      drivers/built-in.o: In function `change_speed':
      amiserial.c:(.text+0x1f80a): undefined reference to `tty_termios_baud_rate'
      amiserial.c:(.text+0x1f88c): undefined reference to `tty_termios_baud_rate'
      drivers/built-in.o: In function `check_modem_status':
      amiserial.c:(.text+0x1faa6): undefined reference to `tty_hangup'
      amiserial.c:(.text+0x1faec): undefined reference to `tty_wakeup'
      drivers/built-in.o: In function `get_serial_info':
      amiserial.c:(.text+0x1fb88): undefined reference to `tty_lock'
      amiserial.c:(.text+0x1fbc0): undefined reference to `tty_unlock'
      drivers/built-in.o: In function `rs_open':
      amiserial.c:(.text+0x1fdc6): undefined reference to `tty_port_block_til_ready'
      drivers/built-in.o: In function `set_serial_info':
      amiserial.c:(.text+0x1fe0c): undefined reference to `tty_lock'
      amiserial.c:(.text+0x1fea0): undefined reference to `tty_unlock'
      amiserial.c:(.text+0x1fed0): undefined reference to `tty_unlock'
      amiserial.c:(.text+0x1ffaa): undefined reference to `tty_unlock'
      drivers/built-in.o: In function `receive_chars':
      amiserial.c:(.text+0x2005c): undefined reference to `do_SAK'
      amiserial.c:(.text+0x200e0): undefined reference to `tty_insert_flip_string_flags'
      amiserial.c:(.text+0x2013c): undefined reference to `tty_insert_flip_string_flags'
      amiserial.c:(.text+0x20148): undefined reference to `tty_flip_buffer_push'
      drivers/built-in.o: In function `rs_close':
      amiserial.c:(.text+0x20744): undefined reference to `tty_port_close_start'
      amiserial.c:(.text+0x2078a): undefined reference to `tty_ldisc_flush'
      amiserial.c:(.text+0x20798): undefined reference to `tty_port_close_end'
      drivers/built-in.o: In function `amiga_serial_probe':
      amiserial.c:(.init.text+0x96a): undefined reference to `__tty_alloc_driver'
      amiserial.c:(.init.text+0x9c0): undefined reference to `tty_std_termios'
      amiserial.c:(.init.text+0x9e6): undefined reference to `tty_set_operations'
      amiserial.c:(.init.text+0xa3e): undefined reference to `tty_port_init'
      amiserial.c:(.init.text+0xa5c): undefined reference to `tty_port_link_device'
      amiserial.c:(.init.text+0xa6c): undefined reference to `tty_register_driver'
      amiserial.c:(.init.text+0xb4a): undefined reference to `tty_unregister_driver'
      amiserial.c:(.init.text+0xb58): undefined reference to `tty_port_destroy'
      amiserial.c:(.init.text+0xb64): undefined reference to `put_tty_driver'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2c8faf3d
    • P
      m68k: Fix typo 'COFNIG_MBAR' · e803d4bd
      Paul Bolle 提交于
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      e803d4bd
    • G
      m68knommu: add missing ioport_map() and ioport_unmap() · f89487ad
      Greg Ungerer 提交于
      Add the missing ioport_map() and ioport_unmap() functions for the
      non-MMU platforms.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      f89487ad
    • F
      m68k/coldfire: remove second asm/mcfclk.h inclusion in m54xx.c · 1089c552
      Fabian Frederick 提交于
      asm/mcfclk.h was included twice.
      Signed-off-by: NFabian Frederick <fabf@skynet.be>
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      1089c552
    • G
      m68knommu: fix size of address field for 5272 interrupt controller · ecb6bdcd
      Greg Ungerer 提交于
      Picked up by the 0-day buidler:
      
      All warnings:
      >> arch/m68k/coldfire/intc-5272.c:46:20: warning: large integer implicitly truncated to unsigned type [-Woverflow]
           /*MCF_IRQ_EINT1*/ { .icr = MCFSIM_ICR1, .index = 28, .ack = 1, },
      ...
      
      The problem stems from the changes to make all ColdFire register addresses
      absolute, in commit d72a5abb ("make remaining ColdFire 5272 register
      definitions absolute"). That change did not take into account that the
      addresses were stored as offsets in the irqmap of the intc-5272.c code.
      Make the field that now stores register addresses big enough to hold
      addresses.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      ecb6bdcd
    • G
      m68k: fix crufty 68000 and 68360 intro comments · 6f4a8856
      Greg Ungerer 提交于
      Quite a few of the non-mmu specific support files have a pathname in the
      title comments of the file. These files have moved around a bit over the
      years, and most are no longer accurate. Remove the pathname and fix the
      comments to include at least a short description of the files contents.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      6f4a8856
    • G
      m68k: remove the unused arch/m68k/platform directory · d3a887cc
      Greg Ungerer 提交于
      The non-mmu platform/machine directories have been move up one level.
      We no longer need arch/m68k/platform, or its Makefile, so remove them.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      d3a887cc
    • G
      m68k: move non-mmu 68360 platform code · 3ba885f5
      Greg Ungerer 提交于
      The non-mmu 68360 specific code is inconsistently placed under a directory
      named "platform". Move it to arch/m68k/ along with the other platform and
      board directories.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      3ba885f5
    • G
      m68k: move non-mmu 68000 platform code · 18cb3faf
      Greg Ungerer 提交于
      The non-mmu 68000 specific code is inconsistently placed under a directory
      named "platform". Move it to arch/m68k/ along with the other platform and
      machine directories.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      18cb3faf
    • G
      m68k: fix crufty ColdFire intro comments · ece9ae65
      Greg Ungerer 提交于
      Quite a few of the ColdFire specific support files have a pathname in the
      title comments of the file. These files have moved around a bit over the
      years, and most are no longer accurate. Remove the pathname and fix the
      comments to include at least a short description of the files contents.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      ece9ae65
    • G
      m68k: move coldfire platform code · f86b9e03
      Greg Ungerer 提交于
      Move the m68k ColdFire platform support code directory to be with the
      existing m68k platforms. Although the ColdFire is not a platform as such,
      we have always kept all its support together. No reason to change that
      as this time.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      f86b9e03
  12. 28 9月, 2014 2 次提交
    • G
      m68k: AMIGA_BUILTIN_SERIAL should depend on TTY · fd4d453b
      Geert Uytterhoeven 提交于
      If CONFIG_TTY=n:
      
      drivers/built-in.o: In function `rs_flush_buffer':
      amiserial.c:(.text+0x1f626): undefined reference to `tty_wakeup'
      drivers/built-in.o: In function `transmit_chars':
      amiserial.c:(.text+0x1f6c8): undefined reference to `tty_wakeup'
      drivers/built-in.o: In function `change_speed':
      amiserial.c:(.text+0x1f80a): undefined reference to `tty_termios_baud_rate'
      amiserial.c:(.text+0x1f88c): undefined reference to `tty_termios_baud_rate'
      drivers/built-in.o: In function `check_modem_status':
      amiserial.c:(.text+0x1faa6): undefined reference to `tty_hangup'
      amiserial.c:(.text+0x1faec): undefined reference to `tty_wakeup'
      drivers/built-in.o: In function `get_serial_info':
      amiserial.c:(.text+0x1fb88): undefined reference to `tty_lock'
      amiserial.c:(.text+0x1fbc0): undefined reference to `tty_unlock'
      drivers/built-in.o: In function `rs_open':
      amiserial.c:(.text+0x1fdc6): undefined reference to `tty_port_block_til_ready'
      drivers/built-in.o: In function `set_serial_info':
      amiserial.c:(.text+0x1fe0c): undefined reference to `tty_lock'
      amiserial.c:(.text+0x1fea0): undefined reference to `tty_unlock'
      amiserial.c:(.text+0x1fed0): undefined reference to `tty_unlock'
      amiserial.c:(.text+0x1ffaa): undefined reference to `tty_unlock'
      drivers/built-in.o: In function `receive_chars':
      amiserial.c:(.text+0x2005c): undefined reference to `do_SAK'
      amiserial.c:(.text+0x200e0): undefined reference to `tty_insert_flip_string_flags'
      amiserial.c:(.text+0x2013c): undefined reference to `tty_insert_flip_string_flags'
      amiserial.c:(.text+0x20148): undefined reference to `tty_flip_buffer_push'
      drivers/built-in.o: In function `rs_close':
      amiserial.c:(.text+0x20744): undefined reference to `tty_port_close_start'
      amiserial.c:(.text+0x2078a): undefined reference to `tty_ldisc_flush'
      amiserial.c:(.text+0x20798): undefined reference to `tty_port_close_end'
      drivers/built-in.o: In function `amiga_serial_probe':
      amiserial.c:(.init.text+0x96a): undefined reference to `__tty_alloc_driver'
      amiserial.c:(.init.text+0x9c0): undefined reference to `tty_std_termios'
      amiserial.c:(.init.text+0x9e6): undefined reference to `tty_set_operations'
      amiserial.c:(.init.text+0xa3e): undefined reference to `tty_port_init'
      amiserial.c:(.init.text+0xa5c): undefined reference to `tty_port_link_device'
      amiserial.c:(.init.text+0xa6c): undefined reference to `tty_register_driver'
      amiserial.c:(.init.text+0xb4a): undefined reference to `tty_unregister_driver'
      amiserial.c:(.init.text+0xb58): undefined reference to `tty_port_destroy'
      amiserial.c:(.init.text+0xb64): undefined reference to `put_tty_driver'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      fd4d453b
    • G
      m68k: Add missing ioport_unmap() · a000dfc2
      Geert Uytterhoeven 提交于
      drivers/net/ethernet/cirrus/cs89x0.c: In function ‘cs89x0_ioport_probe’:
      drivers/net/ethernet/cirrus/cs89x0.c:1629: error: implicit declaration of function ‘ioport_unmap’
      
      Add the missing ioport_unmap() implementation, and convert ioport_map()
      from a macro to a static inline function while we're at it (both copied
      from asm-generic).
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      a000dfc2
  13. 14 9月, 2014 2 次提交
    • G
      m68k/atari - stram: Add missing #include <linux/ioport.h> · 9aa59cac
      Geert Uytterhoeven 提交于
      If CONFIG_BLOCK=n:
      
      arch/m68k/atari/stram.c:44: error: variable ‘stram_pool’ has initializer but incomplete type
      arch/m68k/atari/stram.c:45: error: unknown field ‘name’ specified in initializer
      arch/m68k/atari/stram.c:46: warning: excess elements in struct initializer
      arch/m68k/atari/stram.c:46: warning: (near initialization for ‘stram_pool’)
      arch/m68k/atari/stram.c: In function ‘atari_stram_reserve_pages’:
      arch/m68k/atari/stram.c:97: error: invalid use of undefined type ‘struct resource’
      ...
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      9aa59cac
    • P
      irq_work: Introduce arch_irq_work_has_interrupt() · c5c38ef3
      Peter Zijlstra 提交于
      The nohz full code needs irq work to trigger its own interrupt so that
      the subsystem can work even when the tick is stopped.
      
      Lets introduce arch_irq_work_has_interrupt() that archs can override to
      tell about their support for this ability.
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      c5c38ef3
  14. 01 9月, 2014 3 次提交
  15. 30 8月, 2014 1 次提交
  16. 14 8月, 2014 1 次提交
  17. 09 8月, 2014 1 次提交
    • V
      kexec: load and relocate purgatory at kernel load time · 12db5562
      Vivek Goyal 提交于
      Load purgatory code in RAM and relocate it based on the location.
      Relocation code has been inspired by module relocation code and purgatory
      relocation code in kexec-tools.
      
      Also compute the checksums of loaded kexec segments and store them in
      purgatory.
      
      Arch independent code provides this functionality so that arch dependent
      bootloaders can make use of it.
      
      Helper functions are provided to get/set symbol values in purgatory which
      are used by bootloaders later to set things like stack and entry point of
      second kernel etc.
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: WANG Chao <chaowang@redhat.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      12db5562
  18. 06 8月, 2014 2 次提交