[{"id":1804241,"web_url":"http://patchwork.ozlabs.org/comment/1804241/","msgid":"<3yblFs36rqz9t1t@ozlabs.org>","date":"2017-11-14T11:12:01","subject":"Re: powerpc/signal: Properly handle return value from\n\tuprobe_deny_signal()","submitter":{"id":69509,"url":"http://patchwork.ozlabs.org/api/people/69509/","name":"Michael Ellerman","email":"patch-notifications@ellerman.id.au"},"content":"On Thu, 2017-08-31 at 16:25:57 UTC, \"Naveen N. Rao\" wrote:\n> When a uprobe is installed on an instruction that we currently do not\n> emulate, we copy the instruction into a xol buffer and single step\n> that instruction. If that instruction generates a fault, we abort the\n> single stepping before invoking the signal handler. Once the signal\n> handler is done, the uprobe trap is hit again since the instruction is\n> retried and the process repeats.\n> \n> We use uprobe_deny_signal() to detect if the xol instruction triggered\n> a signal. If so, we clear TIF_SIGPENDING and set TIF_UPROBE so that the\n> signal is not handled until after the single stepping is aborted. In\n> this case, uprobe_deny_signal() returns true and get_signal() ends up\n> returning 0. However, in do_signal(), we are not looking at the return\n> value, but depending on ksig.sig for further action, all with an\n> uninitialized ksig that is not touched in this scenario. Fix the same\n> by initializing ksig.sig to 0.\n> \n> Fixes: 129b69df9c907 (\"powerpc: Use get_signal() signal_setup_done()\")\n> \n> Reported-by: Anton Blanchard <anton@samba.org>\n> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>\n\nApplied to powerpc next, thanks.\n\nhttps://git.kernel.org/powerpc/c/46725b17f1c6c815a41429259b3f07\n\ncheers","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 3yblQL4bpSz9s7C\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 14 Nov 2017 22:19:22 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3yblQL3ZzJzDr2f\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 14 Nov 2017 22:19:22 +1100 (AEDT)","from ozlabs.org (bilbo.ozlabs.org [103.22.144.67])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3yblFs6NkzzDqpF\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 14 Nov 2017 22:12:01 +1100 (AEDT)","by ozlabs.org (Postfix, from userid 1034)\n\tid 3yblFs36rqz9t1t; Tue, 14 Nov 2017 22:12:01 +1100 (AEDT)"],"X-powerpc-patch-notification":"thanks","X-powerpc-patch-commit":"46725b17f1c6c815a41429259b3f070c01e71bc1","In-Reply-To":"<20170831162557.24904-1-naveen.n.rao@linux.vnet.ibm.com>","To":"\"Naveen N. Rao\" <naveen.n.rao@linux.vnet.ibm.com>","From":"Michael Ellerman <patch-notifications@ellerman.id.au>","Subject":"Re: powerpc/signal: Properly handle return value from\n\tuprobe_deny_signal()","Message-Id":"<3yblFs36rqz9t1t@ozlabs.org>","Date":"Tue, 14 Nov 2017 22:12:01 +1100 (AEDT)","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":"Richard Weinberger <richard@nod.at>, linuxppc-dev@lists.ozlabs.org,\n\tAnton Blanchard <anton@samba.org>,\n\tSrikar Dronamraju <srikar@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>"}}]