Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1571022pxb; Wed, 4 Nov 2020 12:32:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPTqD6fR0yQVBtlShtS2VS1nRZ9WE/Ju5ob3Zq1QlHedas1OWufRpA112Q8CghOPzLYUaE X-Received: by 2002:a17:906:b104:: with SMTP id u4mr26022265ejy.121.1604521971871; Wed, 04 Nov 2020 12:32:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604521971; cv=none; d=google.com; s=arc-20160816; b=MQgmsx/rPH2jbyL2H3CSDjP3aSgW7AvTygljOmjru/yJ5XThhfIvsAU/iJeRvYikLp /Ba3MUtm7ABVqbx+R658ELGlXjSCCzSy9kVlqXIJvUdrW6aYfHpv4qF3f7v7TRuYY1pB Zd074cF6PZNDZbLtfqbRcjNRQBUWf3wXHKjSDOMbQFaKTNFOV2WMlSWnbdbsHQRLoBJc 60yGkqZsUhoA8Ek9pyDWM9VTYouu5qOGLae4mJ2CHLtlvOwIT5G3ScgfesTp2hlL5GiP z3mWE9/dYgNzhVV0C3WK0e/3a7EC461oe0rQ7c4gjhk5m76INbzUdG8bhEhEX4UN/70O rXXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=4VPDG0Et+3iCQhh4JCrxq93loq7PtVNHyLCUrU3FWOg=; b=PYGJuxqEZdXjVqYMhXZf5e6lTWs5BwtgiZor4q1pNcymHRPEpQfRsS/blr2b7oYNbA XwzCGk9yzATe18YP6JCr2Ej5nyjLJ0wqsQ5dceJrT/1fZx83NV9XhLEKFcaWIro3ISE4 c3Y6j+RTUsMtNrsgfALj+j9hUA/UKildVf5kiKNZiyByaz82HASJ9QQo8GqH3QjBAuUR 6a3cL1ZiLDWKpJ2t2mbaGDGwN54cGC4b2n/JACtnoXI1Q3WoVd4W1ijzUilWhYOYORO/ occNvjOY/DX4wop+/VfA0zlGYdoshdjgwZuDT2R4Pd7V5mcE1BF6xH1urW5GhL2qN83r GYuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e5si1987232edr.30.2020.11.04.12.32.28; Wed, 04 Nov 2020 12:32:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732073AbgKDRqv (ORCPT + 99 others); Wed, 4 Nov 2020 12:46:51 -0500 Received: from mga14.intel.com ([192.55.52.115]:16659 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730524AbgKDRqv (ORCPT ); Wed, 4 Nov 2020 12:46:51 -0500 IronPort-SDR: uy+PlSWFo2zvFzWa5TjSeUTD8XVCezG1JQ40JUuexWym8X027IaCDenSNSYqBa6/apYGqr200u pV0+DP0YjeZQ== X-IronPort-AV: E=McAfee;i="6000,8403,9795"; a="168476165" X-IronPort-AV: E=Sophos;i="5.77,451,1596524400"; d="scan'208";a="168476165" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 09:46:46 -0800 IronPort-SDR: Q9Bmv6A8hLY7c8TvyszzEw9vj0W25YTLM3HEfYG4mwCufaGsYgJuK+k0r2131jolfBeCTxgYes GJ1Yb9QiFgjQ== X-IronPort-AV: E=Sophos;i="5.77,451,1596524400"; d="scan'208";a="471304692" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 09:46:44 -0800 Date: Wed, 4 Nov 2020 09:46:44 -0800 From: Ira Weiny To: Thomas Gleixner Cc: Ingo Molnar , Borislav Petkov , Andy Lutomirski , Peter Zijlstra , Dave Hansen , x86@kernel.org, Dan Williams , Andrew Morton , Fenghua Yu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH V2 00/10] PKS: Add Protection Keys Supervisor (PKS) support Message-ID: <20201104174643.GC1531489@iweiny-DESK2.sc.intel.com> References: <20201102205320.1458656-1-ira.weiny@intel.com> <871rhb8h73.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871rhb8h73.fsf@nanos.tec.linutronix.de> User-Agent: Mutt/1.11.1 (2018-12-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 03, 2020 at 12:36:16AM +0100, Thomas Gleixner wrote: > On Mon, Nov 02 2020 at 12:53, ira weiny wrote: > > Fenghua Yu (2): > > x86/pks: Enable Protection Keys Supervisor (PKS) > > x86/pks: Add PKS kernel API > > > > Ira Weiny (7): > > x86/pkeys: Create pkeys_common.h > > x86/fpu: Refactor arch_set_user_pkey_access() for PKS support > > x86/pks: Preserve the PKRS MSR on context switch > > x86/entry: Pass irqentry_state_t by reference > > x86/entry: Preserve PKRS MSR across exceptions > > x86/fault: Report the PKRS state on fault > > x86/pks: Add PKS test code > > > > Thomas Gleixner (1): > > x86/entry: Move nmi entry/exit into common code > > So the actual patch ordering is: > > x86/pkeys: Create pkeys_common.h > x86/fpu: Refactor arch_set_user_pkey_access() for PKS support > x86/pks: Enable Protection Keys Supervisor (PKS) > x86/pks: Preserve the PKRS MSR on context switch > x86/pks: Add PKS kernel API > > x86/entry: Move nmi entry/exit into common code > x86/entry: Pass irqentry_state_t by reference > > x86/entry: Preserve PKRS MSR across exceptions > x86/fault: Report the PKRS state on fault > x86/pks: Add PKS test code > > This is the wrong ordering, really. > > x86/entry: Move nmi entry/exit into common code > > is a general cleanup and has absolutely nothing to do with PKRS.So this > wants to go first. > Sorry, yes this should be a pre-patch. > Also: > > x86/entry: Move nmi entry/exit into common code > [from other email] > > x86/entry: Pass irqentry_state_t by reference > > > > > > > > is a prerequisite for the rest. So why is it in the middle of the > series? It is in the middle because passing by reference is not needed until additional information is added to irqentry_state_t which is done immediately after this patch by: x86/entry: Preserve PKRS MSR across exceptions I debated squashing the 2 but it made review harder IMO. But I thought keeping them in order together made a lot of sense. > > And then you enable all that muck _before_ it is usable: > Strictly speaking you are correct, sorry. I will reorder the series. > > Bisectability is overrrated, right? Agreed, bisectability is important. I thought I had it covered but I was wrong. > > Once again: Read an understand Documentation/process/* > > Aside of that using a spell checker is not optional. Agreed. In looking closer at the entry code I've found a couple of other instances I'll add another precursor patch. I've also found other errors with the series which I should have caught. My apologies I made some last minute changes which I should have checked more thoroughly. Thanks, Ira