Главная страница


ru.linux

 
 - RU.LINUX ---------------------------------------------------------------------
 From : Sergey Lentsov                       2:4615/71.10   30 May 2002  16:15:17
 To : All
 Subject : URL: http://www.lwn.net/2002/0523/kernel.php3
 -------------------------------------------------------------------------------- 
 
    [1][LWN Logo] 
    [LWN.net]
 
    Sections:
     [2]Main page
     [3]Security
     Kernel
     [4]Distributions
     [5]Development
     [6]Commerce
     [7]Linux in the news
     [8]Announcements
     [9]Letters
    [10]All in one big page
 
    See also: [11]last week's Kernel page.
 
 Kernel development
 
    The current development kernel is 2.5.17, which was [12]announced on
    May 20. This release includes the new quota code (see below), some VFS
    changes, and quite a few other improvements and fixes.
 
    Linus released [13]2.5.16 on May 18; it contained a bunch of low-level
    x86 paging changes, the usual IDE patches, the 64-bit jiffies patch
    (no more uptime wraparounds), a bunch of USB updates, an IrDA update,
    and various other fixes.
 
    Linus has been posting changelogs in a new, shorter format; for those
    who prefer the details, here are the long-format logs for [14]2.5.16
    and [15]2.5.17.
 
    The latest prepatch from Dave Jones is [16]2.5.15-dj2.
 
    The current [17]2.5 status summary from Guillaume Boissiere is dated
    May 22.
 
    The current stable kernel release is 2.4.18; Marcelo has not released
    any 2.4.19 prepatches since May 2.
 
    Alan Cox released [18]2.4.19-pre8-ac5 on May 20; it contains the
    latest reverse mapping VM, various copy_to/from_user cleanups (see
    below), a bunch of aacraid and I2O changes, and many other fixes.
 
    Alan has also released [19]2.2.21, which contains only one small fix
    added after the last release candidate.
 
    The new disk quota code went into 2.5.17. The reimplemented quota
    system is the work of Jan Kara, who has posted [20]a brief summary of
    the changes.
 
    With the new quota implementation there is, of course, a new quota
    file format. It brings a number of advantages, including 32-bit user
    IDs and accounting for files sizes in bytes rather than blocks.
    Filesystems like ReiserFS, which take pains to store very small files
    efficiently, will benefit from the more accurate quota accounting. The
    old quota format is still supported, however, along with any other
    format that people might wish to implement: quota formats may now be
    implemented by separate modules and plugged in as needed.
 
    The filesystem interface to quotas has changed, of course. Filesystems
    now have much more flexibility to override, modify, and extend quota
    operations. Thus, for example, journaling filesystems can journal
    quota operations as well.
 
    The old quota tools can be supported through a compatibility
    interface, but really taking advantage of the new code will require
    new tools. Those can be found on [21]the Linux quota SourceForge page.
 
    Software suspend goes in. Pavel Machek posted [22]a new version of the
    software suspend code (written originally by Gabor Kuti) asking "What
    can I do to make this applied?" The [23]answer, according to Linus, is
    nothing - he has accepted it for 2.5.18.
 
    The swsusp patch provides a laptop-style suspend capability to any
    machine, whether the underlying BIOS power management code supports it
    or not. When you tell your system to suspend (via a "magic sysrq" key,
    a user-space tool, or /proc/acpi/sleep), it starts by flushing
    everything to disk that it can. Files are synced to disk, processes
    are swapped out, and in-kernel data structures are reduced to a
    minimal state. This step is required to save important data, of
    course, but it also has the effect of freeing up a great deal of
    memory which will, then, not need to be saved separately.
 
    The suspend code then sets up a new set of page tables for all
    remaining memory which must be saved; the swap code, at that point,
    can be used to save the rest to disk. Once that is done, the system
    can be halted. Restoring the system is done by booting with the
    "resume=" option; it pulls in all of the saved memory and generally
    reverses the steps taken above.
 
    Suspending a running system in this way is a task with many potential
    pitfalls, and, no doubt, one or two of them remain in the code. It is
    marked "experimental" for a reason. Nonetheless, this patch has been
    circulating for a long time, and has been tested by quite a few
    people. It was time for it to go into the mainline kernel.
 
    Still waiting for kbuild. Keith Owens has sent out [24]his 'third and
    final attempt' to get a response from Linus on when and how the new
    kernel build patch might get merged. Linus still appears to not have
    answered Keith directly, but he did [25]let this slip in a thread on a
    completely different subject:
 
      I'm hoping we can get there in small steps, rather than a big
      traumatic merge. I'd love to just try to merge it piecemeal.
 
    This suggests that somebody needs to split apart the kbuild patch into
    a number of small, incremental steps. Of course, this patch is not the
    easiest to split in that manner...
 
    /dev/port goes out. Martin Dalecki, seemingly, has not been flamed
    enough despite all of his IDE work. So he set out to [26]remove the
    /dev/port device. /dev/port is a pseudo device which makes it easy for
    suitably privileged application programs to access (x86) I/O ports via
    read and write calls. Martin cites a number of problems with the code,
    including the fact that nobody is using it.
 
    Interestingly, Martin didn't get his desired flames, despite [27]a
    separate attempt to stir them up. Linus [28]agrees that it should
    probably go; about the only [29]dissent came from Alan Cox, who claims
    to have seen it used, especially in scripting languages. Linus has not
    issued a final decree, but it looks like /dev/port is no more.
 
    copy_*_user and errors. The kernel, of course, runs in its own memory
    space that is distinct from the address space given to each user
    process. So some care must be taken when moving data between the two;
    it's not just a matter of following a pointer. The kernel provides a
    whole set of functions that copy data between kernel and user space;
    the two most general are called copy_to_user and copy_from_user.
 
    A common convention for utility routines within the kernel is to
    return zero on success, and an error code (suitable for passing back
    to user space) on failure. But the copy functions are different: they
    return the number of bytes that were not actually copied. For most
    operations, that value will be zero - everything is copied as
    requested. When something goes wrong, however, the return value tells
    just how far into the operation the error happened.
 
    Rusty Russell [30]sees a problem with this interface: kernel
    programmers get confused and expect that the copy functions follow the
    same conventions as most other kernel utilities. That leads to code
    like the following (taken from the Intermezzo filesystem):
         error = copy_from_user(&hdr, buf, sizeof(hdr));
         if ( error )
                 return error;
 
    The problem, of course, is that the "error" returned to the user does
    not look like an error code. Thus problems are not caught and bugs
    result. That's when the programmer is happy that liability laws have
    not caught up to software yet.
 
    Rusty states that, of the 5500 copy calls in the kernel, 415 are
    incorrect, despite an audit done one year ago. He would like to change
    the copy functions to return an error code like most other utilities,
    or to send a segmentation fault signal and return nothing at all.
    Either solution would eliminate what he [31]sees as a trap which trips
    up many or most kernel programmers sooner or later. (Of course, being
    Rusty, he expressed it in a rather more colorful manner).
 
    Making internal kernel interfaces safer to use seems like a good
    cause, but Rusty seems to be mostly alone on this one. The main
    counterpoint is that the "partial success" return value can be useful
    in some situations: restarting system calls after signals or simply
    reporting a partial result back to user space. There are, however,
    very few places in the code where that information is actually used.
 
    On the other hand, it has been pointed out that a partial success
    value "n" need not indicate that the first n bytes were copied. Trying
    to speed things up with fancy MMX instructions could cause things to
    be copied in strange orders. Andrew Morton has also [32]pointed out a
    bug in the copy code that can corrupt data (though it's not something
    that comes up in normal use). That bug could be fixed by copying from
    the far end of the array first in some situations. The point of all
    this is that a partial success might not tell you which bytes were
    actually copied.
 
    That notwithstanding, it looks like very little will actually change -
    [33]Linus has spoken:
 
      The current interface is quite well-defined, and has good
      semantics. Every single argument against it has been totally bogus,
      with no redeeming values.
 
    One can not accuse Linus of not being clear on what he thinks.
 
    So the one remaining approach, it seems, is to simply go through and
    fix all of the broken copy calls on a regular basis. Arnaldo Carvalho
    de Melo has already jumped into that task, posting fixes for
    [34]intermezzo, [35]OSS, [36]ISDN, [37]block drivers, and [38]USB. But
    chances are more mistakes will creep in with future patches.
 
    Other patches and updates released this week include:
 
    Kernel trees:
      * Andrea Arcangeli: [39]2.4.19-pre8-aa3.
      * Marc-Christian Petersen: [40]2.4.18-WOLK3.4. 2.4 and the kitchen
        sink - "contains over 400 patches."
      * J.A. Magallon: [41]2.4.19-pre8-jam3 (find it [42]here).
      * Joerg Prante: [43]2.4.19-pre8-jp13
      * Greg Kroah-Hartman: [44]2.5.15-gregkh-1, lots of USB stuff.
      * Martin Loschwitz: [45]2.5.15-ml3.
 
    2.4 backports
      * Robert Love: [46]O(1) scheduler.
      * Pawel Kot [47]NTFS 2.0.7d.
      * Jens Axboe: [48]IDE tagged command queueing for 2.4.19-pre8.
 
    Core kernel code:
      * Martin Bligh: [49]/proc/buddyinfo, providing memory allocator
        statistics.
      * William Lee Irwin III: [50]per-CPU pte_chain free lists.
      * William Lee Irwin III: [51]lazy buddy allocator.
      * Rusty Russell: [52]per-CPU tasklet cleanup.
      * Chris Wright: [53]Linux security module 2.5.16 version.
 
    Device drivers
      * Joe Thornber: [54]Device mapper beta 3 with a new fast snapshot
        capability.
      * Martin Dalecki: IDE reworking ([55]65, [56]66, [57]67, [58]68, and
        [59]69)
      * Marc Boucher: [60]Conexant HCF linmodem driver.
 
    Filesystems:
      * Daniel Phillips: [61]Htree directory index for ext2.
      * Stephen Tweedie: [62]ext3 0.9.18 for 2.4.19-pre8.
      * Andreas Gruenbacher: [63]access control list patch version 0.8.27.
        Note that 0.8.26 had an unpleasant bug; you want to upgrade if you
        are using that version.
 
    Kernel building:
      * Kai Germaschewski: [64]improved ccache interaction for
        lightning-fast builds.
 
    Miscellaneous:
      * [65]Kernel Traffic #167 is available.
      * Mel Gorman: [66]extended commentary on the 2.4 VM code.
      * Robert Love: [67]schedutils, a set of user-space scheduler
        utilities.
      * Rusty Russell: [68]Futex update. "On top of this, we can actually
        build those crazy pthreads primitives (as well as the simple locks
        of before)."
      * Jeff Dike: [69]User-mode Linux 0.57-2.4.18-26.
      * Neil Brown: [70]thoughts on using the JBD generic journaling code
        in the MD driver.
 
    Section Editor: [71]Jonathan Corbet
    May 23, 2002
 
                                Sponsored Link
 
    [72]Cheap and Effective
 
    LWN's text ads are a cheap and effective marketing tool for your
    organization. You can now purchase text ads automatically through our
    own credit card gateway. (No more PayPal).
 
    For other kernel news, see:
      * [73]Kernel traffic
      * [74]Kernel Newsflash
      * [75]Kernel Trap
      * [76]2.5 Status
    
    Other resources:
      * [77]L-K mailing list FAQ
      * [78]Linux-MM
      * [79]Linux Scalability Effort
      * [80]Kernel Newbies
      * [81]Linux Device Drivers
    
    
 
                                                   [82]Next: Distributions
 
    [83]Eklektix, Inc. Linux powered! Copyright Л 2002 [84]Eklektix, Inc.,
    all rights reserved
    Linux (R) is a registered trademark of Linus Torvalds
 
 References
 
    1. http://lwn.net/
    2. http://lwn.net/2002/0523/
    3. http://lwn.net/2002/0523/security.php3
    4. http://lwn.net/2002/0523/dists.php3
    5. http://lwn.net/2002/0523/devel.php3
    6. http://lwn.net/2002/0523/commerce.php3
    7. http://lwn.net/2002/0523/press.php3
    8. http://lwn.net/2002/0523/announce.php3
    9. http://lwn.net/2002/0523/letters.php3
   10. http://lwn.net/2002/0523/bigpage.php3
   11. http://lwn.net/2002/0516/kernel.php3
   12. http://lwn.net/2002/0523/a/lt-2.5.17.php3
   13. http://lwn.net/2002/0523/a/2.5.16.php3
   14. http://lwn.net/2002/0523/a/2.5.16-full.php3
   15. http://lwn.net/2002/0523/a/2.5.17.php3
   16. http://lwn.net/2002/0523/a/2.5.15-dj2.php3
   17. http://lwn.net/2002/0523/a/2.5-status.php3
   18. http://lwn.net/2002/0523/a/2.4.19-pre8-ac5.php3
   19. http://lwn.net/2002/0523/a/2.2.21.php3
   20. http://lwn.net/2002/0523/a/quota.php3
   21. http://www.sf.net/projects/linuxquota/
   22. http://lwn.net/2002/0523/a/swsusp.php3
   23. http://lwn.net/2002/0523/a/lt-swsusp.php3
   24. http://lwn.net/2002/0523/a/kbuild-ready.php3
   25. http://lwn.net/2002/0523/a/lt-kbuild.php3
   26. http://lwn.net/2002/0523/a/dev-port.php3
   27. http://lwn.net/2002/0523/a/md-flames.php3
   28. http://lwn.net/2002/0523/a/lt-dev-port.php3
   29. http://lwn.net/2002/0523/a/ac-dev-port.php3
   30. http://lwn.net/2002/0523/a/deathtrap.php3
   31. http://lwn.net/2002/0523/a/beartrap.php3
   32. http://lwn.net/2002/0523/a/copy-bug.php3
   33. http://lwn.net/2002/0523/a/lt-copy.php3
   34. http://lwn.net/2002/0523/a/acme-intermezzo.php3
   35. http://lwn.net/2002/0523/a/acme-oss.php3
   36. http://lwn.net/2002/0523/a/acme-isdn.php3
   37. http://lwn.net/2002/0523/a/acme-block.php3
   38. http://lwn.net/2002/0523/a/acme-usb.php3
   39. http://lwn.net/2002/0523/a/2.4.19-pre8-aa3.php3
   40. http://lwn.net/2002/0523/a/2.4.18-WOLK3.4.php3
   41. http://lwn.net/2002/0523/a/2.4.19-pre8-jam3.php3
   42. http://lwn.net/2002/0523/a/jam3-location.php3
   43. http://lwn.net/2002/0523/a/2.4.19-pre8-jp13.php3
   44. http://lwn.net/2002/0523/a/2.5.15-gregkh-1.php3
   45. http://lwn.net/2002/0523/a/2.5.15-ml3.php3
   46. http://lwn.net/2002/0523/a/scheduler.php3
   47. http://lwn.net/2002/0523/a/ntfs-2.0.7d.php3
   48. http://lwn.net/2002/0523/a/2.4-tcq.php3
   49. http://lwn.net/2002/0523/a/buddyinfo.php3
   50. http://lwn.net/2002/0523/a/per-cpu-pte-chain.php3
   51. http://lwn.net/2002/0523/a/lazy-buddy.php3
   52. http://lwn.net/2002/0523/a/tasklet.php3
   53. http://lwn.net/2002/0523/a/lsm.php3
   54. http://lwn.net/2002/0523/a/device-mapper.php3
   55. http://lwn.net/2002/0523/a/ide-65.php3
   56. http://lwn.net/2002/0523/a/ide-66.php3
   57. http://lwn.net/2002/0523/a/ide-67.php3
   58. http://lwn.net/2002/0523/a/ide-68.php3
   59. http://lwn.net/2002/0523/a/ide-69.php3
   60. http://lwn.net/2002/0523/a/hcf.php3
   61. http://lwn.net/2002/0523/a/btree-index.php3
   62. http://lwn.net/2002/0523/a/ext3.php3
   63. http://lwn.net/2002/0523/a/acl.php3
   64. http://lwn.net/2002/0523/a/ccache.php3
   65. http://kt.zork.net/kernel-traffic/kt20020520_167.html
   66. http://lwn.net/2002/0523/a/vm-commentary.php3
   67. http://lwn.net/2002/0523/a/schedutils.php3
   68. http://lwn.net/2002/0523/a/futex.php3
   69. http://lwn.net/2002/0523/a/uml.php3
   70. http://lwn.net/2002/0523/a/jbd-md.php3
   71. mailto:lwn@lwn.net
   72.
 http://oasis.lwn.net/oasisc.php?s=5&c=5&cb=1380707829&url=http%3A%2F%2Flwn.net%2
 Fcorp%2Fadvertise%2Ftext%2F
   73. http://kt.zork.net/
   74. http://www.atnf.csiro.au/~rgooch/linux/docs/kernel-newsflash.html
   75. http://www.kerneltrap.com/
   76. http://kernelnewbies.org/status/
   77. http://www.tux.org/lkml/
   78. http://linux-mm.org/
   79. http://lse.sourceforge.net/
   80. http://www.kernelnewbies.org/
   81. http://www.xml.com/ldd/chapter/book/index.html
   82. http://lwn.net/2002/0523/dists.php3
   83. http://www.eklektix.com/
   84. http://www.eklektix.com/
 
 --- ifmail v.2.14.os7-aks1
  * Origin: Unknown (2:4615/71.10@fidonet)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 URL: http://www.lwn.net/2002/0523/kernel.php3   Sergey Lentsov   30 May 2002 16:15:17 
Архивное /ru.linux/19861ce5177b4.html, оценка 3 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional