From owner-freebsd-stable@freebsd.org Tue Dec 18 08:57:34 2018 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBFDD1347625 for ; Tue, 18 Dec 2018 08:57:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F60D87D85; Tue, 18 Dec 2018 08:57:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wBI8vQQa038150 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 18 Dec 2018 10:57:29 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wBI8vQQa038150 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wBI8vQiq038149; Tue, 18 Dec 2018 10:57:26 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 18 Dec 2018 10:57:26 +0200 From: Konstantin Belousov To: Brooks Davis Cc: Kurt Lidl , freebsd-stable@freebsd.org Subject: Re: Address Collision using i386 4G/4G Memory Split Message-ID: <20181218085726.GD60291@kib.kiev.ua> References: <38ad0d50-c776-9deb-d56b-db8db548cefc@tu-dortmund.de> <064a6212-40df-2dad-32fb-4cade922c65d@pix.net> <20181218083425.GA20811@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218083425.GA20811@spindle.one-eyed-alien.net> User-Agent: Mutt/1.11.1 (2018-12-01) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2018 08:57:35 -0000 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..