1. 01 4月, 2009 1 次提交
  2. 13 3月, 2009 1 次提交
  3. 05 12月, 2008 1 次提交
  4. 23 10月, 2008 2 次提交
  5. 17 10月, 2008 1 次提交
  6. 25 7月, 2008 1 次提交
  7. 13 6月, 2008 2 次提交
  8. 07 6月, 2008 4 次提交
  9. 22 5月, 2008 1 次提交
  10. 13 5月, 2008 6 次提交
  11. 28 4月, 2008 2 次提交
  12. 27 4月, 2008 1 次提交
  13. 24 2月, 2008 1 次提交
    • J
      uml: fix FP register corruption · 2f56debd
      Jeff Dike 提交于
      Commit ee3d9bd4 ("uml: simplify SIGSEGV
      handling"), while greatly simplifying the kernel SIGSEGV handler that
      runs in the process address space, introduced a bug which corrupts FP
      state in the process.
      
      Previously, the SIGSEGV handler called the sigreturn system call by hand - it
      couldn't return through the restorer provided to it because that could try to
      call the libc restorer which likely wouldn't exist in the process address
      space.  So, it blocked off some signals, including SIGUSR1, on entry to the
      SIGSEGV handler, queued a SIGUSR1 to itself, and invoked sigreturn.  The
      SIGUSR1 was delivered, and was visible to the UML kernel after sigreturn
      finished.
      
      The commit eliminated the signal masking and the call to sigreturn.  The
      handler simply hits itself with a SIGTRAP to let the UML kernel know that it
      is finished.  UML then restores the process registers, which effectively
      longjmps the process out of the signal handler, skipping sigreturn's restoring
      of register state and the signal mask.
      
      The bug is that the host apparently sets used_fp to 0 when it saves the
      process FP state in the sigcontext on the process signal stack.  Thus, when
      the process is longjmped out of the handler, its FP state is corrupt because
      it wasn't saved on the context switch to the UML kernel.
      
      This manifested itself as sleep hanging.  For some reason, sleep uses floating
      point in order to calculate the sleep interval.  When a page fault corrupts
      its FP state, it is faked into essentially sleeping forever.
      
      This patch saves the FP state before entering the SIGSEGV handler and restores
      it afterwards.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2f56debd
  14. 09 2月, 2008 3 次提交
    • J
      uml: improved error handling while locating temp dir · 11a7ac23
      Jim Meyering 提交于
      * arch/um/os-Linux/mem.c (make_tempfile): Don't deref NULL upon failed malloc.
      
      * arch/um/os-Linux/mem.c (make_tempfile): Handle NULL tempdir.
      Don't let a long tempdir (e.g., via TMPDIR) provoke heap corruption.
      
      [ jdike - formatting cleanups, deleted obsolete comment ]
      Signed-off-by: NJim Meyering <meyering@redhat.com>
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      11a7ac23
    • J
      uml: style fixes in arch/um/os-Linux · 5134d8fe
      Jeff Dike 提交于
      Style changes under arch/um/os-Linux:
      	include trimming
      	CodingStyle fixes
      	some printks needed severity indicators
      
      make_tempfile turns out not to be used outside of mem.c, so it is now static.
      Its declaration in tempfile.h is no longer needed, and tempfile.h itself is no
      longer needed.
      
      create_tmp_file was also made static.
      
      checkpatch moans about an EXPORT_SYMBOL in user_syms.c which is part of a
      macro definition - this is copying a bit of kernel infrastructure into the
      libc side of UML because the kernel headers can't be included there.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5134d8fe
    • J
      uml: runtime host VMSPLIT detection · 536788fe
      Jeff Dike 提交于
      Calculate TASK_SIZE at run-time by figuring out the host's VMSPLIT - this is
      needed on i386 if UML is to run on hosts with varying VMSPLITs without
      recompilation.
      
      TASK_SIZE is now defined in terms of a variable, task_size.  This gets rid of
      an include of pgtable.h from processor.h, which can cause include loops.
      
      On i386, task_size is calculated early in boot by probing the address space in
      a binary search to figure out where the boundary between usable and non-usable
      memory is.  This tries to make sure that a page that is considered to be in
      userspace is, or can be made, read-write.  I'm concerned about a system-global
      VDSO page in kernel memory being hit and considered to be a userspace page.
      
      On x86_64, task_size is just the old value of CONFIG_TOP_ADDR.
      
      A bunch of config variable are gone now.  CONFIG_TOP_ADDR is directly replaced
      by TASK_SIZE.  NEST_LEVEL is gone since the relocation of the stubs makes it
      irrelevant.  All the HOST_VMSPLIT stuff is gone.  All references to these in
      arch/um/Makefile are also gone.
      
      I noticed and fixed a missing extern in os.h when adding os_get_task_size.
      
      Note: This has been revised to fix the 32-bit UML on 64-bit host bug that
      Miklos ran into.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      536788fe
  15. 06 2月, 2008 13 次提交