Message ID | 1509958663-18737-43-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 3yVqJ356kSz9s7h for <patchwork-incoming@ozlabs.org>; Mon, 6 Nov 2017 21:56:51 +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="vfW/QW1r"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yVqJ31QzYzDr5T for <patchwork-incoming@ozlabs.org>; Mon, 6 Nov 2017 21:56:51 +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="vfW/QW1r"; 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::241; helo=mail-qt0-x241.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="vfW/QW1r"; dkim-atps=neutral Received: from mail-qt0-x241.google.com (mail-qt0-x241.google.com [IPv6:2607:f8b0:400d:c0d::241]) (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 3yVmjZ1P8czDr5S for <linuxppc-dev@lists.ozlabs.org>; Mon, 6 Nov 2017 20:00:18 +1100 (AEDT) Received: by mail-qt0-x241.google.com with SMTP id 8so10018237qtv.1 for <linuxppc-dev@lists.ozlabs.org>; Mon, 06 Nov 2017 01:00:18 -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=7fYn2izaxSjTxs8dUtt7yzb8vGOAgqpr6p90p3ZLgcE=; b=vfW/QW1rVJ+PtV0rvyTfwT9LkW4gRcVsC0/BxmSrWCxYFWp65pG2nZrgSUbBn8MJ92 VSleaBQ6n8Jn7bwShB6EU13IN9p22o/tWFody8vlWJm44bQSzsuJLKJhJw7NcxRk31Li 5kFyxuDSHFGjimIGLQPbJgwdBcF3wfr7UAJNTitCaG9OGJM08vsiopQOd1VGD3OrpYyI 4Bv9xCQWO8jh7rosIJUtsO6ABgAOHYxy2z1vYyIoZgxmg94errUixJT46j6ofqH2G0ge jChtgzKi5Uf1Fx4Xk+T0F5TzEIzW4zCR51lmqN8qwAk3rZuDEm+LXaUOEBsYgduLbZDZ y06w== 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=7fYn2izaxSjTxs8dUtt7yzb8vGOAgqpr6p90p3ZLgcE=; b=AaFO4jGfLfG+wW3jQRv8BBWhVMhOuQucpRrRlDfbtgqVgbjOBBhYS87ICa3oY03USp QqhFetUXdVsLVF8C1WkQaZOXInk2nn4ckaKi98AStkG/rZ2W7uSUdBsiD1lEYz+uhmJp /o5b45hb5GMb1R3ydIQFyJNwS6MCkPx166otOTtzXkUhrq94rSinxdVseI2mmR72sqka gso0+Pl+FxIeoMPDVEhzKIwAaAgFojOFnRAxoM/q8/SzFIg+TOAEvqWj1yfU7t6xvfRJ ijEpz4oML9/w/fKAcJK9QIj+PIvttDX3WhyhcZ9U3nwl/DNtHWqEksaX+vLx83I2S1nR LncA== X-Gm-Message-State: AMCzsaWbl9wjxX12Krf8YsrTtK4TksXtEr2Nvyg2KJ1j70qESDHTK6PW mEstOaxKUJNKTSkzYZOSppg= X-Google-Smtp-Source: ABhQp+QbvnuqOL1XWjxywJkZBpDp1ikt78+b1Zh21+nuZdbh87pkeebAeuxhv+JpMZw7Oy9hvyy7Ug== X-Received: by 10.200.37.107 with SMTP id 40mr22048624qtn.85.1509958816274; Mon, 06 Nov 2017 01:00:16 -0800 (PST) Received: from localhost.localdomain (50-39-103-96.bvtn.or.frontiernet.net. [50.39.103.96]) by smtp.gmail.com with ESMTPSA id r26sm8001094qki.42.2017.11.06.01.00.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Nov 2017 01:00:15 -0800 (PST) From: Ram Pai <linuxram@us.ibm.com> To: mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, arnd@arndb.de Subject: [PATCH v9 42/51] selftest/vm: pkey register should match shadow pkey Date: Mon, 6 Nov 2017 00:57:34 -0800 Message-Id: <1509958663-18737-43-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1509958663-18737-1-git-send-email-linuxram@us.ibm.com> References: <1509958663-18737-1-git-send-email-linuxram@us.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 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, 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, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, linux-kselftest@vger.kernel.org, bauerman@linux.vnet.ibm.com, 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 |
powerpc, mm: Memory Protection Keys
|
expand
|
diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protection_keys.c index 19ae991..2600f7a 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(-)