Received: by 10.192.147.86 with SMTP id b22csp4435imc; Fri, 16 Mar 2018 15:08:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELsUfm7X+fxb5PvY27qHT1dAB6tBdmYFkscRwIgqrhlppKzXTRZwWzhE9U9VlX9Bgu/XksvX X-Received: by 10.101.78.201 with SMTP id w9mr2652828pgq.83.1521238084505; Fri, 16 Mar 2018 15:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521238084; cv=none; d=google.com; s=arc-20160816; b=fm03QtWxWvBkva/k/t6i2Z2x71/3RXTHjTU+4xdBVGNKxAZb5HS894F23d0oFCV3Xp h+MQfLle+EgHXxr10ywND3uHciXU965I7liNxpPITtmfuFmaoxIPTQV+Kp8eUktTgjZx RDjwiVrjG16jDAArLam9NBHoxsxeOEZIvc5npO8HpcOaa3nGgXQvoWylnXWCXInFzNc/ 6B9iNZEPzM3UI9Iv0UvR41xRzqQB6M6vnsrttrI85BGyUaF7mqodDlzS6aPXAYMOChu5 Ez3VO8iS443xSJ/TgB9rVab1nNn2TOUqnrqXyhgrtFr372w+IBbpEuTKkiaCsoLUd085 WqCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=TbQe5hEGZSf9SbyAQzCrok/bkvdVpYMs20J7yKEwbtk=; b=j1fz3whhXCLRumbF0fOZOc7rjeBuTvZeqITBPiQfLGfC2OmzqA94VC/LG8M8jbDPh1 zNb5R9eVkMwWjXuTzWNBb8LrAIqCdY837Rch2++RryfiFN/WgPTpvEgJ4FBUmkH6nNGr lWaTIvRmIB64RI35eV88oGsLuFI39u+EDi6jY2LSpvSS8JJ2OJTR7Vz7cBsx2Q3ZD0yN tsyfRY00MK4oBBczhcxReHfl7oMTlUW2D39ZwLHtdGK6UGnjCjTN/e8XMAZHAGfTPgyQ yLX6O3I+sfILiIoHNIgcub7OHTp9GnKpRXJ+vk5K7Ynj+m7tz6avR08figiNimcSfxt9 autQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u25si6182388pfm.164.2018.03.16.15.07.48; Fri, 16 Mar 2018 15:08:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170AbeCPWGz (ORCPT + 99 others); Fri, 16 Mar 2018 18:06:55 -0400 Received: from mga03.intel.com ([134.134.136.65]:26225 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbeCPWGx (ORCPT ); Fri, 16 Mar 2018 18:06:53 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2018 15:06:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,317,1517904000"; d="scan'208";a="25369307" Received: from ray.jf.intel.com (HELO [10.7.201.16]) ([10.7.201.16]) by orsmga007.jf.intel.com with ESMTP; 16 Mar 2018 15:06:52 -0700 Subject: Re: [PATCH v12 06/22] selftests/vm: fix the wrong assert in pkey_disable_set() To: Ram Pai , shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org References: <1519264541-7621-1-git-send-email-linuxram@us.ibm.com> <1519264541-7621-7-git-send-email-linuxram@us.ibm.com> Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, akpm@linux-foundation.org, benh@kernel.crashing.org, paulus@samba.org, khandual@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com, hbabu@us.ibm.com, mhocko@kernel.org, bauerman@linux.vnet.ibm.com, ebiederm@xmission.com, arnd@arndb.de From: Dave Hansen Message-ID: Date: Fri, 16 Mar 2018 15:06:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1519264541-7621-7-git-send-email-linuxram@us.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/21/2018 05:55 PM, Ram Pai wrote: > If the flag is 0, no bits will be set. Hence we cant expect > the resulting bitmap to have a higher value than what it > was earlier. > > cc: Dave Hansen > cc: Florian Weimer > Signed-off-by: Ram Pai > --- > tools/testing/selftests/vm/protection_keys.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protection_keys.c > index 83216c5..0109388 100644 > --- a/tools/testing/selftests/vm/protection_keys.c > +++ b/tools/testing/selftests/vm/protection_keys.c > @@ -443,7 +443,7 @@ void pkey_disable_set(int pkey, int flags) > dprintf1("%s(%d) pkey_reg: 0x%lx\n", > __func__, pkey, rdpkey_reg()); > if (flags) > - pkey_assert(rdpkey_reg() > orig_pkey_reg); > + pkey_assert(rdpkey_reg() >= orig_pkey_reg); > dprintf1("END<---%s(%d, 0x%x)\n", __func__, > pkey, flags); > } I'm not sure about this one. Did this cause a problem for you? Why would you call this and ask no bits to be set?