1. 08 5月, 2007 8 次提交
  2. 29 3月, 2007 1 次提交
  3. 28 3月, 2007 1 次提交
    • J
      [PATCH] uml: use correct register file size everywhere · b92c4f92
      Jeff Dike 提交于
      This patch uses MAX_REG_NR consistently to refer to the register file size.
       FRAME_SIZE isn't sufficient because on x86_64, it is smaller than the
      ptrace register file size.  MAX_REG_NR was introduced as a consistent way
      to get the number of registers, but wasn't used everywhere it should be.
      
      When this causes a problem, it makes PTRACE_SETREGS fail on x86_64 because
      of a corrupted segment register value in the known-good register file.  The
      patch also adds a register dump at that point in case there are any future
      problems here.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b92c4f92
  4. 08 3月, 2007 1 次提交
  5. 13 2月, 2007 2 次提交
  6. 12 2月, 2007 16 次提交
  7. 14 12月, 2006 1 次提交
  8. 09 12月, 2006 1 次提交
    • A
      [PATCH] tty: switch to ktermios · 606d099c
      Alan Cox 提交于
      This is the grungy swap all the occurrences in the right places patch that
      goes with the updates.  At this point we have the same functionality as
      before (except that sgttyb() returns speeds not zero) and are ready to
      begin turning new stuff on providing nobody reports lots of bugs
      
      If you are a tty driver author converting an out of tree driver the only
      impact should be termios->ktermios name changes for the speed/property
      setting functions from your upper layers.
      
      If you are implementing your own TCGETS function before then your driver
      was broken already and its about to get a whole lot more painful for you so
      please fix it 8)
      
      Also fill in c_ispeed/ospeed on init for most devices, although the current
      code will do this for you anyway but I'd like eventually to lose that extra
      paranoia
      
      [akpm@osdl.org: bluetooth fix]
      [mp3@de.ibm.com: sclp fix]
      [mp3@de.ibm.com: warning fix for tty3270]
      [hugh@veritas.com: fix tty_ioctl powerpc build]
      [jdike@addtoit.com: uml: fix ->set_termios declaration]
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NMartin Peschke <mp3@de.ibm.com>
      Acked-by: NPeter Oberparleiter <oberpar@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      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>
      606d099c
  9. 08 12月, 2006 3 次提交
  10. 03 12月, 2006 1 次提交
  11. 26 11月, 2006 1 次提交
    • P
      [PATCH] uml: make execvp safe for our usage · 5d48545e
      Paolo 'Blaisorblade' Giarrusso 提交于
      Reimplement execvp for our purposes - after we call fork() it is fundamentally
      unsafe to use the kernel allocator - current is not valid there.  So we simply
      pass to our modified execvp() a preallocated buffer.  This fixes a real bug
      and works very well in testing (I've seen indirectly warning messages from the
      forked thread - they went on the pipe connected to its stdout and where read
      as a number by UML, when calling read_output().  I verified the obtained
      number corresponded to "BUG:").
      
      The added use of __cant_sleep() is not a new bug since __cant_sleep() is
      already used in the same function - passing an atomicity parameter would be
      better but it would require huge change, stating that this function must not
      be called in atomic context and can sleep is a better idea (will make sure of
      this gradually).
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Acked-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5d48545e
  12. 04 11月, 2006 1 次提交
    • J
      [PATCH] uml: fix I/O hang · 53b17332
      Jeff Dike 提交于
      Fix a UML hang in which everything would just stop until some I/O happened
      - a ping, someone whacking the keyboard - at which point everything would
      start up again as though nothing had happened.
      
      The cause was gcc reordering some code which absolutely needed to be
      executed in the order in the source.  When unblock_signals switches signals
      from off to on, it needs to see if any interrupts had happened in the
      critical section.  The interrupt handlers check signals_enabled - if it is
      zero, then the handler adds a bit to the "pending" bitmask and returns.
      unblock_signals checks this mask to see if any signals need to be
      delivered.
      
      The crucial part is this:
      	signals_enabled = 1;
      	save_pending = pending;
      	if(save_pending == 0)
      		return;
      	pending = 0;
      
      In order to avoid an interrupt arriving between reading pending and setting
      it to zero, in which case, the record of the interrupt would be erased,
      signals are enabled.
      
      What happened was that gcc reordered this so that 'save_pending = pending'
      came before 'signals_enabled = 1', creating a one-instruction window within
      which an interrupt could arrive, set its bit in pending, and have it be
      immediately erased.
      
      When the I/O workload is purely disk-based, the loss of a block device
      interrupt stops the entire I/O system because the next block request will
      wait for the current one to finish.  Thus the system hangs until something
      else causes some I/O to arrive, such as a network packet or console input.
      
      The fix to this particular problem is a memory barrier between enabling
      signals and reading the pending signal mask.  An xchg would also probably
      work.
      
      Looking over this code for similar problems led me to do a few more
      things:
      
      - make signals_enabled and pending volatile so that they don't get cached
        in registers
      
      - add an mb() to the return paths of block_signals and unblock_signals so
        that the modification of signals_enabled doesn't get shuffled into the
        caller in the event that these are inlined in the future.
      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>
      53b17332
  13. 01 11月, 2006 1 次提交
  14. 25 10月, 2006 1 次提交
    • A
      [PATCH] uml: mconsole fixes · 3a51237d
      Al Viro 提交于
       * when we have stop/sysrq/go, we get pt_regs of whatever executes
         mc_work_proc().  Would be better to see what we had at the time of
         interrupt that got us stop.
      
       * stop/stop/stop.....  will give stack overflow.  Shouldn't allow stop
         from mconsole_stop().
      
       * stop/stop/go leaves us inside mconsole_stop() with
      	os_set_fd_block(req->originating_fd, 0);
      	reactivate_fd(req->originating_fd, MCONSOLE_IRQ);
         just done by nested mconsole_stop().  Ditto.
      
       * once we'd seen stop, there's a period when INTR commands are executed
         out of order (as they should; we might have the things stuck badly
         enough to never reach mconsole_stop(), but still not badly enough to
         block mconsole_interrupt(); in that situation we _want_ things like
         "cad" to be executed immediately).  Once we enter monsole_stop(), all
         INTR commands will be executed in order, mixed with PROC ones.  We'd
         better let user see that such change of behaviour has happened.
         (Suggested by lennert).
      
       * stack footprint of monsole_interrupt() is an atrocity; AFAICS we can
         safely make struct mc_request req; static in function there.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Acked-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3a51237d
  15. 21 10月, 2006 1 次提交