1. 17 10月, 2007 4 次提交
  2. 20 9月, 2007 1 次提交
    • N
      uml: use correct type in BLKGETSIZE ioctl · 2c392a4f
      Nicolas George 提交于
      I found a type mismatch in UML that makes host block devices unusable as ubd
      devices on x86_64 and other 64 bits systems (segfault of the mm subsystem):
      
      In block/ioctl.c, the following lines show that the BLKGETSIZE ioctl expects
      a pointer to a long:
      
      	case BLKGETSIZE:
      		if ((bdev->bd_inode->i_size >> 9) > ~0UL)
      			return -EFBIG;
      		return put_ulong(arg, bdev->bd_inode->i_size >> 9);
      
      In arch/um/os-Linux/file.c, os_file_size calls it with an int.
      
      The ioctl_list man page should be fixed as well.
      
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2c392a4f
  3. 08 5月, 2007 3 次提交
    • 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: 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: remove user_util.h · 9218b171
      Jeff Dike 提交于
      user_util.h isn't needed any more, so delete it and remove all includes of it.
      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>
      9218b171
  4. 12 2月, 2007 1 次提交
  5. 11 7月, 2006 2 次提交
  6. 02 5月, 2006 1 次提交
  7. 25 2月, 2006 1 次提交
  8. 18 9月, 2005 1 次提交
    • J
      [PATCH] uml: preserve errno in error paths · b4fd310e
      Jeff Dike 提交于
      The poster child for this patch is the third tuntap_user hunk.  When an ioctl
      fails, it properly closes the opened file descriptor and returns.  However,
      the close resets errno to 0, and the 'return errno' that follows returns 0
      rather than the value that ioctl set.  This caused the caller to believe that
      the device open succeeded and had opened file descriptor 0, which caused no
      end of interesting behavior.
      
      The rest of this patch is a pass through the UML sources looking for places
      where errno could be reset before being passed back out.  A common culprit is
      printk, which could call write, being called before errno is returned.
      
      In some cases, where the code ends up being much smaller, I just deleted the
      printk.
      
      There was another case where a caller of run_helper looked at errno after a
      failure, rather than the return value of run_helper, which was the errno value
      that it wanted.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b4fd310e
  9. 09 6月, 2005 1 次提交
  10. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4