From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227QHPK9KzjpaKWw85/3mO5FKPSKPftcFjv+L+gfzgFxzUT2xuzlApDZ8on8UfXYZIYveqhI ARC-Seal: i=1; a=rsa-sha256; t=1516647659; cv=none; d=google.com; s=arc-20160816; b=Pezw+d5oYJ48AkUMvyGXjY2TjoKdTjgT6QQ2OPBUrs6BjCj+b7rtv1yKmzC85Zi0H/ N1eDMMuPkJV2zKqOEMrENdTtsYzVQwgcmOsG0uGVqJso+huChkydFdUvblC07NiSBYEr hvaPb3BYQyEFGc+3KhQLw0QfIejBSRkCLcYX7n8AD+oDk5+wtE44svxosj7uPgrenYEL yeTOTo3Ngjx1m8j2Xdvimoz8y6Bp9VYvka4nEZf6xmlT+xW9m0otjiyqE3jpL7tRdj4Q WcpLet5o0sGUOmvpODgvXXIYA4+Yrxj5QUfD3XjeboZ5BOYxpcXg/tdo3gXBxQYNDQ2K I7Zw== 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=W4Wvq7ihsjIjMEHdhAHPI/+KjvZOjyTbB9+w7Ke6VsQ=; b=j5HbkpQZNjF0jSgyiGdZ8PMT4dNLItdkPu41VkBuUR0TXVpyiT2V+DtrwfPHa13rzD Iu9SQ+NJukMOvp1EWjUxZrgi4SHJ0JZh8DOwXiECfBAS9BzlFMT+A8m0ALTOmm+ah3yj 7JM3sqiCHfJEiiFCGDZajrfuOavNsCT2bYq4S5jhmbS2R9o+O8rptTXEMEGauRHmSCCH Yf3GUIV9k5VSGMNemvGOGi/07WIsGR+fkofw19jpBLqGfPQVZpmFTgIEr4dQNwmGSg+C In7fo4qDO6+yTXY3H7eeNolQEFdNWIfqZFi8azUF9Peop8uVpQczzhiQ7zsYwvymkXFR fUHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ayg7H5/M; spf=pass (google.com: best guess record for domain of linux-kselftest-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ayg7H5/M; spf=pass (google.com: best guess record for domain of linux-kselftest-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kselftest-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 S1751189AbeAVSwr (ORCPT ); Mon, 22 Jan 2018 13:52:47 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:37785 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbeAVSwq (ORCPT ); Mon, 22 Jan 2018 13:52:46 -0500 From: Ram Pai To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org 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, 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, arnd@arndb.de Subject: [PATCH v10 00/24] selftests, powerpc, x86 : Memory Protection Keys Date: Mon, 22 Jan 2018 10:51:53 -0800 Message-Id: <1516647137-11174-1-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 Sender: linux-kselftest-owner@vger.kernel.org X-Mailing-List: linux-kselftest@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590320336631261279?= X-GMAIL-MSGID: =?utf-8?q?1590320336631261279?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: Memory protection keys enable applications to protect its address space from inadvertent access from itself. This feature is now enabled on powerpc architecture. The patches move the selftests to arch neutral directory and enhances them. Verified for correctness on powerpc and on x86 architectures(using EC2 ubuntu VM instances). Ram Pai (21): selftests/x86: Move protecton key selftest to arch neutral directory selftests/vm: rename all references to pkru to a generic name selftests/vm: move generic definitions to header file selftests/vm: typecast the pkey register selftests/vm: generic function to handle shadow key register selftests/vm: fix the wrong assert in pkey_disable_set() selftests/vm: fixed bugs in pkey_disable_clear() selftests/vm: clear the bits in shadow reg when a pkey is freed. selftests/vm: fix alloc_random_pkey() to make it really random selftests/vm: introduce two arch independent abstraction selftests/vm: pkey register should match shadow pkey selftests/vm: generic cleanup selftests/vm: powerpc implementation for generic abstraction selftests/vm: clear the bits in shadow reg when a pkey is freed. selftests/vm: powerpc implementation to check support for pkey selftests/vm: fix an assertion in test_pkey_alloc_exhaust() selftests/vm: associate key on a mapped page and detect access violation selftests/vm: associate key on a mapped page and detect write violation selftests/vm: detect write violation on a mapped access-denied-key page selftests/vm: testcases must restore pkey-permissions selftests/vm: sub-page allocator Thiago Jung Bauermann (3): selftests/vm: Fix deadlock in protection_keys.c selftests/powerpc: Add ptrace tests for Protection Key register selftests/powerpc: Add core file test for Protection Key register tools/testing/selftests/powerpc/include/reg.h | 1 + tools/testing/selftests/powerpc/ptrace/Makefile | 5 +- tools/testing/selftests/powerpc/ptrace/core-pkey.c | 438 ++++++ .../testing/selftests/powerpc/ptrace/ptrace-pkey.c | 443 ++++++ tools/testing/selftests/vm/Makefile | 1 + tools/testing/selftests/vm/pkey-helpers.h | 419 ++++++ tools/testing/selftests/vm/protection_keys.c | 1471 ++++++++++++++++++++ tools/testing/selftests/x86/Makefile | 2 +- tools/testing/selftests/x86/pkey-helpers.h | 223 --- tools/testing/selftests/x86/protection_keys.c | 1407 ------------------- 10 files changed, 2778 insertions(+), 1632 deletions(-) create mode 100644 tools/testing/selftests/powerpc/ptrace/core-pkey.c create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c create mode 100644 tools/testing/selftests/vm/pkey-helpers.h create mode 100644 tools/testing/selftests/vm/protection_keys.c delete mode 100644 tools/testing/selftests/x86/pkey-helpers.h delete mode 100644 tools/testing/selftests/x86/protection_keys.c