Received: by 10.213.65.68 with SMTP id h4csp659696imn; Fri, 16 Mar 2018 14:57:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELvSfUyvbC8tHnNaEd+XwTefexQZy72xzbfxvv1TghWCanCLyh2GK40cmft238iiOVKv+v6w X-Received: by 2002:a17:902:9888:: with SMTP id s8-v6mr315235plp.318.1521237425279; Fri, 16 Mar 2018 14:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521237425; cv=none; d=google.com; s=arc-20160816; b=zJJh3xqy3KaifWBAAVgTPg/lmjs3A0oBvcXt7x/mb06yUTnEnMx6a7bk155BJSgjzJ Ey6wmwTjeujvVd9xkScqIvR22RDXqf2et0RoidAtXde2AcfppJ13PVJRROCl7T9B9vuw NCPMUt6NZgmHZNlZ4HZB8dKFgV7Ur8Bw5GdwPbzorqCtK0784sMRR2w851Ks7KhAn+d7 KcIEpau2a4uPT/mpxIyGxFZHKzlHPcRHD7UTTOObwPtqKTN45cbbpeDIIzLsx9g88Ct1 Jji+rdTX/o4DP0mDrccQeR+svAYnWjeyYnXDNuVYbOFUJwCnVrppCNtiA5Vk83MNdjWx ktjw== 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=/phmxgkde85yCl338b8zfzLimctp05IYVGnS0aGA8Kw=; b=bst7DzKG2iYfOyAGFMApt50gsVPq5DjXcgq1HMr/j5IaJ4cYlwWdBcOruUecQljXXr o7GUUhVtUMSK/SkHpzPXu+Bh+bJVusj2RS++hYogQQgpT0W05ljRdK98kLVMQU+lpj1Z NsYiO7XTAWKbj6G/dHgfXDOc63t7rPYspXPMNpvCP+tK0T+rVJVEvaV5CSVkDDGGM9oa fR8A7gO+ACqzYoI4JnJOcYOCVfDdRvUrbeVQwDL/nCod+nUmP6Lt4ub43YwH8nRWIiVz d7SdC6oZbfcqzMJm+H5rpkkcocit5GSf0nbDwBGmA8yHvFqF+MYg76AzE+VfulLBVXeZ Z0zw== 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 u136si5653114pgc.784.2018.03.16.14.56.33; Fri, 16 Mar 2018 14:57:05 -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 S1751618AbeCPVzg (ORCPT + 99 others); Fri, 16 Mar 2018 17:55:36 -0400 Received: from mga03.intel.com ([134.134.136.65]:25658 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750826AbeCPVzf (ORCPT ); Fri, 16 Mar 2018 17:55:35 -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 14:55:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,317,1517904000"; d="scan'208";a="25364983" 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 14:55:34 -0700 Subject: Re: [PATCH v12 02/22] selftests/vm: rename all references to pkru to a generic name 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-3-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: <61350ceb-974f-6039-ae1e-f2626c405676@intel.com> Date: Fri, 16 Mar 2018 14:55:26 -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-3-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: > int pkey_set(int pkey, unsigned long rights, unsigned long flags) > { > u32 mask = (PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE); > - u32 old_pkru = __rdpkru(); > - u32 new_pkru; > + u32 old_pkey_reg = __rdpkey_reg(); > + u32 new_pkey_reg; If we're not using the _actual_ instruction names ("rdpkru"), I think I'd rather this be something more readable, like: __read_pkey_reg(). But, it's OK-ish the way it is. Reviewed-by: Dave Hansen