From patchwork Fri Aug 12 20:24:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 73869 Delivered-To: patches@linaro.org Received: by 10.140.29.52 with SMTP id a49csp346686qga; Fri, 12 Aug 2016 13:24:47 -0700 (PDT) X-Received: by 10.200.52.85 with SMTP id v21mr20055592qtb.21.1471033487583; Fri, 12 Aug 2016 13:24:47 -0700 (PDT) Return-Path: Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com. [2607:f8b0:400d:c09::231]) by mx.google.com with ESMTPS id i200si4412800qke.191.2016.08.12.13.24.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Aug 2016 13:24:47 -0700 (PDT) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 2607:f8b0:400d:c09::231 as permitted sender) client-ip=2607:f8b0:400d:c09::231; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of dave.long@linaro.org designates 2607:f8b0:400d:c09::231 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-qk0-x231.google.com with SMTP id l2so35803505qkf.3 for ; Fri, 12 Aug 2016 13:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=M1sdGJpcMd18jG//schdh1G5TU029PMFzhF5lE9Awl4=; b=CrOkj4rYREKDnOcfBib7BCpZPCGIn2zP+2mFbLEEQ7FRGFNu5SrEfU7SegUI78WvZ/ 2Wa4LY4WFXnBeUzj6vvgGgWY1CbfEVCFmqzFVhyd4WjMIsCTjby0iwEYTf/wRImBMVeW uuDe0zZr8YEZwgoIFeGu2IgYjyhTkYHhQld90= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=M1sdGJpcMd18jG//schdh1G5TU029PMFzhF5lE9Awl4=; b=LaULloV+2UXs9JkbijxEfWaKolrETyJs4b1aST9L/mRPFkp+o++8s9avPVYPbKakK3 31q3ziA6lWaaTLMGsPtzRBL0K/y9W75d0N8U78yTlY1aO6lf6UsEwczZT6kHJ/6fxkN5 l0kKPKZiHtyF+c+5NeQDlmcqZlElUY63pmgz5tgb68tVNQU/NALP/RfJdpPLdGAtd4jV VQHvgNjFO8NEkrZhjWbR3hDPXg6l3G+OZcW9Yus/7Y5SYEB60JP2yP2KI/0v8pihwGST XvVA+fz91s9KDhAfNVO1qjUHD0jOYxd2WtvXbTayC6pNeH/V2vXsr5jdz+H+8ghCJ5wX AmUw== X-Gm-Message-State: AEkooutSUvVpOm8OWDe5SONckOBFR2WWlrtla5CpCGPb66jlwGFyAvnHVzph7G+pj5MhnmvtwGw= X-Received: by 10.55.111.198 with SMTP id k189mr18869165qkc.44.1471033487326; Fri, 12 Aug 2016 13:24:47 -0700 (PDT) Return-Path: Received: from localhost.localdomain (pool-72-71-243-24.cncdnh.fast00.myfairpoint.net. [72.71.243.24]) by smtp.googlemail.com with ESMTPSA id v126sm4069506qkh.30.2016.08.12.13.24.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Aug 2016 13:24:46 -0700 (PDT) From: David Long To: Ananth N Mavinakayanahalli , Anil S Keshavamurthy , "David S. Miller" , Masami Hiramatsu , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org, catalin.marinas@arm.com, daniel.thompson@linaro.org, marc.zyngier@arm.com Cc: Mark Brown Subject: [PATCH] Documentation: kprobes: Document jprobes stack copying limitations Date: Fri, 12 Aug 2016 16:24:44 -0400 Message-Id: <1471033484-2709-1-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 2.5.0 From: "David A. Long" Some architectures (i.e.: sparc64 and arm64) make reasonable partial stack duplication for jprobes problematic. Document this. Signed-off-by: David A. Long --- Documentation/kprobes.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.5.0 Acked-by: Catalin Marinas diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 1f9b3e2..1f6d45a 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt @@ -103,6 +103,16 @@ Note that the probed function's args may be passed on the stack or in registers. The jprobe will work in either case, so long as the handler's prototype matches that of the probed function. +Note that in some architectures (e.g.: arm64 and sparc64) the stack +copy is not done, as the actual location of stacked parameters may be +outside of a reasonable MAX_STACK_SIZE value and because that location +cannot be determined by the jprobes code. In this case the jprobes +user must be careful to make certain the calling signature of the +function does not cause parameters to be passed on the stack (e.g.: +more than eight function arguments, an argument of more than sixteen +bytes, or more than 64 bytes of argument data, depending on +architecture). + 1.3 Return Probes 1.3.1 How Does a Return Probe Work?