Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1933444pxb; Fri, 18 Feb 2022 20:13:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkmEaFJwuFQ7n91YrpoLfwdYboB9SrIqzvBxwkiP3t7lqzP6pPClMpXC1a0GCTa1yC1SKy X-Received: by 2002:a50:d79d:0:b0:410:82a0:5d76 with SMTP id w29-20020a50d79d000000b0041082a05d76mr11352933edi.130.1645244016672; Fri, 18 Feb 2022 20:13:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645244016; cv=none; d=google.com; s=arc-20160816; b=ZLsJD6UFL5F2OR6TwwzrR4l+A0mbPgSCLaU0vuxpS/Ljs1cY+RISwsAEiL+TOWJ2FJ hf8E9qLVuveP1NoH4kvvSzEjBBlkJhdbcP3ANUyu0VHJbtuIW/PfAYOdrmAfnQTPSkJv 1tF9Wm/R80OO6Ow0pglcFsFBXwW/fXeUmSX43KCRRB3tMw6iR55Q3oj12cbAQTzWyNQ7 iDWUvJZYCKAbURioqK38Q3ktN+BJMgeJuaKyBscOOqmu9zvWRFSmx2UCy11HnXHEBwt0 +ttFxNT/O0JZg8gpkxenLCgvcq0RGJHY50ReDOKBOgxozQWbirLFLxQKWiDAgXU0eFK+ HrQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=9P5R+5iyc9vaO2hNHt2F/qUjnEWPQPJmFTlPFm75fSQ=; b=QVdDBYpRZSRz4rtWiE6F+dJ1ZFhCAspefqp48x6bxWrHoOWpEob1m4pmo+Yud40c8w /GFgHi9nMfc2kQMu1TYHQ4Tlv57hYhE+hrnS77ekK7/Ob8/awcJyyiE56HHZmEHOYtWU PwFGAfdyoWB4tQlyWdhlmm5VAinPCj2FEJr6SYeB3rCqLiaiSr9SLqNQERVfhOpuUer7 YiUu0l6azXgPdSK6Hn4Uwi1MJKs7oqv5964Hk0GupvGmTj+T7fKJvLoooBCF9P/z77j8 HJOhWmVvJa7Oz82HaEfHuObiBLPRyKe5+/sY54qFrzhVR14UnMkEfBeRj5IPRVTkHl6g Pytg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CjDUwhhB; 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 i13si7487587edl.127.2022.02.18.20.13.00; Fri, 18 Feb 2022 20:13:36 -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=CjDUwhhB; 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 S239454AbiBRU2m (ORCPT + 99 others); Fri, 18 Feb 2022 15:28:42 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232178AbiBRU2l (ORCPT ); Fri, 18 Feb 2022 15:28:41 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50236207564 for ; Fri, 18 Feb 2022 12:28:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645216104; x=1676752104; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=FEyHDEeiGITgQ5C1kGhGtXe6uQjqnf5Jir8+Rthta+8=; b=CjDUwhhBADF1wW4WvASPUOfrhqVEn6kPG/HuLGUZuNwzGI8HsElaQA77 PSRT7nhGrpGjsxhzvHPWDn2+/I0GRDBwpKrJJ9mvEimjPDptdvppiWwEq YF4yDg/UZKGR0j160KQGKCEhL9UacshYPqQBX7upAGjhPvkEX2GJ+gofu Ic+bqtEz0iQCxspnkHAN+iFeOcyavVQZocwFlnb2DMNlCkZP5lf9yJnb3 8gepLjGfdKo/2AiH90duAehkDuA+UGBjrzq1tJUsRPUcYg9VhDu2XQ/rv qBPgipqGi3UBvHgcSCBWN+mwc1AHYDDtDaczi9MRAkmeaVn6p8aW9+4ww Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10262"; a="234749830" X-IronPort-AV: E=Sophos;i="5.88,379,1635231600"; d="scan'208";a="234749830" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2022 12:28:23 -0800 X-IronPort-AV: E=Sophos;i="5.88,379,1635231600"; d="scan'208";a="546459085" Received: from jabonill-mobl1.amr.corp.intel.com (HELO [10.251.27.55]) ([10.251.27.55]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2022 12:25:23 -0800 Message-ID: Date: Fri, 18 Feb 2022 12:20:58 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: "Edgecombe, Rick P" , "Weiny, Ira" Cc: "hpa@zytor.com" , "Williams, Dan J" , "linux-kernel@vger.kernel.org" , "Yu, Fenghua" , "dave.hansen@linux.intel.com" References: <20220127175505.851391-1-ira.weiny@intel.com> <20220127175505.851391-27-ira.weiny@intel.com> <2a919d9ed8ed874f8b89014c0b42cbadb44d837b.camel@intel.com> From: Dave Hansen Subject: Re: [PATCH V8 26/44] x86/fault: Print PKS MSR on fault In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 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?