Source-Changes-D archive

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

Re: CVS commit: src/sys/kern



On Mon, Apr 13, 2020 at 04:34:48PM +0100, Roy Marples wrote:
> On 13/04/2020 16:31, Andrew Doran wrote:
> > Hi Roy.
> > 
> > On Sat, Apr 11, 2020 at 02:13:06AM +0100, Roy Marples wrote:
> > > On 10/04/2020 23:34, Andrew Doran wrote:
> > > > Module Name:	src
> > > > Committed By:	ad
> > > > Date:		Fri Apr 10 22:34:36 UTC 2020
> > > > 
> > > > Modified Files:
> > > > 	src/sys/kern: vfs_mount.c
> > > > 
> > > > Log Message:
> > > > vfs_mountroot(): don't needlessly grab a second reference to the root vnode
> > > > (the kernel never chdirs) nor a lock on it.
> > > 
> > > So the kernel chrooting to sysctl init.root is still ok?
> > 
> > How is that accomplished?  I couldn't find the code and don't recall seeing
> > it.
> 
> sysctl -w init.root=/altroot
> 
> See the ZFS Root ramdisk:
> https://nxr.netbsd.org/xref/src/distrib/common/zfsroot.rc#33
> 
> I tested kernel from yesterdays sources and it still works fine, so I guess
> nothing was needed here.

I had a look and it's init that chroots, not the kernel, so no issue.  The
kernel chrooting would be evil.

Andrew


Home | Main Index | Thread Index | Old Index