1. 21 10月, 2006 2 次提交
  2. 12 10月, 2006 2 次提交
  3. 02 10月, 2006 1 次提交
    • A
      [PATCH] Remove the use of _syscallX macros in UML · 5f4c6bc1
      Arnd Bergmann 提交于
      User mode linux uses _syscallX() to call into the host kernel.  The
      recommended way to do this is to use the syscall() function from libc.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5f4c6bc1
  4. 30 9月, 2006 1 次提交
  5. 27 9月, 2006 3 次提交
    • J
      [PATCH] uml: thread creation tidying · 3c917350
      Jeff Dike 提交于
      fork on UML has always somewhat subtle.  The underlying cause has been the
      need to initialize a stack for the new process.  The only portable way to
      initialize a new stack is to set it as the alternate signal stack and take a
      signal.  The signal handler does whatever initialization is needed and jumps
      back to the original stack, where the fork processing is finished.  The basic
      context switching mechanism is a jmp_buf for each process.  You switch to a
      new process by longjmping to its jmp_buf.
      
      Now that UML has its own implementation of setjmp and longjmp, and I can poke
      around inside a jmp_buf without fear that libc will change the structure, a
      much simpler mechanism is possible.  The jmpbuf can simply be initialized by
      hand.
      
      This eliminates -
      	the need to set up and remove the alternate signal stack
      	sending and handling a signal
      	the signal blocking needed around the stack switching, since
      there is no stack switching
      	setting up the jmp_buf needed to jump back to the original
      stack after the new one is set up
      
      In addition, since jmp_buf is now defined by UML, and not by libc, it can be
      embedded in the thread struct.  This makes it unnecessary to have it exist on
      the stack, where it used to be.  It also simplifies interfaces, since the
      switch jmp_buf used to be a void * inside the thread struct, and functions
      which took it as an argument needed to define a jmp_buf variable and assign it
      from the void *.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3c917350
    • J
      [PATCH] uml: mark some tt-mode code · 0915ee38
      Jeff Dike 提交于
      Mark a symbol and file as being tt-mode only.  This shrinks the binary
      slightly when tt mode support is compiled out and makes it easier to identity
      stuff when tt mode is removed.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0915ee38
    • J
      [PATCH] uml: const more data · 5e7672ec
      Jeff Dike 提交于
      Make lots of structures const in order to make it obvious that they need no
      locking.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5e7672ec
  6. 26 9月, 2006 8 次提交
    • J
      [PATCH] uml: stack usage reduction · 75e29b18
      Jeff Dike 提交于
      The KSTK_* macros used an inordinate amount of stack.  In order to overcome
      an impedance mismatch between their interface, which just returns a single
      register value, and the interface of get_thread_regs, which took a full
      pt_regs, the implementation created an on-stack pt_regs, filled it in, and
      returned one field.  do_task_stat calls KSTK_* twice, resulting in two
      local pt_regs, blowing out the stack.
      
      This patch changes the interface (and name) of get_thread_regs to just
      return a single register from a jmp_buf.
      
      The include of archsetjmp.h" in registers.h to get the definition of
      jmp_buf exposed a bogus include of <setjmp.h> in start_up.c.  <setjmp.h>
      shouldn't be used anywhere any more since UML uses the klibc
      setjmp/longjmp.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      75e29b18
    • J
      [PATCH] uml: Remove unused variable · 602cc241
      Jeff Dike 提交于
      timer_irq_inited was useless, so it is removed.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      602cc241
    • J
      [PATCH] uml: timer cleanups · 537ae946
      Jeff Dike 提交于
      set_interval returns an error instead of panicing if setitimer fails.  Some of
      its callers now check the return.
      
      enable_timer is largely tt-mode-specific, so it is marked as such, and the
      only skas-mode caller is made to call set-interval instead.
      
      user_time_init was a no-value-added wrapper around set_interval, so it is
      gone.
      
      Since set_interval is now called from kernel code, callers no longer pass
      ITIMER_* to it.  Instead, they pass a flag which is converted into ITIMER_REAL
      or ITIMER_VIRTUAL.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      537ae946
    • J
      [PATCH] uml: Move signal handlers to arch code · 4b84c69b
      Jeff Dike 提交于
      Have most signals go through an arch-provided handler which recovers the
      sigcontext and then calls a generic handler.  This replaces the
      ARCH_GET_SIGCONTEXT macro, which was somewhat fragile.  On x86_64, recovering
      %rdx (which holds the sigcontext pointer) must be the first thing that
      happens.  sig_handler duly invokes that first, but there is no guarantee that
      I can see that instructions won't be reordered such that %rdx is used before
      that.  Having the arch provide the handler seems much more robust.
      
      Some signals in some parts of UML require their own handlers - these places
      don't call set_handler any more.  They call sigaction or signal themselves.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4b84c69b
    • J
      [PATCH] uml: SIGIO cleanups · 19bdf040
      Jeff Dike 提交于
      - Various cleanups in the sigio code.
      
      - Removed explicit zero-initializations of a few structures.
      
      - Improved some error messages.
      
      - An API change - there was an asymmetry between reactivate_fd calling
        maybe_sigio_broken, which goes through all the machinery of figuring out if
        a file descriptor supports SIGIO and applying the workaround to it if not,
        and deactivate_fd, which just turns off the descriptor.
      
        This is changed so that only activate_fd calls maybe_sigio_broken, when
        the descriptor is first seen.  reactivate_fd now calls add_sigio_fd, which
        is symmetric with ignore_sigio_fd.
      
        This removes a recursion which makes a critical section look more critical
        than it really was, obsoleting a big comment to that effect.  This requires
        keeping track of all descriptors which are getting the SIGIO treatment, not
        just the ones being polled at any given moment, so that reactivate_fd,
        through add_sigio_fd, doesn't try to tell the SIGIO thread about descriptors
        it doesn't care about.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      19bdf040
    • J
      [PATCH] uml: Fix handling of failed execs of helpers · 6b7aaad9
      Jeff Dike 提交于
      There were some bugs in handling failures to exec helper programs.  errno was
      passed back from the child with the wrong sign.  It was also ignored.  In the
      case where it mattered, the errno from the (successful) read in the parent was
      used 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>
      6b7aaad9
    • J
      [PATCH] uml: Use ARRAY_SIZE more assiduously · 91b165c0
      Jeff Dike 提交于
      There were a bunch of missed ARRAY_SIZE opportunities.
      
      Also, some formatting fixes in the affected areas of code.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      91b165c0
    • J
      [PATCH] uml: Use klibc setjmp/longjmp · 13c06be3
      Jeff Dike 提交于
      This patch adds an implementation of setjmp and longjmp to UML, allowing
      access to the inside of a jmpbuf without needing the access macros formerly
      provided by libc.
      
      The implementation is stolen from klibc.  I copy the relevant files into
      arch/um.  I have another patch which avoids the copying, but requires klibc be
      in the tree.
      
      setjmp and longjmp users required some tweaking.  Includes of <setjmp.h> were
      removed and includes of the UML longjmp.h were added where necessary.  There
      are also replacements of siglongjmp with UML_LONGJMP which I somehow missed
      earlier.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      13c06be3
  7. 15 7月, 2006 1 次提交
  8. 11 7月, 2006 9 次提交
  9. 02 7月, 2006 2 次提交
    • P
      [PATCH] uml: rename and improve actually_do_remove() · eb28931e
      Paolo 'Blaisorblade' Giarrusso 提交于
      Rename actually_do_remove() to remove_files_and_dir(), make it call
      closedir(), make it ignore ENOENT (I see it frequently enough).
      
      ENOENT is probably due to multiple threads calling the exitcall functions
      together*, but fixing that is non-trivial; and ignoring it is perfectly ok
      in any case.
      
      * it can surely happen: last_ditch_exit() is installed as SIGTERM handler
        at boot, and it's not removed on thread creation.  So killall vmlinux
        (which I do) surely causes that.  I've seen also a crash which seems to
        do the same.
      
      Installing the handler on only the main thread would make UML do no cleanup
      when another thread exits, and we're not sure we want that.  And mutual
      exclusion in that context is tricky - we can't use spinlock in code not on
      a kernel stack (spinlock debugging uses "current" a lot).
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      eb28931e
    • P
      [PATCH] uml: fix not_dead_yet when directory is in bad state · 912ad922
      Paolo 'Blaisorblade' Giarrusso 提交于
      The bug occurred to me when a UML left an empty ~/.uml/Sarge-norm folder -
      when trying to reuse not_dead_yet() failed one of its check.  The comment
      says that's ok and means that we can take the directory, but while normally
      not_dead_yet() removes it and returns 0 (i.e.  go on, use this), on failure
      it returns 0 but forgets to remove it.  The fix is to remove it anytime
      we're going to return 0.
      
      But since "not_dead_yet" didn't make the interface so clear, causing this
      bug, and I couldn't find a convenient name for the mix of things it did, I
      split it into two parts:
      
      is_umdir_used()      -	returns a boolean, contains all checks of not_dead_yet()
      umdir_take_if_dead   -	tries to remove the dir unless it's used - returns
      			whether it removed it, that is we now own it.
      
      With this changes the control flow is IMHO a bit clearer and needs less
      comment for control flow.
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      912ad922
  10. 01 7月, 2006 2 次提交
  11. 06 6月, 2006 2 次提交
  12. 02 5月, 2006 5 次提交
  13. 20 4月, 2006 2 次提交