Received: by 10.223.176.46 with SMTP id f43csp276889wra; Thu, 25 Jan 2018 21:56:43 -0800 (PST) X-Google-Smtp-Source: AH8x225zzYYL4ruQrS9ppwKVAaFFS2j8YBq9dDpuESrM4Mphl0t/sUQ5JZjL48spSzNk3Lc8AQf1 X-Received: by 10.98.74.20 with SMTP id x20mr18453688pfa.191.1516946202971; Thu, 25 Jan 2018 21:56:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516946202; cv=none; d=google.com; s=arc-20160816; b=TZXclhzWpS0Qt5rJRS+DS+UBR4Za/gz8h0PvB0pwEFYnmXHMWJj+7KrDsf1Ed6i+KD 6soF7QTJDynJ3pNMukgbfk9Gy2r1ua31xQGwNj0bWaXVG4vOGaKvtbKNHdIOGnwxaM+A BPU+WMKBi/uRF0UWChJIzVjCZTR9VPe6haNVgsJed9/qp2Pgm5bdIuUMQTJ3y/MYz9oT AjweVW8hr0FZ6nnOKsZ6q4BXg3Z8Bj6yO7qSA4fGvrjnn6sZ8r3t544Rg2YNLmZexkyA 7AQAVlKx04E372pKfFD0ehf/lbM1P4eEjyifnF/dSt4DXIZgDUc2jH02YMDOHX21JBWv dZ0g== 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 :arc-authentication-results; bh=4eT5JBqLtL5BKZuMblIR/LEGzqvITTnuVdVI3bc7F2U=; b=U0h8IHMMpGfGdmpf4ivMwWN3PDgIZ8p1DmB/9/8hJEBqtHdvE0m7Gy9osew1vfRj9S sfNCpPSDMxC+HVYkR8ctUoYcS2GHbULLAzn1hTMSdMhQO/zjnutnVcUPPTaPmlBU+7/1 YowRtd02AohCq4GwtVTI8OrcrsKlVowDSXwWOzedrb3YMWtQkSlb7V/X3qduFtBlvT4Q azHY0/NyEiLyXtNf2gjUpHe0QVp8FHGwNPyTkgI0M+i6qBqqlVou+Pz6j7zpUqkKCKv/ GfSMGFvkJw2xNkYj+uVN+EMfN4251pRRlirG1PRKuKOLmYqyvOALaCcW4MW8IBgVumDd aVng== 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 t9si1493503pgb.152.2018.01.25.21.56.18; Thu, 25 Jan 2018 21:56:42 -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 S1751771AbeAZFzi (ORCPT + 99 others); Fri, 26 Jan 2018 00:55:38 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37302 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbeAZFzg (ORCPT ); Fri, 26 Jan 2018 00:55:36 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0Q5sIbA092231 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 2fqxjn02eg-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 Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Ellerman , Ram Pai , Thiago Jung Bauermann 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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