Address Collision using i386 4G/4G Memory Split
kostikbel at gmail.com
Tue Dec 18 08:57:35 UTC 2018
On Tue, Dec 18, 2018 at 08:34:25AM +0000, Brooks Davis wrote:
> On Mon, Dec 17, 2018 at 03:58:05PM -0500, Kurt Lidl wrote:
> > 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.
> 4/4 does potentially alter the failure modes of buggy code that tries to
> read directly from userspace addresses. For example, correct calls to
> the sysctls fixed in r342125 may panic prior to the fix because the
> addresses in question aren't mapped in kernel space. They might also
> fail or behave bizarrely if the page is mapped and the value from the
> kernel page is used.
I believe that SMAP on amd64 is The solution to find such cases, now.
And it indeed catched several real cases, e.g. pci(4), acpi_call and
vbox from ports, besides the mentioned commit..
More information about the freebsd-stable