1. 10 Oct, 2005 8 commits
    • Rafael J. Wysocki's avatar
      [PATCH] x86_64: Set up safe page tables during resume · 3dd08325
      Rafael J. Wysocki authored
      The following patch makes swsusp avoid the possible temporary corruption
      of page translation tables during resume on x86-64.  This is achieved by
      creating a copy of the relevant page tables that will not be modified by
      swsusp and can be safely used by it on resume.
      
      The problem is that during resume on x86-64 swsusp may temporarily
      corrupt the page tables used for the direct mapping of RAM.  If that
      happens, a page fault occurs and cannot be handled properly, which leads
      to the solid hang of the affected system.  This leads to the loss of the
      system's state from before suspend and may result in the loss of data or
      the corruption of filesystems, so it is a serious issue.  Also, it
      appears to happen quite often (for me, as often as 50% of the time).
      
      The problem is related to the fact that (at least) one of the PMD
      entries used in the direct memory mapping (starting at PAGE_OFFSET)
      points to a page table the physical address of which is much greater
      than the physical address of the PMD entry itself.  Moreover,
      unfortunately, the physical address of the page table before suspend
      (i.e.  the one stored in the suspend image) happens to be different to
      the physical address of the corresponding page table used during resume
      (i.e.  the one that is valid right before swsusp_arch_resume() in
      arch/x86_64/kernel/suspend_asm.S is executed).  Thus while the image is
      restored, the "offending" PMD entry gets overwritten, so it does not
      point to the right physical address any more (i.e.  there's no page
      table at the address pointed to by it, because it points to the address
      the page table has been at during suspend).  Consequently, if the PMD
      entry is used later on, and it _is_ used in the process of copying the
      image pages, a page fault occurs, but it cannot be handled in the normal
      way and the system hangs.
      
      In principle we can call create_resume_mapping() from
      swsusp_arch_resume() (ie.  from suspend_asm.S), but then the memory
      allocations in create_resume_mapping(), resume_pud_mapping(), and
      resume_pmd_mapping() must be made carefully so that we use _only_
      NosaveFree pages in them (the other pages are overwritten by the loop in
      swsusp_arch_resume()).  Additionally, we are in atomic context at that
      time, so we cannot use GFP_KERNEL.  Moreover, if one of the allocations
      fails, we should free all of the allocated pages, so we need to trace
      them somehow.
      
      All of this is done in the appended patch, except that the functions
      populating the page tables are located in arch/x86_64/kernel/suspend.c
      rather than in init.c.  It may be done in a more elegan way in the
      future, with the help of some swsusp patches that are in the works now.
      
      [AK: move some externs into headers, renamed a function]
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      3dd08325
    • Paolo 'Blaisorblade' Giarrusso's avatar
      [PATCH] uml: cleanup whitespace for COW driver · 52a2d3e4
      Paolo 'Blaisorblade' Giarrusso authored
      Fix whitespace - I split this off the previous patch for easier review.
      Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      52a2d3e4
    • Paolo 'Blaisorblade' Giarrusso's avatar
      [PATCH] uml: cleanup byte order macros for COW driver · 028c0cc1
      Paolo 'Blaisorblade' Giarrusso authored
      After restoring the existing code, make it work also when included in
      kernelspace code (which isn't currently the case, but at least this will prevent
      people from "fixing" it as just happened).
      Whitespace is fixed in next patch - it cluttered the diff too much.
      Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      028c0cc1
    • Paolo 'Blaisorblade' Giarrusso's avatar
      [PATCH] uml: restore include breakage, breaking binary format of COW driver · 855ec613
      Paolo 'Blaisorblade' Giarrusso authored
      Commit 44456d37, between 2.6.13-rc3 and -rc4,
      was a "nice cleanup" which broke something. Revert the offending part.
      
      It broke because:
      a) because this part doesn't fall under the description
      b) the author didn't know what he was doing here
      c) the author didn't try to compile the existing code and see that it worked
         perfectly.
      d) the author didn't ask us what was happening
      e) you didn't either, and somebody there should have learned that UML is a bit
         different.
      
      In fact, UML is special in linking to host libc and using its includes.
      
      In particular, since host includes always define both __BIG_ENDIAN and
      __LITTLE_ENDIAN, ntohll() macros started thinking to be in a big-endian world;
      and on-disk compatibility was broken.
      
      Many thanks go to Nix for reporting the problem and correctly diagnosing an
      endianness problem.
      
      Btw, this patch restores the previous code, which worked; but the definitions
      would be uncorrect if used in kernelspace files.
      
      Next patch addresses that.
      
      Cc: Nix <nix@esperi.org.uk>, Olaf Hering <olh@suse.de>
      Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      855ec613
    • Paolo 'Blaisorblade' Giarrusso's avatar
      [PATCH] uml: allow building .s/.i/.lst files from userspace files · 54a8a222
      Paolo 'Blaisorblade' Giarrusso authored
      For files which need to include glibc headers (i.e. userspace files), we
      specified the correct flags only for .o, not for .s/.lst/.i. Fix this.
      Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      54a8a222
    • Paolo 'Blaisorblade' Giarrusso's avatar
      [PATCH] uml: add mode=skas0 as a synonym of skas0 · 9e3d862e
      Paolo 'Blaisorblade' Giarrusso authored
      Too many people were confused by skas0 and tried using "mode=skas0". And after
      all, they are right - accept this.
      Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      9e3d862e
    • Paolo 'Blaisorblade' Giarrusso's avatar
      [PATCH] Uml: hide commands when not being verbose · 5cd10daa
      Paolo 'Blaisorblade' Giarrusso authored
      Add a missing $(Q) to a "ln" invocation.
      Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      5cd10daa
    • Steven Rostedt's avatar
      [PATCH] pcmcia: fix task state at pccard thread exit · 220ec029
      Steven Rostedt authored
      The pccardd thread has a race in it that it can shutdown in the
      TASK_INTERRUPTIBLE state.
      
      Make sure we mark ourselves runnable again as we remove ourselves from
      the wait queue.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      220ec029
  2. 09 Oct, 2005 1 commit
  3. 08 Oct, 2005 12 commits
  4. 07 Oct, 2005 19 commits