Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756655AbeAIW3L (ORCPT + 1 other); Tue, 9 Jan 2018 17:29:11 -0500 Received: from mga06.intel.com ([134.134.136.31]:32748 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755070AbeAIW3J (ORCPT ); Tue, 9 Jan 2018 17:29:09 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,337,1511856000"; d="scan'208";a="9137823" Subject: Re: [RFC PATCH v2 2/6] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI To: Borislav Petkov , Willy Tarreau References: <1515502580-12261-3-git-send-email-w@1wt.eu> <20180109141713.ngqrf6weyiy2q3in@pd.tnic> <20180109143653.GA12976@1wt.eu> <20180109145157.5ltqbz4o5sqkcggb@pd.tnic> <20180109145422.GD12976@1wt.eu> <20180109212940.ffvqb6wmehmxre4i@pd.tnic> <20180109213227.GA13282@1wt.eu> <20180109214602.k7cuxwikg6xshztu@pd.tnic> <20180109220605.GE13282@1wt.eu> <20180109222036.6h7jjyaayusn4yb5@pd.tnic> Cc: Andy Lutomirski , LKML , X86 ML , Brian Gerst , Ingo Molnar , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf , "H. Peter Anvin" , Kees Cook From: Dave Hansen Message-ID: <81f27dee-345d-17d6-7aff-1107390800ce@linux.intel.com> Date: Tue, 9 Jan 2018 14:29:06 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180109222036.6h7jjyaayusn4yb5@pd.tnic> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Has anyone else noticed that CR3 in oopses is now basically a lie with PTI? It shows CR3 at the time of the printing of the oops, not at the time of the fault like the normal registers. That greatly limits its usefulness in the dumps with PTI. Should we carve out some space somewhere to stash it at entry so we can dump it in oopses? Any preferences on where? We need somewhere to write that's before the SWITCH_TO_KERNEL_CR3, most likely so cpu_entry_area is a candidate. The trampoline stack should also have space.