Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1787776ybn; Thu, 26 Sep 2019 02:09:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqypUXUghNyz48klUm9KRzB/W7TpoFNd6/0r8m7CrHlxOpbQJ5v/A8hLufADo4n0AlTr+2m/ X-Received: by 2002:a17:906:d926:: with SMTP id rn6mr2027260ejb.175.1569488994154; Thu, 26 Sep 2019 02:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569488994; cv=none; d=google.com; s=arc-20160816; b=L6WLXg4Vm9HCJT2Vg8c4SevbOoK/0Q9OsfpnXRzR6AR6RFieFfh1Wfc3IsY1zyMUhK y4j/jUAFnS5j6IWm3czskdJeuUSqyO0BYM/afqSfLJH/umo7H6YQ8HB3ZkEW2BF2ydQu DaapUmOzpWJNCjaO/d3f67okuLmG6saZLNO1muqakXO1U38y0zEhydZ1fWrpz3Ma7dAj mGy3Cj3Hqlb91iHjoCpbhj7kiu4+eUPk+nqoWBwMCE4E2aaIehu3SiJmoC6/20xuNcK4 nXH3AynMwAQIml1ldbme5JEXdv+I7NhocVQfbFBaCwsvW+pyOcIBJMMV2yLA0drhC5mD 1Sow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:date:subject:cc:to:from; bh=wYWb6K/xjRRFFRYxUQU9yNPmdVo9D/zfNDpxWtG7iBs=; b=HzDOxgDoMarnq+vG0Lo+1Z1b3zVg1tPIzE4lp6pWokeYC6vDmDZZ4XJOgxr/L/AL7n r0n9PmP7AndloDar1cHbwQs6MWAChTl73Y93LC0ijQ+4txdUx84wCWa+fcodp4MUQPQL hbYCZHK5SSZTIM8uCLGccEvaXt1/Pt56V0ga0Gf15dsXZ6og8h7mY20WxAD8Hx0SfdvG XWlt9P7zQkMZvjXLddw0peOCHN7SqHcxfEqsJePLyoLVLNeVVDuwh+0UwoPtVMQs8IvY QeNBue2EfdpUCjz/7bKk3wOkfDTwiC1YuJcDpoXrXq+orJiyuJ6OKnPcHgLS2DPFFUnz eVHg== 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 q10si898290eda.293.2019.09.26.02.09.30; Thu, 26 Sep 2019 02:09:54 -0700 (PDT) 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 S1730036AbfIYEGm (ORCPT + 99 others); Wed, 25 Sep 2019 00:06:42 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37876 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726936AbfIYEGl (ORCPT ); Wed, 25 Sep 2019 00:06:41 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8P41te5113925 for ; Wed, 25 Sep 2019 00:06:40 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v7xdevdcy-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 25 Sep 2019 00:06:40 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 Sep 2019 05:06:38 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 25 Sep 2019 05:06:34 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8P46Xkf50266234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Sep 2019 04:06:33 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A01A4A4059; Wed, 25 Sep 2019 04:06:33 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E42B1A4055; Wed, 25 Sep 2019 04:06:31 +0000 (GMT) Received: from bangoria.in.ibm.com (unknown [9.124.31.69]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 25 Sep 2019 04:06:31 +0000 (GMT) From: Ravi Bangoria To: mpe@ellerman.id.au, mikey@neuling.org, christophe.leroy@c-s.fr Cc: npiggin@gmail.com, benh@kernel.crashing.org, paulus@samba.org, naveen.n.rao@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ravi Bangoria Subject: [PATCH v4 0/5] Powerpc/Watchpoint: Few important fixes Date: Wed, 25 Sep 2019 09:36:25 +0530 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19092504-0012-0000-0000-000003503F5F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19092504-0013-0000-0000-0000218AD173 Message-Id: <20190925040630.6948-1-ravi.bangoria@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-09-25_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909250039 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v3: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-July/193339.html v3->v4: - Instead of considering exception as extraneous when dar is outside of user specified range, analyse the instruction and check for overlap between user specified range and actual load/store range. - Add selftest for the same in perf-hwbreak.c - Make ptrace-hwbreak.c selftest more strict by checking address in check_success. - Support for 8xx in ptrace-hwbreak.c selftest (Build tested only) - Rebase to powerpc/next @Christope, Can you please check Patch 5. I've just build-tested it with ep88xc_defconfig. Ravi Bangoria (5): Powerpc/Watchpoint: Fix length calculation for unaligned target Powerpc/Watchpoint: Don't ignore extraneous exceptions blindly Powerpc/Watchpoint: Rewrite ptrace-hwbreak.c selftest Powerpc/Watchpoint: Add dar outside test in perf-hwbreak.c selftest Powerpc/Watchpoint: Support for 8xx in ptrace-hwbreak.c selftest arch/powerpc/include/asm/debug.h | 1 + arch/powerpc/include/asm/hw_breakpoint.h | 9 +- arch/powerpc/kernel/dawr.c | 6 +- arch/powerpc/kernel/hw_breakpoint.c | 76 ++- arch/powerpc/kernel/process.c | 46 ++ arch/powerpc/kernel/ptrace.c | 37 +- arch/powerpc/xmon/xmon.c | 3 +- .../selftests/powerpc/ptrace/perf-hwbreak.c | 111 +++- .../selftests/powerpc/ptrace/ptrace-hwbreak.c | 579 +++++++++++------- 9 files changed, 595 insertions(+), 273 deletions(-) -- 2.21.0