Re: pivot_root depreciated?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 30, 2014 at 09:15:11AM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 1/30/2014 3:16 AM, Karel Zak wrote:
> > everyone switched to our switch_root :-)
> 
> Except apparently for the systemd folks, which for some odd reason
> like the idea of keeping around the initrd for the life of the system
> so init can "return" to it ( yuck! ).
> 

To be clear, systemd uses the syscall, not the util-linux utility. I'm
not sure why you think this is a poor idea when it, in fact, solves real
problems. If your root filesystem resides on a stacked block device
(mdadm, lvm, dmraid, dm-crypt), this is the *only* way to cleanly umount
the filesystem for disassembly. Remounting the filesystem read-only
might not be enough.

Results of not doing this vary. If your root is dm-crypt, you open up
more possibilities of cold boot attacks. If you use mdadm for a fakeraid
array, your fakeraid controller might insist on rebuilding the array on
the next reboot which could take hours.

> > Anyway, I don't see any info about pivot_root syscall deprecation
> > in Linux kernel source tree.
> 
> Me neither, but then why switch_root?  I thought the whole reason it
> came about was because Linus et al considered pivot_root() to have
> been a terrible idea.

My understanding is that pivot_root is a relic from the days of
/dev/initrd. Since 2.6 and the introduction of initramfs, it's no longer
needed for this purpose.

d
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux