From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x225hK3xroP0kB+RP7kjjs6ZjNX9tv6F6blhs1z9FjyohQsOgHEKbHUzWtN59Q8Igk5a/JM5G ARC-Seal: i=1; a=rsa-sha256; t=1516946137; cv=none; d=google.com; s=arc-20160816; b=JYoOqiwTg57OUTxh4z6hrf1u6MDhIejQZDd1Sl7/l2nPkvpPi/6Y3KDZnhFLfmFsNp w3UFuVc+aTEhHK5pOVypjJYEGXMu9UBSGQzGlN1+EpFLkr57v2bFsEqK6JN8dcDOG+fq Vp2hBxDPhRLXXJlWawDcu4c2Tj0dnK/tKmCxSOTp6qWNqn+GHoSBuuYg1EjEHgqYbHDQ Koj9T5LDA7zwoAvM1ynVZ5A1sE3eE7knpxQC7JrZe1U8PWoVPrhNkSWWQGoMQfPzMvkb bKK0WYNLYMoFx8D3udgsh8h2DaCBFbSvh4gadBzuY7QeFWsD73lpBvkygr4/giCUQREM 6cgA== 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=XCebyXgonoW/bSQC+2Je6a0K//yjUTnk9fFjD2Gok9c=; b=Dx05+8rYlWMMs9t31DFVdO9eZfmtzjZHJjEpa4qI1WZSJTGi6pZU9GSkYW2IDryyND MYmW8nDZcBjEWh/R+kGuJYtLTCD/6q9Ml3onl7qR6GzBy9RKlIvdLNN3hVIfyJzms4va 2o1tGXUgevIjC+1BI7aQ8KPhrbI3CLikxevl3v8USlfmGIGaDHG2POGatk2R3cpUh0Ex dRPAseYB7hqRjMJOm2mu+u3CO3BXlMo5FjmQujq0SNAhksqmHVfMOJh58J7RvRlLbjvc xfX7F+FQPvCVyT8MuadXM5SYD37XgoNk3pNP9pmTKVed2C/fDywnUjjbDYBOUmUozyrM iz5Q== ARC-Authentication-Results: i=1; mx.google.com; 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; 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 S1751725AbeAZFzh (ORCPT ); Fri, 26 Jan 2018 00:55:37 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34978 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbeAZFzg (ORCPT ); Fri, 26 Jan 2018 00:55:36 -0500 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-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?1590633313657423022?= X-GMAIL-MSGID: =?utf-8?q?1590633313657423022?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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