1. 12 2月, 2017 1 次提交
  2. 25 12月, 2016 1 次提交
  3. 30 9月, 2016 1 次提交
  4. 08 8月, 2016 1 次提交
    • G
      m68knommu: fix user a5 register being overwritten · 0b980271
      Greg Ungerer 提交于
      On no-MMU systems the application a5 register can be overwitten with the
      address of the process data segment when processing application signals.
      For flat format applications compiled with full absolute relocation this
      effectively corrupts the a5 register on signal processing - and this very
      quickly leads to process crash and often takes out the whole system with
      a panic as well.
      
      This has no effect on flat format applications compiled with the more
      common PIC methods (such as -msep-data). These format applications reserve
      a5 for the pointer to the data segment anyway - so it doesn't change it.
      
      A long time ago the a5 register was used in the code packed into the user
      stack to enable signal return processing. And so it had to be restored on
      end of signal cleanup processing back to the original a5 user value. This
      was historically done by saving away a5 in the sigcontext structure. At
      some point (a long time back it seems) the a5 restore process was changed
      and it was hard coded to put the user data segment address directly into a5.
      Which is ok for the common PIC compiled application case, but breaks the
      full relocation application code.
      
      We no longer use this type of signal handling mechanism and so we don't
      need to do anything special to save and restore a5 at all now. So remove the
      code that hard codes a5 to the address of the user data segment.
      Signed-off-by: NGreg Ungerer <gerg@linux-m68k.org>
      0b980271
  5. 29 2月, 2016 1 次提交
    • G
      m68k: Use conventional function parameters for do_sigreturn · a9551799
      Greg Ungerer 提交于
      Create conventional stack parameters for the calls to do_sigreturn and
      do_rt_sigreturn. The current C code for do_sigreturn and do_rt_sigreturn
      dig into the stack to create local pointers to the saved switch stack
      and the pt_regs structs.
      
      The motivation for this change is a problem with non-MMU targets that
      have broken signal return paths on newer versions of gcc. It appears as
      though gcc has determined that the pointers into the saved stack structs,
      and the saved structs themselves, are function parameters and updates to
      them will be lost on function return, so they are optimized away. This
      results in large parts of restore_sigcontext() and mangle_kernel_stack()
      functions being removed. Of course this results in non-functional code
      causing kernel oops. This problem has been observed with gcc version
      5.2 and 5.3, and probably exists in earlier versions as well.
      
      Using conventional stack parameter pointers passed to these functions has
      the advantage of the code here not needing to know the exact details of
      how the underlying entry handler layed these structs out on the stack.
      So the rather ugly pointer setup casting and arg referencing can be
      removed.
      
      The resulting code after this change is a few bytes larger (due to the
      overhead of creating the stack args and their tear down). Not being hot
      paths I don't think this is too much of a problem here.
      
      An alternative solution is to put a barrier() in the do_sigreturn() code,
      but this doesn't feel quite as clean as this solution.
      
      This change has been compile tested on all defconfigs, and run tested on
      Atari (through aranym), ColdFire with MMU (M5407EVB) and ColdFire with
      no-MMU (QEMU and M5208EVB).
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NAndreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      a9551799
  6. 13 4月, 2015 1 次提交
  7. 13 2月, 2015 1 次提交
    • A
      all arches, signal: move restart_block to struct task_struct · f56141e3
      Andy Lutomirski 提交于
      If an attacker can cause a controlled kernel stack overflow, overwriting
      the restart block is a very juicy exploit target.  This is because the
      restart_block is held in the same memory allocation as the kernel stack.
      
      Moving the restart block to struct task_struct prevents this exploit by
      making the restart_block harder to locate.
      
      Note that there are other fields in thread_info that are also easy
      targets, at least on some architectures.
      
      It's also a decent simplification, since the restart code is more or less
      identical on all architectures.
      
      [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
      Signed-off-by: NAndy Lutomirski <luto@amacapital.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: David Miller <davem@davemloft.net>
      Acked-by: NRichard Weinberger <richard@nod.at>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Richard Kuo <rkuo@codeaurora.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Chen Liqin <liqin.linux@gmail.com>
      Cc: Lennox Wu <lennox.wu@gmail.com>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f56141e3
  8. 06 8月, 2014 2 次提交
  9. 26 8月, 2013 1 次提交
  10. 04 2月, 2013 3 次提交
  11. 29 11月, 2012 1 次提交
  12. 02 6月, 2012 5 次提交
  13. 24 5月, 2012 1 次提交
  14. 22 5月, 2012 3 次提交
    • A
      m68k: add TIF_NOTIFY_RESUME and handle it. · a54f1655
      Al Viro 提交于
      TIF_NOTIFY_RESUME added (as bit 5).  That way nommu glue needs no changes at
      all; mmu one needs just to replace jmi do_signal_return to jne do_signal_return
      There we have flags shifted up, until bit 6 (SIGPENDING) is in MSBit; instead
      of checking that MSBit is set (jmi) we check that MSBit or something below it
      is set (jne); bits 0..4 are never set, so that's precisely "bit 6 or bit 5 is
      set".
      
      Usual handling of NOTIFY_RESUME/SIGPENDING is done in do_notify_resume(); glue
      calls it instead of do_signal().
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a54f1655
    • M
      m68k: use set_current_blocked() and block_sigmask() · 43a35995
      Matt Fleming 提交于
      As described in e6fa16ab ("signal: sigprocmask() should do
      retarget_shared_pending()") the modification of current->blocked is
      incorrect as we need to check whether the signal we're about to block is
      pending in the shared queue.
      
      Also, use the new helper function introduced in commit 5e6292c0
      ("signal: add block_sigmask() for adding sigmask to current->blocked")
      which centralises the code for updating current->blocked after
      successfully delivering a signal and reduces the amount of duplicate code
      across architectures.  In the past some architectures got this code wrong,
      so using this helper function should stop that from happening again.
      Acked-by: NOleg Nesterov <oleg@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      43a35995
    • A
      new helper: sigsuspend() · 68f3f16d
      Al Viro 提交于
      guts of saved_sigmask-based sigsuspend/rt_sigsuspend.  Takes
      kernel sigset_t *.
      
      Open-coded instances replaced with calling it.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      68f3f16d
  15. 20 5月, 2012 1 次提交
    • G
      m68k: merge the MMU and non-MMU signal.c code · 0c22fafd
      Greg Ungerer 提交于
      The MMU (signal_mm.c) and non-MMU (signal_no.c) versions of the m68k
      architecture signal handling code are very similar. Most of their code is
      the same.
      
      Merge the two back into a single signal.c, and move some of the code around
      inside the file to minimize the number of #ifdefs required. Specificially
      we can group out the CONFIG_FPU and the CONFIG_MMU code. We end up needing
      a few other "#ifdef CONFIG_MMU" as well, but not too many.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      0c22fafd
  16. 25 3月, 2011 1 次提交
    • G
      m68k: merge m68k and m68knommu arch directories · 66d857b0
      Greg Ungerer 提交于
      There is a lot of common code that could be shared between the m68k
      and m68knommu arch branches. It makes sense to merge the two branches
      into a single directory structure so that we can more easily share
      that common code.
      
      This is a brute force merge, based on a script from Stephen King
      <sfking@fdwdc.com>, which was originally written by Arnd Bergmann
      <arnd@arndb.de>.
      
      > The script was inspired by the script Sam Ravnborg used to merge the
      > includes from m68knommu. For those files common to both arches but
      > differing in content, the m68k version of the file is renamed to
      > <file>_mm.<ext> and the m68knommu version of the file is moved into the
      > corresponding m68k directory and renamed <file>_no.<ext> and a small
      > wrapper file <file>.<ext> is used to select between the two version. Files
      > that are common to both but don't differ are removed from the m68knommu
      > tree and files and directories that are unique to the m68knommu tree are
      > moved to the m68k tree. Finally, the arch/m68knommu tree is removed.
      >
      > To select between the the versions of the files, the wrapper uses
      >
      > #ifdef CONFIG_MMU
      > #include <file>_mm.<ext>
      > #else
      > #include <file>_no.<ext>
      > #endif
      
      On top of this file merge I have done a simplistic merge of m68k and
      m68knommu Kconfig, which primarily attempts to keep existing options and
      menus in place. Other than a handful of options being moved it produces
      identical .config outputs on m68k and m68knommu targets I tested it on.
      
      With this in place there is now quite a bit of scope for merge cleanups
      in future patches.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      66d857b0
  17. 17 3月, 2011 1 次提交
  18. 07 1月, 2011 7 次提交
  19. 28 2月, 2010 1 次提交
    • M
      m68k: Define sigcontext ABI of ColdFire · 00ebfe58
      Maxim Kuvyrkov 提交于
      The following patch defines sigcontext ABI of ColdFire.  Due to ISA
      restrictions ColdFire needs different rt_sigreturn trampoline.
      
      And due to ColdFire FP registers being 8-bytes instead of 12-bytes on
      m68k, sigcontext and fpregset structures should be updated.
      
      Regarding the sc_fpstate[16+6*8] field, it would've been enough 16
      bytes to store ColdFire's FP state.  To accomodate GLIBC's libSegFault
      it would'be been enough 6*8 bytes (room for the 6 non-call-clobbered
      FP registers).  I set it to 16+6*8 to provide some extra space for any
      future changes in the ColdFire FPU.
      Signed-off-by: NMaxim Kuvyrkov <maxim@codesourcery.com>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      00ebfe58
  20. 13 1月, 2009 1 次提交
  21. 23 6月, 2006 1 次提交
    • L
      [PATCH] fix incorrect SA_ONSTACK behaviour for 64-bit processes · d09042da
      Laurent MEYER 提交于
      - When setting a sighandler using sigaction() call, if the flag
        SA_ONSTACK is set and no alternate stack is provided via sigaltstack(),
        the kernel still try to install the alternate stack.  This behavior is
        the opposite of the one which is documented in Single Unix Specifications
        V3.
      
      - Also when setting an alternate stack using sigaltstack() with the flag
        SS_DISABLE, the kernel try to install the alternate stack on signal
        delivery.
      
      These two use cases makes the process crash at signal delivery.
      Signed-off-by: NLaurent Meyer <meyerlau@fr.ibm.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d09042da
  22. 13 1月, 2006 1 次提交
  23. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4