From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754205AbaCJRYe (ORCPT ); Mon, 10 Mar 2014 13:24:34 -0400 Received: from mga09.intel.com ([134.134.136.24]:3987 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753475AbaCJRYc (ORCPT ); Mon, 10 Mar 2014 13:24:32 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,625,1389772800"; d="scan'208";a="469695333" Message-ID: <531DF549.2090403@linux.intel.com> Date: Mon, 10 Mar 2014 10:24:25 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Andy Lutomirski , Linus Torvalds CC: Linux Kernel Mailing List , Stefani Seibold , Andreas Brief , Martin Runge Subject: Re: [x86, vdso] BUG: unable to handle kernel paging request at d34bd000 References: <20140307013833.GD8427@localhost> <1394176888.1018.3.camel@wall-e.seibold.net> <1394229220.20013.13.camel@wall-e.seibold.net> <1394354848.1002.37.camel@wall-e.seibold.net> <531D044C.2090303@linux.intel.com> <531DD35A.5060202@linux.intel.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/10/2014 10:12 AM, Andy Lutomirski wrote: > On Mon, Mar 10, 2014 at 8:11 AM, Linus Torvalds > wrote: >> >> On Mar 10, 2014 8:01 AM, "H. Peter Anvin" wrote: >>> >>> I have mentioned in the past wanting to move the fixmap to the low part >>> of the kernel space, because the top isn't really fixed... >> >> How about the high part of the user address space, just above the stack? >> Leave a unmapped page in between, or something. The stack is already >> randomized, isn't it? > > For the !compat_vdso case, I don't like it -- this will put the vdso > (which is executable) at a constant offset from the stack, which will > make it much easier to use the vdso to defeat ASLR. > > For the compat_vdso case, this only works if the address is *not* > random, unless we're going to start giving each process its very own > relocated vdso. > I presumed we were talking about compat_vdso, which thus simply turns into a "don't randomize the vdso flag." A significant side benefit is that this should make the code more similar. > For 64-bit, this is an entirely different story. The vsyscall page is > stuck in the fixmap forever, although I want to add a way for > userspace to opt out. The vvar page, hpet, etc could move into vmas, > though. I kind of want to do that anyway to allow processes to turn > off the ability to read the clock. Wait... you want to do what?! -hpa