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 DE081C43441 for ; Wed, 21 Nov 2018 23:11:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95C5120870 for ; Wed, 21 Nov 2018 23:11:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="PviIEOpj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95C5120870 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 S2387873AbeKVJr6 (ORCPT ); Thu, 22 Nov 2018 04:47:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:38632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387822AbeKVJr6 (ORCPT ); Thu, 22 Nov 2018 04:47:58 -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 E65F8206BB; Wed, 21 Nov 2018 23:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542841889; bh=qyb70sRe6RjFz/TnM2lS0+RJk7ZLN/MZ76zp3ornU7U=; h=From:To:Cc:Subject:Date:From; b=PviIEOpjpvDcXeKLCaQrkPnSTODPTivpXk7A24W6cVtYtFoYUW2ikw/n1XBzCZLXl jE2H/mPs7Df+MvFcJnGDF6LaK3H+uQIfRu2cReRyU8/RVd5477u8LtwfciEtVOOeFR qi3z2c0zCgOwnv3Sqd1DIvouxp8znnY2qcEhSR4Y= From: Andy Lutomirski To: x86@kernel.org Cc: LKML , Yu-cheng Yu , Dave Hansen , Peter Zijlstra , Borislav Petkov , Andy Lutomirski Subject: [PATCH v2 0/5] x86/fault: #PF improvements, mostly related to USER bit Date: Wed, 21 Nov 2018 15:11:21 -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 :) Changes from v1: - Rebase on top of tip:x86/mm, now that a bunch of v1 was applied. The only material changes are that 'x86/fault: Check user_mode(regs) when validating a stack extension' is gone because the code it fixed has been deleted and that 'x86/fault: Remove sw_error_code' lost the hunk that changed the same code. Andy Lutomirski (5): 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/kernel/process_64.c | 5 +- arch/x86/mm/fault.c | 144 +++++++++++++++++++------- 3 files changed, 108 insertions(+), 43 deletions(-) -- 2.17.2