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=-14.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,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 ECDD9C433E0 for ; Wed, 10 Feb 2021 02:37:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC21664E32 for ; Wed, 10 Feb 2021 02:37:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235177AbhBJChZ (ORCPT ); Tue, 9 Feb 2021 21:37:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:33420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235190AbhBJCe3 (ORCPT ); Tue, 9 Feb 2021 21:34:29 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AB74564E32; Wed, 10 Feb 2021 02:33:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612924428; bh=MD9GBHy4W12KXLKwSKr/H6doYX6L5D50x6xmORg2tHg=; h=From:To:Cc:Subject:Date:From; b=ZLZtq3o6LuQQg8pW6ZUNCeT60hE9tAkpl+5EXCmb2vaBmP0SdXzyE+Mxn7hIPLTRw bO8holv97zzYi5Dyvnt87kB606SYtQL2xKAVLFZFizSpPfb9rgzYR1q+MCUVuTwhFd f9fUfTx8rg42lCwnyDXVszoJ8/BBgj69JBZq0au1uVFo3ECfOV3bI7aL+Mo3GdTNxP N8L+ZmGe45SRyD+rIk/TnneBVdiFvQsNfL1+FR2UC3qbZHVOy45bfR8ZKP8lKPSNxd 6qP4KnMlo11OIlpOy7DlMsNiLRDf2u/f7kWAW1HxJT1MeyZqAyr/vhn9fJ3/JlerJO 6DfK39rgQ1FTA== From: Andy Lutomirski To: x86@kernel.org Cc: LKML , Dave Hansen , Alexei Starovoitov , Daniel Borkmann , Yonghong Song , Masami Hiramatsu , Andy Lutomirski Subject: [PATCH v2 00/14] x86/fault: #PF improvements, mostly related to USER bit Date: Tue, 9 Feb 2021 18:33:32 -0800 Message-Id: X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: - Various changelog improvements. - Reorder patches (SMAP moved after SMEP) - Add the efi_recover_from_page_fault() patch - Tidy up and improve the AMD erratum detection code Andy Lutomirski (14): x86/fault: Fix AMD erratum #91 errata fixup for user code x86/fault: Skip the AMD erratum #91 workaround on unaffected CPUs x86/fault: Fold mm_fault_error() into do_user_addr_fault() x86/fault/32: Move is_f00f_bug() to do_kern_addr_fault() x86/fault: Document the locking in the fault_signal_pending() path x86/fault: Correct a few user vs kernel checks wrt WRUSS x86/fault: Improve kernel-executing-user-memory handling x86/fault: Skip erratum #93 workaround on new CPUs x86/fault: Split the OOPS code out from no_context() x86/fault: Bypass no_context() for implicit kernel faults from usermode x86/fault: Rename no_context() to kernelmode_fixup_or_oops() x86/fault: Don't look for extable entries for SMEP violations x86/fault: Don't run fixups for SMAP violations x86/fault, x86/efi: Fix and rename efi_recover_from_page_fault() arch/x86/include/asm/efi.h | 2 +- arch/x86/mm/fault.c | 380 +++++++++++++++++++-------------- arch/x86/platform/efi/quirks.c | 16 +- 3 files changed, 227 insertions(+), 171 deletions(-) -- 2.29.2