Message ID | 1516647137-11174-12-git-send-email-linuxram@us.ibm.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org> X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zQM7T2Hw9z9s0g for <patchwork-incoming@ozlabs.org>; Tue, 23 Jan 2018 06:34:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="a6IgMnee"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zQM7T0YmczDqHD for <patchwork-incoming@ozlabs.org>; Tue, 23 Jan 2018 06:34:13 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="a6IgMnee"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400d:c0d::243; helo=mail-qt0-x243.google.com; envelope-from=ram.n.pai@gmail.com; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="a6IgMnee"; dkim-atps=neutral Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zQLDK2fm7zF0XB for <linuxppc-dev@lists.ozlabs.org>; Tue, 23 Jan 2018 05:53:21 +1100 (AEDT) Received: by mail-qt0-x243.google.com with SMTP id s3so23454304qtb.10 for <linuxppc-dev@lists.ozlabs.org>; Mon, 22 Jan 2018 10:53:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=/fQ8YvZUz/rzjD6Jd4exWFMmioMtz/ybDgAlTb3OwFY=; b=a6IgMneeI4pQAwD9jBXvqcYkC9zvrZZ3gmF9hMYu3/9oClAq75v8H7lAUBK4k3vsJb 63h0Ebk0Fl5BRGPDQmqb2MfYf7Q7nYgduBesQO0jdNSdtqULhZUNrnwxhVuVU+2+A1Ih KH36dDnxPZWxkv5t91P0NsQnqZKanI9iyjuV//EP2bYjjYispaHF1rXHkBvY3CF6avao vMt1uHHuXf/XdPBhAaR30TRcbw6YXCRP/U0ydrTABLUUJxpoGPz8z7PaAsrLC75AQ48J 7TpKKWvrUirQ6lwz6ApVckdHdhih3cEbSC/44Y12b3p8fDTUCzKvZWEnDBuCSENnUppZ QH7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=/fQ8YvZUz/rzjD6Jd4exWFMmioMtz/ybDgAlTb3OwFY=; b=qy54jjMbeIYh4gek/Tjj/GLIk6N8Y8cT87IVuT9SfzBF61WDa9LlCF5UpE9wQkKOt+ myf7aRMsSlwFsBLhyWQ0CUoxkvzV8FmZYvgcznUdLcNthCeHgCti0Zv5yeud6tRmj9d+ AtmxoxG6+PlxQnmpoh26SJduYFwygJ/WDJOWKYNmbtZu2jXJhhT3vEa5NqdZl54d4I41 /dBVjTqeSK8x1HTFs1KJg2vIsnX3vgEJ3lkZJ4MA16YupsbA7yla+DGGB/8EiiyPz2Ah 7NVIwc8dKPevwLsCkt1ifsxfUm90YRjyh9cjJHOe/nSV7oLXW5iuyVRLfkmjf5PvUiTe zEbw== X-Gm-Message-State: AKwxytcvALJDCWuXqYQYoH6mUARcc110sFoyuYywAuEuYtxmwTKN3ATV FyOQOfEVNtgtwPHFMKhmSBo= X-Google-Smtp-Source: AH8x225Ep8PNo6JBlTSOt1dSzqYamlbReV8HfjmondqGd+kTQpcq2Y7uZhHUGwPb/PKyYlomFsRVEQ== X-Received: by 10.55.40.204 with SMTP id o73mr12128163qko.173.1516647199350; Mon, 22 Jan 2018 10:53:19 -0800 (PST) Received: from localhost.localdomain (50-39-100-161.bvtn.or.frontiernet.net. [50.39.100.161]) by smtp.gmail.com with ESMTPSA id o20sm10790061qkl.14.2018.01.22.10.53.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 10:53:18 -0800 (PST) From: Ram Pai <linuxram@us.ibm.com> To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Subject: [PATCH v10 11/24] selftests/vm: pkey register should match shadow pkey Date: Mon, 22 Jan 2018 10:52:04 -0800 Message-Id: <1516647137-11174-12-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1516647137-11174-1-git-send-email-linuxram@us.ibm.com> References: <1516647137-11174-1-git-send-email-linuxram@us.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linuxppc-dev/> List-Post: <mailto:linuxppc-dev@lists.ozlabs.org> List-Help: <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe> Cc: linux-arch@vger.kernel.org, ebiederm@xmission.com, arnd@arndb.de, linux-doc@vger.kernel.org, x86@kernel.org, dave.hansen@intel.com, linux-kernel@vger.kernel.org, linuxram@us.ibm.com, mhocko@kernel.org, linux-mm@kvack.org, mingo@redhat.com, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, bauerman@linux.vnet.ibm.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, khandual@linux.vnet.ibm.com Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org> |
Series |
selftests, powerpc, x86 : Memory Protection Keys
|
expand
|
diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protection_keys.c index 254b66d..6054093 100644 --- a/tools/testing/selftests/vm/protection_keys.c +++ b/tools/testing/selftests/vm/protection_keys.c @@ -926,10 +926,10 @@ void expected_pkey_fault(int pkey) pkey_assert(last_pkey_faults + 1 == pkey_faults); pkey_assert(last_si_pkey == pkey); /* - * The signal handler shold have cleared out PKEY register to let the + * The signal handler shold have cleared out pkey-register to let the * test program continue. We now have to restore it. */ - if (__rdpkey_reg() != 0) + if (__rdpkey_reg() != shadow_pkey_reg) pkey_assert(0); __wrpkey_reg(shadow_pkey_reg);
expected_pkey_fault() is comparing the contents of pkey register with 0. This may not be true all the time. There could be bits set by default by the architecture which can never be changed. Hence compare the value against shadow pkey register, which is supposed to track the bits accurately all throughout Signed-off-by: Ram Pai <linuxram@us.ibm.com> --- tools/testing/selftests/vm/protection_keys.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)