1. 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
  2. 13 5月, 2008 1 次提交
    • J
      uml: random driver fixes · 5d33e4d7
      Jeff Dike 提交于
      The random driver would essentially hang if the host's /dev/random returned
      -EAGAIN.  There was a test of need_resched followed by a schedule inside the
      loop, but that didn't help and it's the wrong way to work anyway.
      
      The right way is to ask for an interrupt when there is input available from
      the host and handle it then rather than polling.
      
      Now, when the host's /dev/random returns -EAGAIN, the driver asks for a wakeup
      when there's randomness available again and sleeps.  The interrupt routine
      just wakes up whatever processes are sleeping on host_read_wait.
      
      There is an atomic_t, host_sleep_count, which counts the number of processes
      waiting for randomness.  When this reaches zero, the interrupt is disabled.
      
      An added complication is that async I/O notification was only recently added
      to /dev/random (by me), so essentially all hosts will lack it.  So, we use the
      sigio workaround here, which is to have a separate thread poll on the
      descriptor and send an interrupt when there is input on it.  This mechanism is
      activated when a process gets -EAGAIN (activating this multiple times is
      harmless, if a bit wasteful) and deactivated by the last process still
      waiting.
      
      The module name was changed from "random" to "hw_random" in order for udev to
      recognize it.
      
      The sigio workaround needed some changes.  sigio_broken was added for cases
      when we know that async notification doesn't work.  This is now called from
      maybe_sigio_broken, which deals with pts devices.
      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>
      5d33e4d7
  3. 09 2月, 2008 1 次提交
    • 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
  4. 06 2月, 2008 10 次提交
  5. 18 12月, 2007 1 次提交
    • S
      uml: stop gdb from deleting breakpoints when running UML · 4dbed85a
      Stanislaw Gruszka 提交于
      Sometimes when UML is debugged gdb miss breakpoints.
      
      When process traced by gdb do fork, debugger remove breakpoints from
      child address space. There is possibility to trace more than one fork,
      but this not work with UML, I guess (only guess) there is a deadlock -
      gdb waits for UML and UML waits for gdb.
      
      When clone() is called with SIGCHLD and CLONE_VM flags, gdb see this
      as PTRACE_EVENT_FORK not as PTRACE_EVENT_CLONE and remove breakpoints
      from child and at the same time from traced process, because either
      have the same address space.
      
      Maybe it is possible to do fix in gdb, but I'm not sure if there is
      easy way to find out if traced and child processes share memory. So I
      do fix for UML, it simply do not call clone() with both SIGCHLD and
      CLONE_VM flags together.  Additionally __WALL flag is used for
      waitpid() to assure not miss clone and normal process events.
      
      [ jdike - checkpatch fixes ]
      Signed-off-by: NStanislaw Gruszka <stf_xl@wp.pl>
      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>
      4dbed85a
  6. 17 10月, 2007 15 次提交
    • J
      uml: use *SEC_PER_*SEC constants · 1a805219
      Jeff Dike 提交于
      There are various uses of powers of 1000, plus the odd BILLION constant in the
      time code.  However, there are perfectly good definitions of *SEC_PER_*SEC in
      linux/time.h which can be used instaed.
      
      These are replaced directly in kernel code.  Userspace code imports those
      constants as UM_*SEC_PER_*SEC and uses these.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1a805219
    • J
      uml: time build fix · 5f734614
      Jeff Dike 提交于
      Put back an implementation of timeval_to_ns in arch/um/os-Linux/time.c.
      tglx pointed out in his review of tickless support that there was a
      perfectly good implementation of it in linux/time.h.  The problem is that
      this is userspace code which can't pull in kernel headers and there doesn't
      seem to be a libc version.
      
      So, I'm copying the version from linux/time.h rather than resurrecting my
      version.  This causes some declaration changes as it now returns a signed
      value rather than an unsigned value.
      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>
      5f734614
    • J
      uml: eliminate interrupts in the idle loop · b160fb63
      Jeff Dike 提交于
      Now, the idle loop now longer needs SIGALRM firing - it can just sleep for the
      requisite amount of time and fake a timer interrupt when it finishes.
      
      Any use of ITIMER_REAL now goes away.  disable_timer only turns off
      ITIMER_VIRTUAL.  switch_timers is no longer needed, so it, and all calls, goes
      away.
      
      disable_timer now returns the amount of time remaining on the timer.
      default_idle uses this to tell idle_sleep how long to sleep.  idle_sleep will
      call alarm_handler if nanosleep returns 0, which is the case if it didn't
      return early due to an interrupt.  Otherwise, it just returns.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b160fb63
    • J
      uml: tickless support · d2753a6d
      Jeff Dike 提交于
      Enable tickless support.
      
      CONFIG_TICK_ONESHOT and CONFIG_NO_HZ are enabled.
      
      itimer_clockevent gets CLOCK_EVT_FEAT_ONESHOT and an implementation of
      .set_next_event.
      
      CONFIG_UML_REAL_TIME_CLOCK goes away because it only makes sense when there is
      a clock ticking away all the time.  timer_handler now just calls do_IRQ once
      without trying to figure out how many ticks to emulate.
      
      The idle loop now needs to turn ticking on and off.
      
      Userspace ticks keep happening as usual.  However, the userspace loop keep
      track of when the next wakeup should happen and suppresses process ticks until
      that happens.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d2753a6d
    • J
      uml: separate timer initialization · 78a26e25
      Jeff Dike 提交于
      Move timer signal initialization from init_irq_signals to a new function,
      timer_init.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      78a26e25
    • J
      uml: simplify interval setting · a2f018bf
      Jeff Dike 提交于
      set_interval took a timer type as an argument, but it always specified a
      virtual timer.  So, it is not needed, and it is gone, and set_interval is
      simplified appropriately.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a2f018bf
    • J
      uml: fix timer switching · 181bde80
      Jeff Dike 提交于
      Fix up the switching between virtual and real timers.  The idle loop sleeps,
      so the timer at that point must be real time.  At all other times, the timer
      must be virtual.  Even when userspace is running, and the kernel is asleep,
      the virtual timer is correct because the process timer will be running and the
      process timer will be firing.
      
      The timer switch used to be in the context switch and timer handler code.
      This is moved to the idle loop and the signal handler, making it much more
      clear why it is happening.
      
      switch_timers now returns the old timer type so that it may be restored.  The
      signal handler uses this in order to restore the previous timer type when it
      returns.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      181bde80
    • J
      uml: userspace files should call libc directly · 512b6fb1
      Jeff Dike 提交于
      A number of files that were changed in the recent removal of tt mode
      are userspace files which call the os_* wrappers instead of calling
      libc directly.  A few other files were affected by this, through
      
      This patch makes these call glibc directly.
      
      There are also style fixes in the affected areas.
      
      os_print_error has no remaining callers, so it is deleted.
      
      There is a interface change to os_set_exec_close, eliminating a
      parameter which was always the same.  The callers are fixed as well.
      
      os_process_pc got its error path cleaned up.
      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>
      512b6fb1
    • J
      uml: remove os_* usage from userspace files · 8ca842c4
      Jeff Dike 提交于
      This patch fixes some userspace files which were calling libc through the os_*
      wrappers.
      
      It turns out that there was only one user of os_new_tty_pgrp, so it can be
      deleted.
      
      There are also some style and whitespace fixes in here.
      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>
      8ca842c4
    • J
      uml: get rid of do_longjmp · fab95c55
      Jeff Dike 提交于
      do_longjmp used to be needed when UML didn't have its own implementation of
      setjmp and longjmp.  They came from libc, and couldn't be called directly from
      kernel code, as the libc jmp_buf couldn't be imported there.  do_longjmp was a
      userspace function which served to provide longjmp access to kernel code.
      
      This is gone, and a number of void * pointers can now be jmp_buf *.
      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>
      fab95c55
    • J
      uml: style fixes pass 3 · ba180fd4
      Jeff Dike 提交于
      Formatting changes in the files which have been changed in the course
      of folding foo_skas functions into their callers.  These include:
      	copyright updates
      	header file trimming
      	style fixes
      	adding severity to printks
      
      These changes should be entirely non-functional.
      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>
      ba180fd4
    • J
      uml: remove code made redundant by CHOOSE_MODE removal · 77bf4400
      Jeff Dike 提交于
      This patch makes a number of simplifications enabled by the removal of
      CHOOSE_MODE.  There were lots of functions that looked like
      
      	int foo(args){
      		foo_skas(args);
      	}
      
      The bodies of foo_skas are now folded into foo, and their declarations (and
      sometimes entire header files) are deleted.
      
      In addition, the union uml_pt_regs, which was a union between the tt and skas
      register formats, is now a struct, with the tt-mode arm of the union being
      removed.
      
      It turns out that usr2_handler was unused, so it is gone.
      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>
      77bf4400
    • J
      uml: throw out CONFIG_MODE_TT · 42fda663
      Jeff Dike 提交于
      This patchset throws out tt mode, which has been non-functional for a while.
      
      This is done in phases, interspersed with code cleanups on the affected files.
      
      The removal is done as follows:
      	remove all code, config options, and files which depend on
      CONFIG_MODE_TT
      	get rid of the CHOOSE_MODE macro, which decided whether to
      call tt-mode or skas-mode code, and replace invocations with their
      skas portions
      	replace all now-trivial procedures with their skas equivalents
      
      There are now a bunch of now-redundant pieces of data structures, including
      mode-specific pieces of the thread structure, pt_regs, and mm_context.  These
      are all replaced with their skas-specific contents.
      
      As part of the ongoing style compliance project, I made a style pass over all
      files that were changed.  There are three such patches, one for each phase,
      covering the files affected by that phase but no later ones.
      
      I noticed that we weren't freeing the LDT state associated with a process when
      it exited, so that's fixed in one of the later patches.
      
      The last patch is a tidying patch which I've had for a while, but which caused
      inexplicable crashes under tt mode.  Since that is no longer a problem, this
      can now go in.
      
      This patch:
      
      Start getting rid of tt mode support.
      
      This patch throws out CONFIG_MODE_TT and all config options, code, and files
      which depend on it.
      
      CONFIG_MODE_SKAS is gone and everything that depends on it is included
      unconditionally.
      
      The few changed lines are in re-written Kconfig help, lines which needed
      something skas-related removed from them, and a few more which weren't
      strictly deletions.
      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>
      42fda663
    • J
      uml: stop saving process FP state · 42daba31
      Jeff Dike 提交于
      Throw out a lot of code dealing with saving and restoring floating-point
      state.  In skas mode, where processes run in a restoring floating-point state
      on kernel entry and exit is pointless.
      
      This eliminates most of arch/um/os-Linux/sys-{i386,x86_64}/registers.c.  Most
      of what remained is now arch-indpendent, and can be moved up to
      arch/um/os-Linux/registers.c.  Both arches need the jmp_buf accessor
      get_thread_reg, and i386 needs {save,restore}_fp_regs because it cheats during
      sigreturn by getting the fp state using ptrace rather than copying it out of
      the process sigcontext.
      
      After this, it turns out that arch/um/include/skas/mode-skas.h is almost
      completely unneeded.  The declarations in it are variables which either don't
      exist or which don't have global scope.  The one exception is
      kill_off_processes_skas.  If that's removed, this header can be deleted.
      
      This uncovered a bug in user.h, which wasn't correctly making sure that a
      size_t definition was available to both userspace and kernelspace files.
      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>
      42daba31
    • J
      uml: tidy recently-moved code · 8e2d10e1
      Jeff Dike 提交于
      Now that the generic console operations are in a userspace file, we
      can do the following:
      	directly call into libc instead of through the os_* wrappers
      	eliminate os_window_size since it has only one user
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8e2d10e1
  7. 17 7月, 2007 1 次提交
  8. 11 5月, 2007 1 次提交
  9. 08 5月, 2007 7 次提交
    • J
      uml: more page fault path trimming · 16dd07bc
      Jeff Dike 提交于
      More trimming of the page fault path.
      
      Permissions are passed around in a single int rather than one bit per
      int.  The permission values are copied from libc so that they can be
      passed to mmap and mprotect without any further conversion.
      
      The register sets used by do_syscall_stub and copy_context_skas0 are
      initialized once, at boot time, rather than once per call.
      
      wait_stub_done checks whether it is getting the signals it expects by
      comparing the wait status to a mask containing bits for the signals of
      interest rather than comparing individually to the signal numbers.  It
      also has one check for a wait failure instead of two.  The caller is
      expected to do the initial continue of the stub.  This gets rid of an
      argument and some logic.  The fname argument is gone, as that can be
      had from a stack trace.
      
      user_signal() is collapsed into userspace() as it is basically one or
      two lines of code afterwards.
      
      The physical memory remapping stuff is gone, as it is unused.
      
      flush_tlb_page is inlined.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      16dd07bc
    • J
      uml: speed page fault path · 64f60841
      Jeff Dike 提交于
      Give the page fault code a specialized path.  There is only one page to look
      at, so there's no point in going into the general page table walking code.
      There's only going to be one host operation, so there are no opportunities for
      merging.  So, we go straight to the pte we want, figure out what needs doing,
      and do it.
      
      While I was in here, I fixed the wart where the address passed to unmap was a
      void *, but an unsigned long to map and protect.
      
      This gives me just under 10% on a kernel build.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      64f60841
    • J
      uml: rename os_{read_write}_file_k back to os_{read_write}_file · a6ea4cce
      Jeff Dike 提交于
      Rename os_{read_write}_file_k back to os_{read_write}_file, delete
      the originals and their bogus infrastructure, and fix all the callers.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a6ea4cce
    • J
      uml: dump core on panic · 63843c26
      Jeff Dike 提交于
      Dump core after a panic.  This will provide better debugging information than
      is currently available.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      63843c26
    • J
      uml: start fixing os_read_file and os_write_file · 3d564047
      Jeff Dike 提交于
      This patch starts the removal of a very old, very broken piece of code.  This
      stems from the problem of passing a userspace buffer into read() or write() on
      the host.  If that buffer had not yet been faulted in, read and write will
      return -EFAULT.
      
      To avoid this problem, the solution was to fault the buffer in before the
      system call by touching the pages that hold the buffer by doing a copy-user of
      a byte to each page.  This is obviously bogus, but it does usually work, in tt
      mode, since the kernel and process are in the same address space and userspace
      addresses can be accessed directly in the kernel.
      
      In skas mode, where the kernel and process are in separate address spaces, it
      is completely bogus because the userspace address, which is invalid in the
      kernel, is passed into the system call instead of the corresponding physical
      address, which would be valid.  Here, it appears that this code, on every host
      read() or write(), tries to fault in a random process page.  This doesn't seem
      to cause any correctness problems, but there is a performance impact.  This
      patch, and the ones following, result in a 10-15% performance gain on a kernel
      build.
      
      This code can't be immediately tossed out because when it is, you can't log
      in.  Apparently, there is some code in the console driver which depends on
      this somehow.
      
      However, we can start removing it by switching the code which does I/O using
      kernel addresses to using plain read() and write().  This patch introduces
      os_read_file_k and os_write_file_k for use with kernel buffers and converts
      all call locations which use obvious kernel buffers to use them.  These
      include I/O using buffers which are local variables which are on the stack or
      kmalloc-ed.  Later patches will handle the less obvious cases, followed by a
      mass conversion back to the original interface.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3d564047
    • J
      uml: move remaining useful contents of user_util.h · 24fa6c08
      Jeff Dike 提交于
      Rescue the useful contents of the soon-to-be-gone user-util.h.
      
      pty.c now gets ptsname from stdlib.h like it should have always done.
      
      CATCH_EINTR is now in os.h, although perhaps all usage should be under
      os-Linux at some point.
      
      get_pty is also in os.h.
      
      This patch restores the old definition of ARRAY_SIZE in user.h.  This file is
      included only in userspace files, so there will be no conflict with the
      kernel's new ARRAY_SIZE.  The copy of the kernel's ARRAY_SIZE and associated
      infrastructure is now gone.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      24fa6c08
    • J
      uml: host_info tidying · b4ffb6ad
      Jeff Dike 提交于
      Move the host_info string from util.c to um_arch.c, where it is
      actually initialized and used.  Also document its lack of locking.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b4ffb6ad
  10. 08 3月, 2007 1 次提交
  11. 12 2月, 2007 1 次提交
    • J
      [PATCH] uml: x86_64 thread fixes · f355559c
      Jeff Dike 提交于
      x86_64 needs some TLS fixes.  What was missing was remembering the child
      thread id during clone and stuffing it into the child during each context
      switch.
      
      The %fs value is stored separately in the thread structure since the host
      controls what effect it has on the actual register file.  The host also needs
      to store it in its own thread struct, so we need the value kept outside the
      register file.
      
      arch_prctl_skas was fixed to call PTRACE_ARCH_PRCTL appropriately.  There is
      some saving and restoring of registers in the ARCH_SET_* cases so that the
      correct set of registers are changed on the host and restored to the process
      when it runs again.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f355559c