Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756422AbdLGRI7 (ORCPT ); Thu, 7 Dec 2017 12:08:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:38038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932343AbdLGRI4 (ORCPT ); Thu, 7 Dec 2017 12:08:56 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2F98219A4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org X-Google-Smtp-Source: AGs4zMZUhngq+fuN1k9q4D8X5/F+7Xj5JeZI/L2Dtc/LQntUkekv+pYT5Ar1FhXXNPPC+kjpKLxZ67+EpdEbxDaRwSE= MIME-Version: 1.0 In-Reply-To: <20171207124347.p7kdj7q4qqs3ivri@pd.tnic> References: <48fe5cf1382d6a95c7b1837415882edcc81a9781.1512631324.git.luto@kernel.org> <20171207124347.p7kdj7q4qqs3ivri@pd.tnic> From: Andy Lutomirski Date: Thu, 7 Dec 2017 09:08:34 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] LDT improvements To: Borislav Petkov Cc: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Brian Gerst , David Laight , Kees Cook , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 976 Lines: 21 On Thu, Dec 7, 2017 at 4:43 AM, Borislav Petkov wrote: > On Wed, Dec 06, 2017 at 11:22:21PM -0800, Andy Lutomirski wrote: >> I think I like this approach. I also think it might be nice to move the >> whole cpu_entry_area into this new pgd range so that we can stop mucking >> around with the fixmap. > > Yeah, and also, I don't like the idea of sacrificing a whole PGD > only for the LDT crap which is optional, even. Frankly - and this > is just me - I'd make CONFIG_KERNEL_PAGE_TABLE_ISOLATION xor > CONFIG_MODIFY_LDT_SYSCALL and don't give a rat's *ss about the LDT. The PGD sacrifice doesn't bother me. Putting a writable LDT map at a constant address does bother me. We could probably get away with RO if we trapped and handled the nasty faults, but that could be very problematic. The version here: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/pti&id=a74d1009ac72a1f04ec5bcd338a4bdbe170ab776 actually seems to work.