1. 26 9月, 2006 10 次提交
  2. 01 8月, 2006 1 次提交
    • R
      [PATCH] vDSO hash-style fix · 0b0bf7a3
      Roland McGrath 提交于
      The latest toolchains can produce a new ELF section in DSOs and
      dynamically-linked executables.  The new section ".gnu.hash" replaces
      ".hash", and allows for more efficient runtime symbol lookups by the
      dynamic linker.  The new ld option --hash-style={sysv|gnu|both} controls
      whether to produce the old ".hash", the new ".gnu.hash", or both.  In some
      new systems such as Fedora Core 6, gcc by default passes --hash-style=gnu
      to the linker, so that a standard invocation of "gcc -shared" results in
      producing a DSO with only ".gnu.hash".  The new ".gnu.hash" sections need
      to be dealt with the same way as ".hash" sections in all respects; only the
      dynamic linker cares about their contents.  To work with older dynamic
      linkers (i.e.  preexisting releases of glibc), a binary must have the old
      ".hash" section.  The --hash-style=both option produces binaries that a new
      dynamic linker can use more efficiently, but an old dynamic linker can
      still handle.
      
      The new section runs afoul of the custom linker scripts used to build vDSO
      images for the kernel.  On ia64, the failure mode for this is a boot-time
      panic because the vDSO's PT_IA_64_UNWIND segment winds up ill-formed.
      
      This patch addresses the problem in two ways.
      
      First, it mentions ".gnu.hash" in all the linker scripts alongside ".hash".
       This produces correct vDSO images with --hash-style=sysv (or old tools),
      with --hash-style=gnu, or with --hash-style=both.
      
      Second, it passes the --hash-style=sysv option when building the vDSO
      images, so that ".gnu.hash" is not actually produced.  This is the most
      conservative choice for compatibility with any old userland.  There is some
      concern that some ancient glibc builds (though not any known old production
      system) might choke on --hash-style=both binaries.  The optimizations
      provided by the new style of hash section do not really matter for a DSO
      with a tiny number of symbols, as the vDSO has.  If someone wants to use
      =gnu or =both for their vDSO builds and worry less about that
      compatibility, just change the option and the linker script changes will
      make any choice work fine.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0b0bf7a3
  3. 16 7月, 2006 1 次提交
  4. 15 7月, 2006 3 次提交
  5. 11 7月, 2006 19 次提交
  6. 04 7月, 2006 2 次提交
  7. 03 7月, 2006 1 次提交
  8. 02 7月, 2006 3 次提交
    • 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
    • P
      [PATCH] uml: make copy_*_user atomic · 47e5243a
      Paolo 'Blaisorblade' Giarrusso 提交于
      Make __copy_*_user_inatomic really atomic to avoid "Sleeping function called in
      atomic context" warnings, especially from futex code.
      
      This is made by adding another kmap_atomic slot and making copy_*_user_skas
      use kmap_atomic; also copy_*_user() becomes atomic, but that's true and is not
      a problem for i386 (and we can always add might_sleep there as done
      elsewhere).  For TT mode kmap is not used, so there's no need for this.
      
      I've had to use another slot since both KM_USER0 and KM_USER1 are used
      elsewhere and could cause conflicts.  Till now we reused the kmap_atomic slot
      list from the subarch, but that's not needed as that list must contain the
      common ones (used by generic code) + the ones used in architecture specific
      code (and Uml till now used none); so I've taken the i386 one after comparing
      it with ones from other archs, and added KM_UML_USERCOPY.
      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>
      47e5243a