Page MenuHomeFreeBSD

chaltroot(2)
Needs ReviewPublic

Authored by kib on Fri, Sep 25, 11:56 PM.
Tags
None
Referenced Files
F173472379: D60035.diff
Sat, Sep 26, 4:53 AM
F173472350: D60035.id187720.diff
Sat, Sep 26, 4:53 AM
F173464685: D60035.id187720.diff
Sat, Sep 26, 3:48 AM
F173464471: D60035.diff
Sat, Sep 26, 3:45 AM
Subscribers

Details

Summary
vfs: guard against altroot pointing to not a directory


pwd_altroot(): avoid creating new pwd structure if altroot does not change


chaltroot(2): new syscall

to change the altroot AKA ABI root for native processes


chaltroot(2): make accessible to userspace

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Fri, Sep 25, 11:56 PM

This is a proposal for now, I want to discuss do we want this feature exposed to the native processes at all.
I thought about putting it under e.g. procctl(2), but it seems to not be a natural place.

I believe its immediate use is to allow much easier testing of the namei(9) changes around altroot behavior, in particular for the fixes dteske@ is working on in D58855 and D59990.
On the other hand, it is not obvious if it is useful for something else, but who knows where users end up with.

The changes to pwd_altroot(9) itself could be considered as an independent bug fixes anyway.