Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/817403/?format=api
{ "id": 817403, "url": "http://patchwork.ozlabs.org/api/patches/817403/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/4b00ce57a202313ae0fcab03d07b6ea84dae811d.1505934128.git.naveen.n.rao@linux.vnet.ibm.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<4b00ce57a202313ae0fcab03d07b6ea84dae811d.1505934128.git.naveen.n.rao@linux.vnet.ibm.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/4b00ce57a202313ae0fcab03d07b6ea84dae811d.1505934128.git.naveen.n.rao@linux.vnet.ibm.com/", "date": "2017-09-22T09:10:44", "name": "[v2,2/6] powerpc/kprobes: Do not suppress instruction emulation if a single run failed", "commit_ref": "a7b440383f9b078254d38ab6a3672810f1eca74f", "pull_url": null, "state": "accepted", "archived": false, "hash": "e81ddf0f517c77ef152bc98e4008dd3e399c09aa", "submitter": { "id": 15185, "url": "http://patchwork.ozlabs.org/api/people/15185/?format=api", "name": "Naveen N. Rao", "email": "naveen.n.rao@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/4b00ce57a202313ae0fcab03d07b6ea84dae811d.1505934128.git.naveen.n.rao@linux.vnet.ibm.com/mbox/", "series": [ { "id": 4580, "url": "http://patchwork.ozlabs.org/api/series/4580/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=4580", "date": "2017-09-22T09:10:23", "name": "powerpc/kprobes: More fixes", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/4580/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/817403/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/817403/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xz78q04Zrz9sNc\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Sep 2017 19:14:35 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xz78p6MXkzDsPK\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Sep 2017 19:14:34 +1000 (AEST)", "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xz74w46JlzDsM5\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 22 Sep 2017 19:11:12 +1000 (AEST)", "from pps.filterd (m0098410.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8M99Kjg076201\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 22 Sep 2017 05:11:10 -0400", "from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2d4xb5brx8-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 22 Sep 2017 05:11:09 -0400", "from localhost\n\tby e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from\n\t<naveen.n.rao@linux.vnet.ibm.com>; Fri, 22 Sep 2017 19:11:07 +1000", "from d23relay09.au.ibm.com (202.81.31.228)\n\tby e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 22 Sep 2017 19:11:06 +1000", "from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138])\n\tby d23relay09.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tv8M9B5Yj38797490\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 22 Sep 2017 19:11:05 +1000", "from d23av02.au.ibm.com (localhost [127.0.0.1])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tv8M9AuOH020516\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 22 Sep 2017 19:10:56 +1000", "from naverao1-tp.ibm.com ([9.77.124.51])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tv8M9AoTW020313; Fri, 22 Sep 2017 19:10:54 +1000" ], "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com\n\t(client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com;\n\tenvelope-from=naveen.n.rao@linux.vnet.ibm.com; receiver=<UNKNOWN>)", "From": "\"Naveen N. Rao\" <naveen.n.rao@linux.vnet.ibm.com>", "To": "Michael Ellerman <mpe@ellerman.id.au>", "Subject": "[PATCH v2 2/6] powerpc/kprobes: Do not suppress instruction\n\temulation if a single run failed", "Date": "Fri, 22 Sep 2017 14:40:44 +0530", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": [ "<9e98f74834af349564b71bc8443bdad55d6e37c6.1505934128.git.naveen.n.rao@linux.vnet.ibm.com>", "<cover.1505934128.git.naveen.n.rao@linux.vnet.ibm.com>" ], "References": [ "<9e98f74834af349564b71bc8443bdad55d6e37c6.1505934128.git.naveen.n.rao@linux.vnet.ibm.com>", "<cover.1505934128.git.naveen.n.rao@linux.vnet.ibm.com>" ], "X-TM-AS-MML": "disable", "x-cbid": "17092209-0008-0000-0000-000001587705", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17092209-0009-0000-0000-0000098DE69C", "Message-Id": "<4b00ce57a202313ae0fcab03d07b6ea84dae811d.1505934128.git.naveen.n.rao@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-22_02:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709220128", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.24", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Cc": "linuxppc-dev@lists.ozlabs.org, Masami Hiramatsu <mhiramat@kernel.org>,\n\tKamalesh Babulal <kamalesh@linux.vnet.ibm.com>", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "Currently, we disable instruction emulation if emulate_step() fails for\nany reason. However, such failures could be transient and specific to a\nparticular run. Instead, only disable instruction emulation if we have\nnever been able to emulate this. If we had emulated this instruction\nsuccessfully at least once, then we single step only this probe hit and\ncontinue to try emulating the instruction in subsequent probe hits.\n\nSigned-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>\n---\n arch/powerpc/kernel/kprobes.c | 17 ++++++++++++++---\n 1 file changed, 14 insertions(+), 3 deletions(-)", "diff": "diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c\nindex c2a6ab38a67f..4c1702423676 100644\n--- a/arch/powerpc/kernel/kprobes.c\n+++ b/arch/powerpc/kernel/kprobes.c\n@@ -261,9 +261,20 @@ static int try_to_emulate(struct kprobe *p, struct pt_regs *regs)\n \t\t */\n \t\tprintk(\"Can't step on instruction %x\\n\", insn);\n \t\tBUG();\n-\t} else\n-\t\t/* This instruction can't be boosted */\n-\t\tp->ainsn.boostable = -1;\n+\t} else {\n+\t\t/*\n+\t\t * If we haven't previously emulated this instruction, then it\n+\t\t * can't be boosted. Note it down so we don't try to do so again.\n+\t\t *\n+\t\t * If, however, we had emulated this instruction in the past,\n+\t\t * then this is just an error with the current run (for\n+\t\t * instance, exceptions due to a load/store). We return 0 so\n+\t\t * that this is now single-stepped, but continue to try\n+\t\t * emulating it in subsequent probe hits.\n+\t\t */\n+\t\tif (unlikely(p->ainsn.boostable != 1))\n+\t\t\tp->ainsn.boostable = -1;\n+\t}\n \n \treturn ret;\n }\n", "prefixes": [ "v2", "2/6" ] }