1. 23 11月, 2005 2 次提交
    • J
      [PATCH] uml: eliminate use of libc PAGE_SIZE · aa1a64ee
      Jeff Dike 提交于
      On some systems, libc PAGE_SIZE calls getpagesize, which can't happen from a
      stub.  So, I use UM_KERN_PAGE_SIZE, which is less variable in its definition,
      instead.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      aa1a64ee
    • J
      [PATCH] uml: eliminate use of local in clone stub · 39d730ab
      Jeff Dike 提交于
      We have a bug in the i386 stub_syscall6 which pushes ebp before the system
      call and pops it afterwards.  Because we use syscall6 to remap the stack, the
      old contents of the stack (and the former value of ebp) are no longer
      available.  Some versions of gcc make from a real local, accessed through ebp,
      despite my efforts to make it obvious that references to from are really
      constants.  This patch attempts to make it even more obvious by eliminating
      from and using a macro to access the stub's data explicitly with constants.
      
      My original thinking on this was to replace syscall6 with a remap_stack
      interface which saved ebp someplace and restored it afterwards.  The problem
      is that there are no registers to put it in, except for esp.  That could work,
      since we can store a constant in esp after the mmap because we just replaced
      the stack.  However, this approach seems a tad cleaner.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      39d730ab
  2. 08 7月, 2005 1 次提交
    • B
      [PATCH] uml: Proper clone support for skas0 · 9786a8f3
      Bodo Stroesser 提交于
      This patch implements the clone-stub mechanism, which allows skas0 to run
      with proc_mm==0, even if the clib in UML uses modify_ldt.
      
      Note: There is a bug in skas3.v7 host patch, that avoids UML-skas from
      running properly on a SMP-box.  In full skas3, I never really saw problems,
      but in skas0 they showed up.
      
      More commentary by jdike - What this patch does is makes sure that the host
      parent of each new host process matches the UML parent of the corresponding
      UML process.  This ensures that any changed LDTs are inherited.  This is
      done by having clone actually called by the UML process from its stub,
      rather than by the kernel.  We have special syscall stubs that are loaded
      onto the stub code page because that code must be completely
      self-contained.  These stubs are given C interfaces, and used like normal C
      functions, but there are subtleties.  Principally, we have to be careful
      about stack variables in stub_clone_handler after the clone.  The code is
      written so that there aren't any - everything boils down to a fixed
      address.  If there were any locals, references to them after the clone
      would be wrong because the stack just changed.
      Signed-off-by: NBodo Stroesser <bstroesser@fujitsu-siemens.com>
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9786a8f3