Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2302134rdb; Sun, 11 Feb 2024 23:07:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUcA/h7/LumMyWJgAnfCStPhnHwEspOJSoaJU/SnWqgIGDJ335TLfPwpnttpCttH5Yltk60ZX1tbhJ+1JC641D1PPi6aKBPMp49y+bqdQ== X-Google-Smtp-Source: AGHT+IGsoXgfqCT9GqEJUqmNljc6FpDsA6JmtloARbMBgRce04X8Fe7fVJRHHwfH5GZ7rRBTxUnJ X-Received: by 2002:a05:620a:2fb:b0:785:d9e3:bc2d with SMTP id a27-20020a05620a02fb00b00785d9e3bc2dmr699803qko.30.1707721671900; Sun, 11 Feb 2024 23:07:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707721671; cv=pass; d=google.com; s=arc-20160816; b=RIjxo3H/ku47VaKo/o29d+dQ5IX1wvkiXBo+ElJENrentn1MgI+fnZ44btqv4yg+xP pyIoJEbOWPp2orV1vi+UT3HaoGd92V0B58BNicTnsVebBLSw6VpmsIDQ6ZTInqe/95kj iE/VzKznwdWqe33KjmC4LVWbNjfAAzRF6tLln167ktUV0jNM60jExr3si5esO0EVrVDm RuFLPXltmWghPGCNQ0uRYByZ0NwzdkvSpGbKiygR8tT8dRYCpNP//8Zg0NJ+7wrbLQrY L9NbYFar8MulZwo3s7IWQ47kZVoyM+MKaC3fdX3BVt84OSy+fo3bS6xrmrHnqPB0OtF+ Kvfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=scUyUdBlS5wOYXvOCXz6jvFPejy4wS+4OX0W+JbSV8U=; fh=c58VKNVR3AEKiLRSwar7k7Qdu8Oy0Yh6iw6Xo0fWxFY=; b=Fswhxh+veLlkqeuGw+YaqQfh0IFmyz2HEEdPmXDeuiaZ5DqJthfZNr5a5jqP7WQ4z/ zP3H8JKJekSNH2ChnPxkKNbQtsf0ce4PxCakzWvvBDjO06SHsBgDIC1AYWPvNRHxKhmz cYwx7qwCwecNIq4A6SqGIfn2BUHIA0Wiw02N9Kxzgj5ry+PMXpMwKjSEfFiM0qHYvhM5 vwxpMRO6RHcygA/FvJ3pJSv5qWZOx/Hdqx8qhbxFr4fs0Qh1g+pq0CLAAPDE+7Di4rk3 MRKf0I9/jgWIcNNLY7851SxujHXSEJ5kxSgkrjNP3dH1c0esMGrgHBvmGsqdnmMCV65k HWQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="aXSzU+/I"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-61123-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCUnwolQmVDtP2tcS7evBr4kNAJSVI9ay5IuCf83OBYelWYwVPu4duKxwh0Usqmq61Iaq9zkP1ta5AKWxLoeOu4Xad3kB1+waqTDQD28LQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m8-20020ae9e708000000b00785c05cfdbdsi5316136qka.513.2024.02.11.23.07.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 23:07:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61123-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="aXSzU+/I"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-61123-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A64011C21F08 for ; Mon, 12 Feb 2024 07:07:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60E026FD8; Mon, 12 Feb 2024 07:07:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aXSzU+/I" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE02F3C15 for ; Mon, 12 Feb 2024 07:07:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707721664; cv=none; b=PBly9+k7g60odT+1pKVeUvEkuXw69pgKQw78CJfoGu0EWSSZdEC8ZqI6grwGb+nOkIgmd1mJhuPXWiRUFGcjDp6Laf3Qr5VKW10rIHlilRoATEvpkDB5e7SZSwsGH8JeLQOkFoff43+tNU0ATPE71YA3OpY9Nl+QCBP1EJtrcwY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707721664; c=relaxed/simple; bh=RCdOiggCm0l00XC8KnOXtFiS/o7OVO9sEQ1asC4jtCM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=daoPJxHe2mAAuryVIZv9OG5HJnbWdcbZIJU87NNgry6SkNrZbgmchc5ofDJCPjXlOsEjhUdR03zXDOqqdXpvw4ey46nidsRas/GYRxzH0sCMQrFvxbY2+V84l2JqtQU5ISDggHn47HDDT7qDLi4/g6wwJsXhcgiq0tdsnCy6PnI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=aXSzU+/I; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707721663; x=1739257663; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=RCdOiggCm0l00XC8KnOXtFiS/o7OVO9sEQ1asC4jtCM=; b=aXSzU+/IkpWWgGF82tz6btsNw+uy72ho47TOqVdrMXi1wgL3gZBRAlH+ bgpaplGz65sEX//d21oDUJjTVT5ylW9ERnF1pmCXc6T4JaovsK+l2b75s JIPaM98Zh2jOUYjpTVGqS/sbSMDsxZ16bQUNvmhxTv9Fyti4ZXfihm9Sj f13c0YpNTAyVvqrxy6d4QYxbkohqu20L16P8dkqFxFNzQVXCbETpbITrw dUNSXAYTnqcT5+uhHiOg6LZUysJs+SHheKHiEKLdPqOgJu5qx4RSCoOGo m/D5H7dIYGGeXXX7vQFNZM+O25b0JqLr4zFL9YnqXei/KY1hOeAPkSIyW g==; X-IronPort-AV: E=McAfee;i="6600,9927,10981"; a="12412233" X-IronPort-AV: E=Sophos;i="6.05,262,1701158400"; d="scan'208";a="12412233" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2024 23:07:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,262,1701158400"; d="scan'208";a="2518876" Received: from tassilo.jf.intel.com (HELO tassilo) ([10.54.38.190]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2024 23:07:41 -0800 Date: Sun, 11 Feb 2024 23:07:40 -0800 From: Andi Kleen To: Bagas Sanjaya Cc: hapter@420blaze.it, mingo@redhat.com, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, Andrew Morton , Linux Kernel Mailing List , Linux Memory Management List Subject: Re: arch/x86/kernel/sys_x86_64.c: rationale for 0x40000000 for MAP_32BIT's start address? Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > >> Unfortunately this does not supply a rationale for starting from 0x40000000, > >> which seems very arbitrary, and the git commit has been there since the > >> beginning of time (i.e. as far the the git history goes), so the git blame > >> has not helped much to clarify it. I was also not able to find who "AK" was. > > > > That was from commit 717db2f9f36805 ("[PATCH] x86-64 updates for 2.5.54") > > in tglx/history.git repo [1], authored by Andi Kleen. Cc'ing him. > > > > [1]: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/arch/x86_64/kernel/sys_x86_64.c?id=717db2f9f36805d85c695771ea7d712812896aa7 I thought the comment was clear? The 1GB start is to avoid conflicts with the brk heap, which grows up. The flag is really obsolete, if you want limited relocations there are better ways to do it that don't limit ASLR. It was originally because the custom module loader in X.org didn't support a PLT. -Andi