From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752320AbdLKGr0 (ORCPT ); Mon, 11 Dec 2017 01:47:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:44588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434AbdLKGrX (ORCPT ); Mon, 11 Dec 2017 01:47:23 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BFF8218AF 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 From: Andy Lutomirski To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Brian Gerst , David Laight , Kees Cook , Peter Zijlstra , Andy Lutomirski Subject: [PATCH PTI v2 0/6] Clean up pgd handling and fix VSYSCALL and LDT Date: Sun, 10 Dec 2017 22:47:16 -0800 Message-Id: X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I'm getting reasonably happy with this. It still needs more testing, but I want to get it out there. The main things that need testing are the 5-level case for the both vsyscalls and the LDT. I'm getting a double-fault in ldt_gdt_64, but I haven't checked whether it's a bug in this series, and it kind of looks like it isn't. I'll figure it out in the morning. The docs also want updating for the 5 level case. Changes from v1: - vsyscalls actually work. - Added the "Warn and fail" patch to prevent the testing goof I had on v1. - Lots of cleanups Andy Lutomirski (6): x86/pti: Vastly simplify pgd synchronization Revert "x86/mm/pti: Disable native VSYSCALL" x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE mode x86/pti: Map the vsyscall page if needed x86/pti: Put the LDT in its own PGD if PTI is on Documentation/x86/x86_64/mm.txt | 11 ++- arch/x86/Kconfig | 8 -- arch/x86/entry/vsyscall/vsyscall_64.c | 37 ++++++++- arch/x86/include/asm/mmu_context.h | 33 +++++++- arch/x86/include/asm/pgtable.h | 6 +- arch/x86/include/asm/pgtable_64.h | 77 ++++++++---------- arch/x86/include/asm/pgtable_64_types.h | 2 + arch/x86/include/asm/processor.h | 23 ++++-- arch/x86/include/asm/vsyscall.h | 1 + arch/x86/kernel/ldt.c | 138 +++++++++++++++++++++++++++++--- arch/x86/mm/pti.c | 115 ++++++++++++++++---------- 11 files changed, 331 insertions(+), 120 deletions(-) -- 2.13.6