From owner-svn-src-head@freebsd.org Wed Jun 28 22:32:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 066AEDAAD97 for ; Wed, 28 Jun 2017 22:32:41 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x22e.google.com (mail-qt0-x22e.google.com [IPv6:2607:f8b0:400d:c0d::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF27164C25 for ; Wed, 28 Jun 2017 22:32:40 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x22e.google.com with SMTP id 32so61516266qtv.1 for ; Wed, 28 Jun 2017 15:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dZOVcppBdpt2smcpacK7z4ivPBqNFABFxHS4NDQ3em4=; b=aOK1ilRKR/u/kYTq5uHypZIolRWmgIrBoRFoBBskcuBpvl5d5m+2GmAipdc5SufVso PDe0LiD24YrcS8qF2+hy3FK6WXdV2q7SV6HFyNYAEZcnYlco5td5Yy1enAiRQ6KzNn4R KJ4BNd+enkwHwx1kQyVqHzWbwb0rzNKvN0OXeNNJ8OrA2tEwYBwSwFEHMSRTvyJBW9mg 36kgHxRnNaNY7vp71ed6oP1a5j6FnBimZ6gLUtGqgXg62OnWVtMjOspWE3jdu7Fe3IQl ScVOhiFHUoKzH87c4kE7jTkvcc38FXbQkpq6LjxZ50EXowZhr90JYcZ2i9xqKSJD0y6W Rg6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dZOVcppBdpt2smcpacK7z4ivPBqNFABFxHS4NDQ3em4=; b=GDQ0g540f0lz7R+i5DHYiY7wD2AB6ZyBCMYfSVSzZKGibcty0YFFwUYzd/gTLlMtei ukk2wzRrSX5zDfjYJ1eZct5y4PP3paWt5qfpgAwtLlvKGaUNVFlP/84W7atZJMEscx7L FjlpkRfXEJ/kcd5LknZTCPTUudR3lhftBOiJG4Qna/cJ3kWAwBtsF8GnsWxcZ+3nA1Qg Uc0App4gffkiaWdTvcvXtsuFZsvuGbsLjINsCS7nb8pzNTnPsn5B1dv9R1w+LhxftHsW CCGFlP3Yf3XAAKO5KogN8Obe4WyUEyCRsMhnQ1MZHq/H/AV/Rj4gk9axaHGPzQnpj+ZA R1mw== X-Gm-Message-State: AKS2vOwKBsyUHAemfkyWzSlCVRmoT+ciPPwnGYx/jam6SZO5Fo4GSW5w YquEZ97l6/k65ShZtUURJw== X-Received: by 10.200.53.78 with SMTP id z14mr15410904qtb.184.1498689159756; Wed, 28 Jun 2017 15:32:39 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id q90sm2676448qki.11.2017.06.28.15.32.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2017 15:32:38 -0700 (PDT) Date: Wed, 28 Jun 2017 18:32:38 -0400 From: Shawn Webb To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320430 - head/sys/vm Message-ID: <20170628223238.v456h4t4huwbqt6f@mutt-hbsd> References: <201706280402.v5S42bQx089187@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wissjs73tyvhitp6" Content-Disposition: inline In-Reply-To: <201706280402.v5S42bQx089187@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20170609 (1.8.3) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 22:32:41 -0000 --wissjs73tyvhitp6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 28, 2017 at 04:02:37AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Jun 28 04:02:36 2017 > New Revision: 320430 > URL: https://svnweb.freebsd.org/changeset/base/320430 >=20 > Log: > Treat the addr argument for mmap(2) request without MAP_FIXED flag as > a hint. > =20 > Right now, for non-fixed mmap(2) calls, addr is de-facto interpreted > as the absolute minimal address of the range where the mapping is > created. The VA allocator only allocates in the range [addr, > VM_MAXUSER_ADDRESS]. This is too restrictive, the mmap(2) call might > unduly fail if there is no free addresses above addr but a lot of > usable space below it. > =20 > Lift this implementation limitation by allocating VA in two passes. > First, try to allocate above addr, as before. If that fails, do the > second pass with less restrictive constraints for the start of > allocation by specifying minimal allocation address at the max bss > end, if this limit is less than addr. > =20 > One important case where this change makes a difference is the > allocation of the stacks for new threads in libthr. Under some > configuration conditions, libthr tries to hint kernel to reuse the > main thread stack grow area for the new stacks. This cannot work by > design now after grow area is converted to stack, and there is no > unallocated VA above the main stack. Interpreting requested stack > base address as the hint provides compatibility with old libthr and > with (mis-)configured current libthr. > =20 > Reviewed by: alc > Tested by: dim (previous version) > Sponsored by: The FreeBSD Foundation > MFC after: 1 week >=20 > Modified: > head/sys/vm/vm_map.c > head/sys/vm/vm_map.h > head/sys/vm/vm_mmap.c Hey Kostik, This commit breaks both xorg and shutting down/rebooting. Reverting this commit makes my laptop happy again. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --wissjs73tyvhitp6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAllULoMACgkQaoRlj1JF bu5cyg/9GDgKlk6IjQHzwSIPsb5s31YYjKIjcOSvZ+1DMikfEoQ9YPiFBzkWGHMw DUM4OTNpBS6r2qX/yFTGDahHC48CfC8GiwxfRPHHKjpg37eVwwzS+NPlIWp44ndV +00W9pdbxPucK/Wp6swBUGM+nKHowPjr8Cy5MLD7qPvy6AIiy69VrZ1sOwl8xfob MwqB9e04Wh7QKIm9uyTFPAOUBzbnhLl/gwNA9tEk1Y1UYWt9bUIP+fdh/mLoOc0r jVaIdX0Z+qd1sfkfvXe/uwzNceuuAgMhAIYdtISLTfvL5HGRJcNKdVbAQMKRBLel v1T2mpwgah+oBTUvlSiLlHpIkNeBFroVZvLsxTUvy5f85qdMhSJ1rghIs7iqs7cK 9kCLE2GUBO2AWcsyfS3oMq+WVhjuDSFjx1EInuhusz1qdGtVSetksWfCsq+Ks2Ev lNaQBRiytvkIrFIoqJGbB337cUAy1KV05R+dB7Ge/qn+NIMcjIlt0V5hN61z3o16 HH1jfzb37Z+DaHrUwiwrRLQxUOyjjLpILWc9DudB/75atlZfA8FrLaw37/1EgGyd 4NLo0jnMBKw6GsxLZBoH8jMk+QMeEjYRo73medsvOJ3hXBJndLewB8avAW7V11iM KZp5qscqCd1S1LJMVuCUpJZkBPQ5Oah8q2XwUFrgf6hVMv6wbwI= =tNe7 -----END PGP SIGNATURE----- --wissjs73tyvhitp6--