Date: Thu, 7 Jun 2001 14:03:06 -0700 From: "Patrick W. Penzias Dirks" <pwd@apple.com> To: FreeBSD-FS@freebsd.org, FreeBSD-Arch@freebsd.org Subject: Support for pivot_root-like system call? Message-ID: <200106072103.f57L37l26327@scv2.apple.com>
next in thread | raw e-mail | index | archive | help
Hi, I'm the filesystems tech lead in Apple's Mac OS X Core OS group. Prompted by the needs of, among others, virus protection software developers who want to be able to mount "on" the root directory to intercept ALL filesystem calls in the system, I'm contemplating implementation of a new system call in Mac OS X to do something like Linux's pivot_root system call: int pivot_root(const char *new_root, const char *put_old); (which basically installs "new_root" as the new "/" [root_vnode] in the system and transfers the current root directory to the pathname specified my "put_old") I'm not up on the latest discussions in the Linux world around this functionality (which I gather is pretty recent) and the Linux man page for pivot_root is deliberately vague about defining details of its semantics. There's no explicit guarantee that existing process's root vnode or current directory will or will not get switched, for instance. I thought some options might be appropriate to specify that kind of detail and I'm currently thinking of implementing a new switch_root(2): int switch_root(const char *new_root, const char *put_old, unsigned long flags); with the same basic functionality as pivot_root, and options to either insist on updating root and/or current directory for existing processes, possibly excluding system processes, for instance. I want to avoid implementing something that might for some reason clash horribly with either present FreeBSD designs or planned future developments. Any comments would be most welcome. Thanks in advance, -Pat Dirks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106072103.f57L37l26327>