Received: by 10.223.185.116 with SMTP id b49csp1287309wrg; Wed, 21 Feb 2018 15:55:33 -0800 (PST) X-Google-Smtp-Source: AH8x226t5fnYTeBHHYtWUnI0sI/E9sE6U/UTgYDcBM+vISI66wIs9QZwqaiAkj9TLgfjid7e8wpx X-Received: by 2002:a17:902:d806:: with SMTP id a6-v6mr4640134plz.274.1519257333510; Wed, 21 Feb 2018 15:55:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519257333; cv=none; d=google.com; s=arc-20160816; b=VP7+Ti6sAGdywsiFXq3e6tq+O409EIibQAgnGlfgH4Li/CV9nMPvF5UntXccM4PLiG pxbrcAgLqi8MSXyH+zTau58xMFZpQcJVlh0Z0GoPxXY9oQKAX4sgFhVN5ow5YTeSSUsl 9Fo/gqAYnMYcLYah+zW2a3vTUgzb9LiZFyuukgfaZSGwfdichKUgHTg7AkW2kFyXBq3R tsTLoaLEWMz705CiV17VgpdU6d6dNJ1kgqogKUQixo9flZzTSZsVh9Q+hQ4SEAt8QFsM sukcOgwXgOJMRbagdBKVFRE2J5sa8aNQOXzuNRj2Z78YAPnR3nQzzQkPAaeuEpqTiwGh lmYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=DG8b2C0ZBhu2b9kQc1D+pmcDKBeCXRcs3VpLdd+5OvA=; b=QDeCCy72aEBHJsU4zTKfxM4mIfp+HoFyQFu0bTpzWKgl7lOtqCzW9Tv8zmS5/DdhmL CNmkrp16hfvv459PBjKBob2DngqSUkOaXvFrs8Y582+UsBEkZtK3JmmkmguVevuBo3z/ d89BjrYI4B7efVJ+KvzyRbCzOdLAb3l4/1uMRC/3aB7CicX5Eo8Rj4ZEl2G9rU3TI85S xDJOSGr7DnFjoqlSWZal74NRfB0pwNp23MVV5PrQdC3d89MqngMbLq1hI4ctrpJ6xxWF 6+XZpcMbpqI+I6oFOeNlTPsbVBxtwvrPbj0vmqNsUYvBP/Ms8nUwPynu7sKmtZkTvqc4 +nCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=NVmgM4nb; 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 o32-v6si7964728pld.52.2018.02.21.15.55.19; Wed, 21 Feb 2018 15:55:33 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=NVmgM4nb; 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 S1751404AbeBUXxG (ORCPT + 99 others); Wed, 21 Feb 2018 18:53:06 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:37970 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbeBUXxE (ORCPT ); Wed, 21 Feb 2018 18:53:04 -0500 Received: by mail-qt0-f194.google.com with SMTP id k13so4229138qtg.5; Wed, 21 Feb 2018 15:53:03 -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; bh=DG8b2C0ZBhu2b9kQc1D+pmcDKBeCXRcs3VpLdd+5OvA=; b=NVmgM4nb/yCPu86jS18ebRk0ygBmfdOUJUpp30ibgs46g+J22QSrRWoBPMW3ljotcZ 7tkHUQFyXsdOV6aUGK22o3l5Hh+AqJPweqhyxxynngacOOaAzf6mxYxWgrElMRUQgc3z f47SyLRnYSgAAeH1adM8pPxNL5mC0/m3iKCk35pZIH+UfEYRp8PmcyqdUJgq5mhb+YXP BBJHHH9UHgJ+FBAAHm2CLiNtizx51Ff8GRwJNBAjnkoFToyzxmk1MllLLHp3GIROSvKe qjpIsxbl+tl9m3en/OwvsBjdOPjjUDtkkW5oEPfZQpHJ4ncZm4qgcDY1UAwiBJDRT4Jj oYQw== 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; bh=DG8b2C0ZBhu2b9kQc1D+pmcDKBeCXRcs3VpLdd+5OvA=; b=uh1tQeGFuiLf0/9HAtWnvaD2ircLCSlg7LjSiLXNAROPB4iTKKKCPhm3tcyOMDmpmN Gw3zAITERbx6+OHXh2ydxNhL49fu5RhuapF+SZ+z8Vpdh7JGKzpO9VFi1VEGTehA0aTB HJg2zCIXCOeq0cYW9CVO3XDNtWZQqvkHjuLB7ojlYHktlefQkziIVTJk4hIEr/6irmr6 SKkb/1FsxwtdmUuTlJ2Bs1HIcVznjUHQLQJUj0vu0KlZHgwLQzyhCc6mGDLG96uL3kGL pIvqEeeTRoqJkyWfYlc33wjguLHfob1oceGpsqxkCDHdU343Th0XpvlKPxvzDPNdk1ui uuhA== X-Gm-Message-State: APf1xPD0hsfyLGTSjZoaaPuclEdiqUV7IbZMcbhY4LUIvCmdo9xjzTO5 rCxc5MrIyxC2PG3N8fO6j3M= X-Received: by 10.200.53.137 with SMTP id k9mr8202035qtb.37.1519257183470; Wed, 21 Feb 2018 15:53:03 -0800 (PST) Received: from localhost.localdomain (50-39-100-161.bvtn.or.frontiernet.net. [50.39.100.161]) by smtp.gmail.com with ESMTPSA id b25sm3804881qte.40.2018.02.21.15.53.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 15:53:02 -0800 (PST) From: Ram Pai To: mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org Cc: linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, dave.hansen@intel.com, 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, linuxram@us.ibm.com, corbet@lwn.net, arnd@arndb.de, fweimer@redhat.com, msuchanek@suse.com Subject: [PATCH v12 0/3] mm, x86, powerpc: Enhancements to Memory Protection Keys. Date: Wed, 21 Feb 2018 15:52:15 -0800 Message-Id: <1519257138-23797-1-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series provides arch-neutral enhancements to enable memory-keys on new architecutes, and the corresponding changes in x86 and powerpc specific code to support that. a) Provides ability to support upto 32 keys. PowerPC can handle 32 keys and hence needs this. b) Arch-neutral code; and not the arch-specific code, determines the format of the string, that displays the key for each vma in smaps. History: ------- version v12: (1) fixed compilation errors seen with various x86 configs. version v11: (1) code that displays key in smaps is not any more defined under CONFIG_ARCH_HAS_PKEYS. - Comment by Eric W. Biederman and Michal Hocko (2) merged two patches that implemented (1). - comment by Michal Hocko version prior to v11: (1) used one additional bit from VM_HIGH_ARCH_* to support 32 keys. - Suggestion by Dave Hansen. (2) powerpc specific changes to support memory keys. Ram Pai (3): mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled mm, powerpc, x86: introduce an additional vma bit for powerpc pkey mm, x86, powerpc: display pkey in smaps only if arch supports pkeys arch/powerpc/include/asm/mmu_context.h | 5 ----- arch/x86/include/asm/mmu_context.h | 5 ----- arch/x86/include/asm/pkeys.h | 1 + arch/x86/kernel/fpu/xstate.c | 5 +++++ arch/x86/kernel/setup.c | 8 -------- fs/proc/task_mmu.c | 15 ++++++++------- include/linux/mm.h | 12 +++++++----- include/linux/pkeys.h | 7 ++++++- 8 files changed, 27 insertions(+), 31 deletions(-)