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=-7.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 24F80C47087 for ; Wed, 26 May 2021 00:36:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07D7A6142B for ; Wed, 26 May 2021 00:36:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232433AbhEZAhw (ORCPT ); Tue, 25 May 2021 20:37:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:48630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232290AbhEZAhv (ORCPT ); Tue, 25 May 2021 20:37:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 337B961417; Wed, 26 May 2021 00:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621989380; bh=RBMGbeZu4A2cx68tY/JJKgbT/nI1ZhbnRdLIZCYQX5g=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=UcBEfJHmGEVSVZuptkZyVUdiMQLyZq+Aib3/HRZ/zpBqn7/s+WyKw8ZVC9V3qo6br Q6A0Zuppcfawd9EMdDnBIZxiwu8mDPuNNaI69fgt2NGYBHCFVeK6qi+nXILtskanih NO1qJHbY9k9Bk4JlnoNEG8doIy6O5pigyyotAgaxedBNVCMZFVxGCSKyYBVaipSlt+ XipKLPmHWWyYEpJKVycnAre/bSxXGSNbOAld6GB6xd04gz0gCS+aVPhMliT+Weeoyj IMVZSGYlQqiAkEs2qb1Ni1ASGyhFlteQA5Gf2MCXlbfSNRPYEDKHo1mfYqIqQJH6N4 i4AlpWr1pDYdQ== Subject: Re: x86/fpu/xsave: protection key test failures To: Babu Moger , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, peterz@infradead.org, shuah@kernel.org, jroedel@suse.de, ubizjak@gmail.com, viro@zeniv.linux.org.uk, jpa@git.mail.kapsi.fi, fenghua.yu@intel.com, kan.liang@linux.intel.com, akpm@linux-foundation.org, rppt@kernel.org, Fan_Yang@sjtu.edu.cn, anshuman.khandual@arm.com, b.thiel@posteo.de, jgross@suse.com, keescook@chromium.org, seanjc@google.com, mh@glandium.org, sashal@kernel.org, krisman@collabora.com, chang.seok.bae@intel.com, 0x7f454c46@gmail.com, jhubbard@nvidia.com, sandipan@linux.ibm.com, ziy@nvidia.com, kirill.shutemov@linux.intel.com, suxingxing@loongson.cn, harish@linux.ibm.com, rong.a.chen@intel.com, linuxram@us.ibm.com, bauerman@linux.ibm.com, dave.kleikamp@oracle.com References: From: Andy Lutomirski Message-ID: Date: Tue, 25 May 2021 17:36:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On 5/25/21 2:37 PM, Babu Moger wrote: > Investigation so far. > 1. The test fails on AMD(Milan) systems. Test appears to pass on Intel > systems. Tested on old Intel system available here. Ten cents says that you have discovered that AMD returns a synthesized value for XINUSE[PKRU] and that write_pkru() is buggy. Any volunteers to fix the if (!pk) case in write_pkru() and see if the problem goes away? (Or at least to print something for the if (!pk) case and seee if it gets printed?) --Andy