From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BC6CC43441 for ; Mon, 19 Nov 2018 22:45:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F350F20C01 for ; Mon, 19 Nov 2018 22:45:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="IxzOxstR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F350F20C01 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731697AbeKTJLd (ORCPT ); Tue, 20 Nov 2018 04:11:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:44516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730419AbeKTJLd (ORCPT ); Tue, 20 Nov 2018 04:11:33 -0500 Received: from localhost (c-71-205-112-160.hsd1.co.comcast.net [71.205.112.160]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D76620851; Mon, 19 Nov 2018 22:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542667540; bh=6S+0gpAKECLqYOcVG4p3IANncMPDtBcaJviHc6zdYjI=; h=From:To:Cc:Subject:Date:From; b=IxzOxstRAQEUgQg58O/jofWvAzvJiloLueNSgsPRgLOduv5/4OFcntn/PLSaf9Btf IJHj73eUJRx4YNG2WZEbgHBx8qNWCHviZfJzA7kLXwcIEFHhReW8HIwM4cq1KRPIrF mn1parOoKoD11N3uhoCTYKWjQ4PrECgot26ZD/f4= From: Andy Lutomirski To: x86@kernel.org Cc: LKML , Yu-cheng Yu , Dave Hansen , Peter Zijlstra , Borislav Petkov , Andy Lutomirski Subject: [PATCH 00/13] x86/fault: #PF improvements, mostly related to USER bit Date: Mon, 19 Nov 2018 14:45:24 -0800 Message-Id: X-Mailer: git-send-email 2.17.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series is a whole bunch of page fault cleanups, plus a couple of OOPS diagnostic improvements. The overall goals are to clean up handling of the faulting CPL, the USER bit in the error_code, and the log messages generated by #PF OOPSes. This series can also be seen as CET preparation. CET introduces the WRUSS instruction, which is the very first way for CPL 0 code to cause a #PF fault with the USER bit set. Let's get the page fault code into shape before we start using WRUSS :) Andy Lutomirski (13): x86/fault: Check user_mode(regs) when avoiding an mmap_sem deadlock x86/fault: Check user_mode(regs) when validating a stack extension x86/cpufeatures, x86/fault: Mark SMAP as disabled when configured out x86/fault: Fold smap_violation() into do_user_addr_fault() x86/fault: Fix SMAP #PF handling buglet for implicit supervisor accesses x86/fault: Improve the condition for signalling vs OOPSing x86/fault: Make error_code sanitization more robust x86/fault: Don't set thread.cr2, etc before OOPSing x86/fault: Remove sw_error_code x86/fault: Don't try to recover from an implicit supervisor access x86/oops: Show the correct CS value in show_regs() x86/fault: Decode page fault OOPSes better x86/vsyscall/64: Use X86_PF constants in the simulated #PF error code arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/include/asm/disabled-features.h | 8 +- arch/x86/kernel/process_64.c | 5 +- arch/x86/mm/fault.c | 224 ++++++++++++++--------- 4 files changed, 150 insertions(+), 89 deletions(-) -- 2.17.2