Received: by 10.223.185.116 with SMTP id b49csp6628003wrg; Thu, 8 Mar 2018 10:26:49 -0800 (PST) X-Google-Smtp-Source: AG47ELtRIbgSmvW8BMPqTqP7JCWZyEnRd7z7xdGO/gjNxym+XDYyBFsHYGxD6T7zo2CzJu+2Ppkn X-Received: by 2002:a17:902:4601:: with SMTP id o1-v6mr24803069pld.210.1520533609857; Thu, 08 Mar 2018 10:26:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520533609; cv=none; d=google.com; s=arc-20160816; b=S8nCJoqphILXdkuDCsHvukeNczsVGIIAbC1ywSMTeGSpnoIp7rK6nNcHuX/VTW8Abd wuF0S9Pr7dt3Me6ylSQjDlnKI3WR7oEV38kj3njKslutZLd1WJoJYBm5O9tBdINP8+ox QQB7NNGFCTAVimyN+XkdkgaV7CHS1PYINXllpBGlsRPcfAQ1Hwm/NhhkVl62svX7VzPS 78gdwcvAarAqBFwaf6gyGdz9PrhTtrAOaXBjYdKN7Xsw57wCD3gF9PXlZtQ3ykvBUI4o 9uDX9qDqaak9dqSTtzYJjLvxGqOjMtmzhS1Wj6WSCevhOrG53vRpZOSB8ct9wwExWjVm BUUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=8NNpyKJ6A27QKZ/Golm6O0crnWyBlMmZe6h17ct+k7U=; b=XJVWcAW6bSTqL3BpkVJOql2HfXRCB97jHbc2PTR5aR4DY+8BWg1Rbssj50HbT6Snul L5x36xpJjiFDYR3D0bWPbkjeKlEs42VZvDrC+FtYLDuLD84XcBbz8JnxcOodQgY6HKl1 uj3oOPoAsGWG4iV5l4bEZXNCPNXvL9CBraFe4y0IyNKibBlKalWr5wb/OvnulEf+mZfY 0HZKUxSdcbX8s6p0vMzRpInWfZQ3LRxHfAO0Eb+8A50hFmU/eHp+SuwB11O7Prs/X5y5 gE5pXbsv61ArgHY8snTC/Zpq2CeapV9YH44mtlD1hx8JGYUAQKZbcaSK4QJv0+FiDNIZ F9Hg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si13309137pgq.562.2018.03.08.10.26.33; Thu, 08 Mar 2018 10:26:49 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752244AbeCHSZg (ORCPT + 99 others); Thu, 8 Mar 2018 13:25:36 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58140 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751642AbeCHSZe (ORCPT ); Thu, 8 Mar 2018 13:25:34 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w28IOPHP050293 for ; Thu, 8 Mar 2018 13:25:34 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gk843pgpg-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 08 Mar 2018 13:25:33 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 Mar 2018 18:25:31 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 8 Mar 2018 18:25:25 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w28IPPvi57933886; Thu, 8 Mar 2018 18:25:25 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 783A2A4051; Thu, 8 Mar 2018 18:18:20 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC63CA404D; Thu, 8 Mar 2018 18:18:15 +0000 (GMT) Received: from ram.oc3035372033.ibm.com (unknown [9.85.196.180]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 8 Mar 2018 18:18:15 +0000 (GMT) Date: Thu, 8 Mar 2018 10:25:17 -0800 From: Ram Pai To: Dave Hansen 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, fweimer@redhat.com, msuchanek@suse.com, Ulrich.Weigand@de.ibm.com Subject: mm, x86, powerpc: pkey semantics for key-0 ? Reply-To: Ram Pai References: <1519257138-23797-1-git-send-email-linuxram@us.ibm.com> <1519257138-23797-4-git-send-email-linuxram@us.ibm.com> <2a7737cf-a5ba-c814-fdc7-45b5cdd47376@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2a7737cf-a5ba-c814-fdc7-45b5cdd47376@intel.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 x-cbid: 18030818-0012-0000-0000-000005BA81C1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030818-0013-0000-0000-00001936A343 Message-Id: <20180308182517.GO1060@ram.oc3035372033.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-08_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803080208 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dave, Is there a reason why the default key; key-0, is not allowed to be explicitly associated with pages using pkey_mprotect()? I see valid usecases where an application may initially want to associate an address-range with some key and latter choose to revert to its initial state, by associating key-0. However our implementation (both x86 and power) do not allow pkey_mprotect() to be called with key-0. I do not see a reason why it must be blocked. Thoughts? RP