1. 23 10月, 2008 20 次提交
  2. 25 7月, 2008 2 次提交
  3. 24 7月, 2008 1 次提交
    • J
      UML - Fix boot crash · 7c1fed03
      Jeff Dike 提交于
      My copying of linux/init.h didn't go far enough.  The definition of
      __used singled out gcc minor version 3, but didn't care what the major
      version was.  This broke when unit-at-a-time was added and gcc started
      throwing out initcalls.
      
      This results in an early boot crash when ptrace tries to initialize a
      process with an empty, uninitialized register set.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7c1fed03
  4. 07 6月, 2008 1 次提交
    • T
      uml: deal with inaccessible address space start · 40fb16a3
      Tom Spink 提交于
      This patch makes os_get_task_size locate the bottom of the address space,
      as well as the top.  This is for systems which put a lower limit on mmap
      addresses.  It works by manually scanning pages from zero onwards until a
      valid page is found.
      
      Because the bottom of the address space may not be zero, it's not
      sufficient to assume the top of the address space is the size of the
      address space.  The size is the difference between the top address and
      bottom address.
      
      [jdike@addtoit.com: changed the name to reflect that this function is
      supposed to return the top of the process address space, not its size and
      changed the return value to reflect that.  Also some minor formatting
      changes]
      Signed-off-by: NTom Spink <tspink@gmail.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>
      40fb16a3
  5. 13 5月, 2008 7 次提交
  6. 09 5月, 2008 1 次提交
  7. 28 4月, 2008 2 次提交
  8. 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
  9. 09 2月, 2008 3 次提交
    • J
      uml: fix mm_context memory leak · ac2a6599
      Jeff Dike 提交于
      [ Spotted by Miklos ]
      
      Fix a memory leak in init_new_context.  The struct page ** buffer allocated
      for install_special_mapping was never recorded, and thus leaked when the
      mm_struct was freed.  Fix it by saving the pointer in mm_context_t and freeing
      it in arch_exit_mmap.
      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>
      ac2a6599
    • 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
  10. 06 2月, 2008 2 次提交