1. 03 Apr, 2020 1 commit
  2. 15 Mar, 2020 1 commit
  3. 11 Jul, 2019 2 commits
  4. 18 May, 2017 4 commits
    • intrigeri's avatar
      Return to the initramfs (unpacked in /run/initramfs) on shutdown (refs:... · 888ccc5a
      intrigeri authored
      Return to the initramfs (unpacked in /run/initramfs) on shutdown (refs: #12428, #12354, Debian#778849).
      
      … otherwise the aufs read-write (tmpfs) branch, among possibly other things,
      can't be properly unmounted and its content remains in memory.
      
      Notes:
      
       * We have to handle some unmounting ourselves in initramfs-pre-shutdown-hook:
         systemd-shutdown doesn't manage to unmount the aufs read-write
         branch (/oldroot/lib/live/mount/overlay) as it is needed by the
         aufs (/oldroot) filesystem, and reciprocally it cannot unmount /oldroot as it
         is kept busy by /oldroot/lib/live/mount/*. So we disentangle this mess
         ourselves. And we have to manually empty the aufs read-write (tmpfs) branch,
         otherwise for some reason its content remains in memory. This code will of
         course need to be adapted for overlayfs some day.
      
       * We lock /bin/kill in memory: apparently systemd-exit.service needs it.
      
       * We remount /run on shutdown *before* dropping caches, just in case dropping
         caches removes what we've locked into memory.
      
       * We unpack the initramfs to /run/initramfs at *boot* time: sadly, I was not
         able to have it unpacked reliably in udev-watchdog-wrapper when the boot
         medium is ejected, so we'll use a little bit more RAM (instead of locking the
         compressed initramfs into memory, we're storing the uncompressed one there)
         and probably slow down the boot a bit, in order to make emergency shutdown
         robust. Note, however, that we save some of the RAM used by the uncompressed
         initramfs by deleting the worst offenders (kernel modules).
      
       * For now the whole procedure is quite noisy on the screen: the pre-shutdown
         hook runs under "set -x", doesn't run "clear", and spits out lots of
         debugging information. The goal is to enable users to provide useful
         debugging data if they have problems with emergency shutdown. Once we have
         shipped this code in a few releases and trust it's robust enough, we can
         surely reconsider and polish the UX by making the output less noisy.
      
       * We use absolute paths in many places to avoid $PATH lookup which might
         fail if the root filesystem is not there anymore.
      888ccc5a
    • intrigeri's avatar
    • intrigeri's avatar
      Drop kernel caches before shutting down (refs: #12428, #12354). · e6382573
      intrigeri authored
      Let's optimize how much memory the kernel memory poisoning feature acts on.
      e6382573
    • intrigeri's avatar
      Drop kexec-based memory erasure feature (refs: #12354). · e2caab51
      intrigeri authored
      It's not reliable enough and provides poor UX. Linux memory poisoning
      works well enough to get rid of it.
      e2caab51
  5. 07 Mar, 2015 1 commit
  6. 22 Nov, 2014 1 commit
    • Tails developers's avatar
      Don't try to switch to tty1 on emergency shutdown. · 954fa06b
      Tails developers authored
      It is blocking emergency shutdown from a GNOME session (but not from GDM, for
      some reason)... but manually switching with CTRL-ALT-F1 suddenly unblocks it.
      My *guess* is that logind is trying to do some magics on VT switch, that fails
      since we haven't locked the needed files into memory, and then it blocks chvt
      from returning.
      
      At least for the time being, let's simplify this part and just stay on the VT
      we're on. We can attempt to make it nicer later on.
      954fa06b
  7. 14 Jul, 2014 1 commit
    • Tails developers's avatar
      Don't build udev-watchdog statically. · f0c81a58
      Tails developers authored
      I didn't manage to have this work with the new libudev and ld.
      
      Accordingly, have memlockd lock this program into memory, as well as the shared
      libraries it depends upon.
      f0c81a58
  8. 23 Dec, 2013 1 commit
  9. 29 Apr, 2012 1 commit
  10. 21 Mar, 2012 1 commit
  11. 21 Oct, 2011 1 commit
  12. 20 Oct, 2011 3 commits
  13. 16 Sep, 2011 1 commit
  14. 15 Sep, 2011 1 commit
  15. 10 Feb, 2011 1 commit