Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3491930pxb; Sun, 20 Feb 2022 22:08:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwEM0BhOYiiPqiiHYup2xEcZ/0qHNCGtX1v9eKR7jWSWcGnw7eLV0GNT4SSmwwEGnjpO7f X-Received: by 2002:a17:902:7044:b0:14e:e1b1:bb0e with SMTP id h4-20020a170902704400b0014ee1b1bb0emr17517038plt.65.1645423711093; Sun, 20 Feb 2022 22:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645423711; cv=none; d=google.com; s=arc-20160816; b=XTRDesmxNXoM6O97JEVdzqxDGr9/nt+q/LAzyIa/C6zzrEmi/ssHmpe/ScyFOvon6n zs+0WxaKENR2FFNqUIwQk3/aXlgwirt5tCGkPc+CZnPDkfcTQVTvcESQOj1CYUjmNdM/ nZknMmYeE4hIziF5x0OcD3ZhrpIIYz5J6rsKQ4ATaigVM6kUUWviu3jujfPhW3meiliz G8ybJC8pKWMKc5/LAiqGjKoavEi2wdkGZRW2ghNv2iviH4DTaxVRtjsHtsut8IZziPy/ RE3ZMdDgUmvX0rjdNaHO0OOWMOiyC8g3kF5P/ikn+yRujOMBLtNE2EB8NmhpyQVgJLZv 7H7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4Ev2fs1YqEPLa47EWA469zAddJMiqUAUTa0ziHlzbUE=; b=sIR5yhMt8hh7irdu0bqw27DhkFj1Zgh2o/Dlp+V7JjlyBj3+Eq6Dicw+TzcYWJKbSy iv+WPZBOH5fBUmZaq6tvW3kKjKM1e76+RNBZZmenMY9qVZXGY8P6PYRjWI5esRtWMxhz IWuHAZtm3k+nF85+VHO3UWodgycvlwt1wM0MMjTKZADCq1nEbjHFMqo2NJAUEovzAJSB xOFpVf4giTMu2jfVtPVzko7/i/jPz71a4md8Aa7mtUySyqzmaBAyrLyeSTlx0Ploxylz 9mQNW1J+srZe+ruBsCIc9NDpEl6+pPA3skEhN+601/e7T8MhFrbwu+bJFpgWbzirOiwo VIAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TZPLSKDC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k20si8104551pfa.326.2022.02.20.22.08.14; Sun, 20 Feb 2022 22:08:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TZPLSKDC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239570AbiBRUyc (ORCPT + 99 others); Fri, 18 Feb 2022 15:54:32 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233019AbiBRUyb (ORCPT ); Fri, 18 Feb 2022 15:54:31 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B3E1FDFB0 for ; Fri, 18 Feb 2022 12:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645217654; x=1676753654; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=gqs9pgYk8IAWf5YLT2+4r7t94OiRCL9q78qgGVoC8OM=; b=TZPLSKDC/NzFTNXDZOIhC6kK+9fSEEg6QoDoXc4MvwkeCdgnR1+BrHFH 3L0PWcrXs8rK0S/jxKIpPe8NbwcaniMpGFs82nLWatuYgvPCgEKE6dPWb YX7hNE5cMgpIoBzJAHsZvubvtBIATyybist/CwhnGeHN5Oi77mg7QrsY6 AZTpDtHLyi/PxH/QQlcPriBlIaxpsDKsv4c0GakSgJ7pcvfZs4B85gYCF dgisq6Pd4FZ57aYXffCComClQ4EduRW5BzdlRABxVhGpMjDumAg7e8S6e oqkHvf3jfpZ35BnrRWwdyRV+/wycES6zmjRmnOD2lqrfxEDE2XrlGn9p7 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10262"; a="314484332" X-IronPort-AV: E=Sophos;i="5.88,379,1635231600"; d="scan'208";a="314484332" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2022 12:54:13 -0800 X-IronPort-AV: E=Sophos;i="5.88,379,1635231600"; d="scan'208";a="775387524" Received: from cjjohn4x-mobl1.amr.corp.intel.com (HELO localhost) ([10.212.212.214]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2022 12:54:11 -0800 Date: Fri, 18 Feb 2022 12:54:11 -0800 From: Ira Weiny To: Dave Hansen Cc: "Edgecombe, Rick P" , "hpa@zytor.com" , "Williams, Dan J" , "linux-kernel@vger.kernel.org" , "Yu, Fenghua" , "dave.hansen@linux.intel.com" Subject: Re: [PATCH V8 26/44] x86/fault: Print PKS MSR on fault Message-ID: References: <20220127175505.851391-1-ira.weiny@intel.com> <20220127175505.851391-27-ira.weiny@intel.com> <2a919d9ed8ed874f8b89014c0b42cbadb44d837b.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 18, 2022 at 12:20:58PM -0800, Dave Hansen wrote: > On 2/18/22 09:28, Edgecombe, Rick P wrote: > > On Thu, 2022-02-17 at 22:01 -0800, Ira Weiny wrote: > >> Are you suggesting the PKRU should be printed instead or in addition > >> to the > >> PKS? > > Well I was just thinking that PKRS should only be printed if it's an > > access via a supervisor pte. > > That's not *wrong* per se, but it's not what we do for PKU: > > if (cpu_feature_enabled(X86_FEATURE_OSPKE)) > printk("%sPKRU: %08x\n", log_lvl, read_pkru()); > > If the feature is enabled, we print the register. We don't try to be > fancy and decide if it's relevant to the oops. Why don't you just stick > PKRS on the same line as PKRU whenever it's supported? Ah good point. I'll do that. Thanks, Ira