From patchwork Fri Jan 26 05:55:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 866166 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zSSqS2WyRz9s9Y for ; Fri, 26 Jan 2018 16:57:40 +1100 (AEDT) Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zSSqS1D2fzF0Sk for ; Fri, 26 Jan 2018 16:57:40 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=bauerman@linux.vnet.ibm.com; receiver=) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zSSn622DgzF0RQ for ; Fri, 26 Jan 2018 16:55:38 +1100 (AEDT) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0Q5sJ1F019263 for ; Fri, 26 Jan 2018 00:55:36 -0500 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fqwvhsc4r-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 26 Jan 2018 00:55:35 -0500 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Jan 2018 00:55:34 -0500 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 26 Jan 2018 00:55:31 -0500 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0Q5tV3M48758936; Fri, 26 Jan 2018 05:55:31 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9467CAE03B; Fri, 26 Jan 2018 00:56:46 -0500 (EST) Received: from morokweng.ibm.com (unknown [9.85.184.1]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id C7213AE034; Fri, 26 Jan 2018 00:56:44 -0500 (EST) From: Thiago Jung Bauermann To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 0/2] Testcases for protection keys feature in powerpc/next Date: Fri, 26 Jan 2018 03:55:21 -0200 X-Mailer: git-send-email 2.16.1 X-TM-AS-GCONF: 00 x-cbid: 18012605-0040-0000-0000-000003E972F6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008430; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000248; SDB=6.00980484; UDB=6.00497043; IPR=6.00759785; BA=6.00005795; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019221; XFM=3.00000015; UTC=2018-01-26 05:55:32 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18012605-0041-0000-0000-000007DEDB25 Message-Id: <20180126055523.29456-1-bauerman@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-26_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 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-1801260079 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thiago Jung Bauermann , Ram Pai , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Ram Pai submitted a separate series containing the rework of the x86 test and also the powerpc-specific tests: https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=24741 There's a bug in the powerpc tests where they expect the AMR, IAMR and UAMOR registers to be zeroed when a process starts. This is currently true on powernv but isn't on LPARs, where key 31 is reserved and its bits are set. This causes the tests to fail on that platform. This series fixes the bug and now the tests pass on both powernv and LPAR machines running powerpc/next. I think it's worth submitting these tests separately from the one coming from x86 so here they are. Thiago Jung Bauermann (2): selftests/powerpc: Add ptrace tests for Protection Key registers selftests/powerpc: Add core file test for Protection Key registers tools/testing/selftests/powerpc/include/reg.h | 1 + tools/testing/selftests/powerpc/ptrace/Makefile | 8 +- tools/testing/selftests/powerpc/ptrace/child.h | 130 ++++++ tools/testing/selftests/powerpc/ptrace/core-pkey.c | 460 +++++++++++++++++++++ .../testing/selftests/powerpc/ptrace/ptrace-pkey.c | 326 +++++++++++++++ tools/testing/selftests/powerpc/ptrace/ptrace.h | 37 ++ 6 files changed, 961 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/powerpc/ptrace/child.h create mode 100644 tools/testing/selftests/powerpc/ptrace/core-pkey.c create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c