Date: Mon, 17 Dec 2018 15:58:05 -0500 From: Kurt Lidl <lidl@pix.net> To: freebsd-stable@freebsd.org Subject: Re: Address Collision using i386 4G/4G Memory Split Message-ID: <064a6212-40df-2dad-32fb-4cade922c65d@pix.net> In-Reply-To: <38ad0d50-c776-9deb-d56b-db8db548cefc@tu-dortmund.de> References: <38ad0d50-c776-9deb-d56b-db8db548cefc@tu-dortmund.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Lochmann writes: > According to git commit e3089a (https://reviews.freebsd.org/D1463) > FreeBSD 12.0 i386 uses separate address spaces for kernel and user > space. So basically two memory areas, one in each space, can have the > same address. > Is this possible with FreeBSD 12.0? Is this likely to happen? If the userspace program and the kernel address happen to overlap, the system will deal with it. There's not anything to worry about. As to whether or not it's likely to happen -- I'm not sure about that. I expect the default stack and heap space locations for a fresh process have changed due to this change, but it should not matter. > On my opinion, this is also very expensive in terms of performance. > Any copy{in,out} has to flush the TLB. > (http://fxr.watson.org/fxr/source/i386/i386/copyout_fast.s#L91) > Why are you still using this 4G/4G approach? The complete split between the user address space and kernel address space mapping is largely due to the mitigation of the Spectre attacks, as I understand things. To have both the kernel and userspace mapped at the same time, can be used to extract information from the kernel that should not be made available. I think it falls into the "slower but safer" class of change. Someone will, undoubtedly, correct me if I'm wrong. -Kurt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?064a6212-40df-2dad-32fb-4cade922c65d>