Received: by 10.223.185.116 with SMTP id b49csp3553033wrg; Tue, 6 Mar 2018 00:39:45 -0800 (PST) X-Google-Smtp-Source: AG47ELt9osQUWe0DXjex7VT1jni4aYs1vXnz+TGUuWSX6yxioGwYLEHyTEXtQnbok2AWulDZlyFK X-Received: by 10.98.59.11 with SMTP id i11mr18259815pfa.57.1520325585293; Tue, 06 Mar 2018 00:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520325585; cv=none; d=google.com; s=arc-20160816; b=iQAcjZ0zFfR/lv8tjO0LvOXsEKiFXBrwrPjL2Epi+zmbtRJfbUsg3p7eXWC+OxZAgw 0+VG1fCAPTswNVHWT9yLhWKigxdN8PEq9zobb0jPpDSBtu8y/MCdv2HyaeDiZPD6RyYU hPyAVypbD5Tk5UFaFuJEilOJSChlOoYmR3bTHf/62eY+/OOF+1MHPzpMACeX2s7BQMju MMvfS9kVfeNLTbrWa+uclWuv8mOrE4/SUf578X+k01JNJ1krvnvqL+TCA7D++YHiY0JL ScbH+liEbunHUDwSGS0UZBla9DiNz7o9cqFliXtK3fPO3ih3NYm2ca7iOFaQlQE4iN2V NVmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=s81gPEOIt+ifi6+OJ7cndyBgdihKlxUZVU0NC0GDqKY=; b=AyOI84SYRNJa6qVOthuSzA0V6Yofpuw0b3vdZTh1196kxycNW+7bN+3110oZu9c7Ur Hp4YOy30Fa+yisiPuGYD4PFmpQT+FEWANe9gUeNK097C0pp+IvER4gie+S5GJsKCPQqv tVY+ZsLW5aoJNDWbvtREIPLxZZrxa6k2gubj6X2IyzJ54aKtO0RTsvXHn0Au/SOgdTzG WI7fdZ1QWfEq2mVb88WGg+rRbRudTFkmQnDeKlUfp8q82I1Ppm2Nu8mORGvcjThLk4cK 9bPbpndbnUR5diZk4STeDqB85nR48YdDmbO9jFlChKD6lILOEiJQ8Bzh8F97PwJoasVg bydQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=gp3t3qpA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v145si2835291pgb.569.2018.03.06.00.39.30; Tue, 06 Mar 2018 00:39:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=gp3t3qpA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752908AbeCFIiU (ORCPT + 99 others); Tue, 6 Mar 2018 03:38:20 -0500 Received: from 8bytes.org ([81.169.241.247]:57096 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750730AbeCFIiT (ORCPT ); Tue, 6 Mar 2018 03:38:19 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id D03CD2A7; Tue, 6 Mar 2018 09:38:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1520325497; bh=8ABOd1HgUYTBuOpNcegTSO48f4fq+AGaNUmicbUmm4k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gp3t3qpAtyiVaZPBY92JtHSq3/aXvjIS+PGhO66/f2FSOFSvj1XQQLFY+a85dyj4V si6apC9kwe+bo/gGvZX8cs9/c+zW5Knwc8ErcMxAOsFYqY8xArIP8HE37e+0DR7219 QZh2EUafaMSV2VoOzxumrHSEHUTQV5wN4dQdOBihAAodNNlSUm2jFI4SBKq8upjxIA pBsMa3JBSsBp8rzcZ+oty+S+BdTJApF0hxWvJuxlM5CSie/xyQR1iB7Sp3UTxtVrzl j5ajSt31ZxeAKBoePAHNPKnYaotfeE+pS5V2LA+ES6BhSJnNiDn1dMWInHLERzr/7U oI6iX/0ZvR2NQ== Date: Tue, 6 Mar 2018 09:38:17 +0100 From: Joerg Roedel To: Linus Torvalds Cc: Brian Gerst , Thomas Gleixner , Ingo Molnar , Peter Anvin , the arch/x86 maintainers , Linux Kernel Mailing List , linux-mm , Andrew Lutomirski , Dave Hansen , Josh Poimboeuf , =?iso-8859-1?Q?J=FCrgen_Gro=DF?= , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , David Laight , Denys Vlasenko , Eduardo Valentin , Greg Kroah-Hartman , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek , Joerg Roedel Subject: Re: [PATCH 07/34] x86/entry/32: Restore segments before int registers Message-ID: <20180306083817.GW16484@8bytes.org> References: <1520245563-8444-1-git-send-email-joro@8bytes.org> <1520245563-8444-8-git-send-email-joro@8bytes.org> <20180305131231.GR16484@8bytes.org> <20180305213550.GV16484@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 05, 2018 at 01:58:32PM -0800, Linus Torvalds wrote: > On Mon, Mar 5, 2018 at 1:35 PM, Joerg Roedel wrote: > > I could probably add some debug instrumentation to check for that in my > > future testing, as there is no NX protection in the user address-range > > for the kernel-cr3. > > Does not NX work with PAE? > > Oh, it looks like the NX bit is marked as "RSVD (must be 0)" in the > PDPDT. Oh well. I had a version of these patches running which implemented NX on the PDE level by allocating 8k PMD pages. But that ended up needing 5 order-1 allocations for each page-table, which I got to fail pretty easily after some time. So I abandoned this approach for now. Maybe it can be implemented with order-0 allocations for PMD pages, the open problem is how to link the user and kernel PMD page-pairs together then. Regards, Joerg