Received: by 10.192.165.148 with SMTP id m20csp799746imm; Fri, 4 May 2018 21:43:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoNYV6RAlf48RnsRRSlhSTr5clRW1n5ppv1Up+px7iVSf28qpTGdX/8J9lJfBaoCAuxeV1s X-Received: by 2002:a63:77ce:: with SMTP id s197-v6mr23746142pgc.272.1525495383415; Fri, 04 May 2018 21:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525495383; cv=none; d=google.com; s=arc-20160816; b=zA6mIbUWj06bMB31LniF0xYQdRJdi7c5BqVOx11VKaZ3yeG4xqUgUxNZigS4tCzN26 PhEyPHwMzRODQYYOUI7KpGD9iJrK1aJUcAmbrSDxrKnX3BoOI1oIXAeitMI/niQ4+uVJ wfEmYM1W+PYnj96Zf4B6kHk8GAXvZJOF0BiTuVe3iKR9d+P+nYYx14Yh1sSYwqv1XljD 64zl4gdza68bBpZezbgTZizG9c1B8wyhxrDMfWxdyAoYd8ps5t1L7iVwF5HXj3iWNaUQ 8SDo9jC4erz7t792Tt3TPgV0Z4gAobbPJHlERJpPDj/xPKsyb6XKV23QdUjeAZNfprpo 0Z6w== 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:openpgp:from:cc:references:to:subject :arc-authentication-results; bh=Z8zpIhh9WVLgnfIGRPDjAIM4fM4d+dKFqptmLstJI9A=; b=z6tgDOmd/xY7uGreyNUhF72gou9a2qkhOAl3JNJ04ZZes4txGP8j5O2rBd3kFKpVIq PAsB4qSULwCWcyPhr2zjb6fGPP3PBy9YC+/HO8i4g0P3eJ/8JjfL6ONTIv6VlLeBpAW6 l9YIKi9fuPSKXVgHHp/riSBPl/Tppg9zx3ODqtaBs6q8AX3dws0mgJ89Mq65MwI5/20E nFF5jcXRSGGMjqjcUZf7Mt/cDrOOWJsjq4cYlveNCWi/hdsHK/2kXy1uA5UkTDND8vU/ AVC/AJlFkYhweqOY0llsq9GPf2xDHZieuDsNvhjvn9x0lD9kgYnhbIycLkqpdhI1dwy2 YKLA== 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 j7-v6si8430775pgp.347.2018.05.04.21.42.48; Fri, 04 May 2018 21:43:03 -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 S1751200AbeEEEmn (ORCPT + 99 others); Sat, 5 May 2018 00:42:43 -0400 Received: from mga14.intel.com ([192.55.52.115]:35021 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752AbeEEEmk (ORCPT ); Sat, 5 May 2018 00:42:40 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 May 2018 21:42:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,364,1520924400"; d="scan'208";a="36994747" Received: from jramire2-mobl1.amr.corp.intel.com (HELO [10.254.105.93]) ([10.254.105.93]) by fmsmga007.fm.intel.com with ESMTP; 04 May 2018 21:42:39 -0700 Subject: Re: [PATCH v13 3/3] mm, powerpc, x86: introduce an additional vma bit for powerpc pkey To: Ram Pai References: <1525471183-21277-1-git-send-email-linuxram@us.ibm.com> <1525471183-21277-3-git-send-email-linuxram@us.ibm.com> <1e37895e-5a18-11c1-58f1-834f96dfd4d5@intel.com> <20180505011243.GB5617@ram.oc3035372033.ibm.com> Cc: mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.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, corbet@lwn.net, arnd@arndb.de From: Dave Hansen Openpgp: preference=signencrypt Message-ID: <7d1de723-f001-ebbe-6026-91bef88c566d@intel.com> Date: Fri, 4 May 2018 21:42:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180505011243.GB5617@ram.oc3035372033.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 05/04/2018 06:12 PM, Ram Pai wrote: >> That new line boils down to: >> >> [ilog2(0)] = "", >> >> on x86. It wasn't *obvious* to me that it is OK to do that. The other >> possibly undefined bits (VM_SOFTDIRTY for instance) #ifdef themselves >> out of this array. >> >> I would just be a wee bit worried that this would overwrite the 0 entry >> ("??") with "". > Yes it would :-( and could potentially break anything that depends on > 0th entry being "??" > > Is the following fix acceptable? > > #if VM_PKEY_BIT4 > [ilog2(VM_PKEY_BIT4)] = "", > #endif Yep, I think that works for me.