From patchwork Wed Apr 27 18:53:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 104929 Delivered-To: patches@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2354403qge; Wed, 27 Apr 2016 11:53:34 -0700 (PDT) X-Received: by 10.55.75.14 with SMTP id y14mr10567342qka.33.1461783210453; Wed, 27 Apr 2016 11:53:30 -0700 (PDT) Return-Path: Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com. [2607:f8b0:400d:c09::22e]) by mx.google.com with ESMTPS id b4si3149829qhb.115.2016.04.27.11.53.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Apr 2016 11:53:30 -0700 (PDT) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 2607:f8b0:400d:c09::22e as permitted sender) client-ip=2607:f8b0:400d:c09::22e; 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::22e as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-qk0-x22e.google.com with SMTP id n63so22697331qkf.0 for ; Wed, 27 Apr 2016 11:53:30 -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:in-reply-to:references; bh=/fYZc3jKfnIg/VrkHd0RwdakiR4lbb6j25MvYc0ToqY=; b=ER/FSo01ciJeS86yPywciEJmjs4O0iSjrhd5KiZ18U3AyInDpMt7OrgzyyS6cs5dxI WI+iiq8vjtl2IAAnetJ98YWCuGZ6eJnUDVrnmvcheTSuF786cXEOKbx7LU40jjJzykJN pTumxVGGfzsTh7C34nmmRw2vY0MVQTLSgonfo= 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:in-reply-to :references; bh=/fYZc3jKfnIg/VrkHd0RwdakiR4lbb6j25MvYc0ToqY=; b=ezXkjhutRQwb84I/xt3wmTPRJaYN7/PHFXrzKHBbOh5TcLQaiCH6J8mRTTWfRJ1mS/ HMMa1FgQw7nNo5ne3pJ2FUi5UmTp64MVLuUzUePt9Le4H2YG+kHMcvdPDfIwFYcqYebl 3OUN9D8J10nveVUghzYdDPG6c7daQWUTpvQnQz6M7C886IdJP0sk9ogph/UTpVqjrkha ZoI7QM0wY98Pj/jf943o9LyoqjqzBhCgpMsbz8GSSdk2yKFc0CsVOlbGscqhsEHzPM9L aoJ/b98cNpkCBHmE8blrERDfW9dZLz6Gn1tahmzMm9rdLlwoKzusAceUPwYY4s+YqKNz TGWQ== X-Gm-Message-State: AOPr4FXMuTvKUTRKN0REv+9CX367JLKELMQxUsgRMPhwz56qBEZUwzffkJ+JZJwukddW0QPgPm0= X-Received: by 10.55.20.83 with SMTP id e80mr10732184qkh.196.1461783210313; Wed, 27 Apr 2016 11:53:30 -0700 (PDT) Return-Path: Received: from solstice.hsd1.nh.comcast.net ([2601:191:8000:f700:ecf0:c045:ec9f:ed60]) by smtp.googlemail.com with ESMTPSA id b18sm1604432qkc.9.2016.04.27.11.53.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2016 11:53:29 -0700 (PDT) From: David Long To: Catalin Marinas , Will Deacon , Sandeepa Prabhu , William Cohen , Pratyush Anand , Steve Capper , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marc Zyngier Cc: Dave P Martin , Mark Rutland , Robin Murphy , Ard Biesheuvel , Jens Wiklander , Christoffer Dall , =?utf-8?q?Alex_Benn=C3=A9e?= , Yang Shi , Greg Kroah-Hartman , Viresh Kumar , "Suzuki K. Poulose" , Kees Cook , Zi Shen Lim , John Blackwood , Feng Kan , Balamurugan Shanmugam , James Morse , Vladimir Murzin , Mark Salyzyn , Petr Mladek , Andrew Morton , Mark Brown Subject: [PATCH v12 10/10] kprobes: Add arm64 case in kprobe example module Date: Wed, 27 Apr 2016 14:53:05 -0400 Message-Id: <1461783185-9056-11-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1461783185-9056-1-git-send-email-dave.long@linaro.org> References: <1461783185-9056-1-git-send-email-dave.long@linaro.org> From: Sandeepa Prabhu Add info prints in sample kprobe handlers for ARM64 Signed-off-by: Sandeepa Prabhu --- samples/kprobes/kprobe_example.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.5.0 diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c index 727eb21..0c72b8a 100644 --- a/samples/kprobes/kprobe_example.c +++ b/samples/kprobes/kprobe_example.c @@ -42,6 +42,10 @@ static int handler_pre(struct kprobe *p, struct pt_regs *regs) " ex1 = 0x%lx\n", p->addr, regs->pc, regs->ex1); #endif +#ifdef CONFIG_ARM64 + pr_info("pre_handler: p->addr = 0x%p, pc = 0x%lx\n", + p->addr, (long)regs->pc); +#endif /* A dump_stack() here will give a stack backtrace */ return 0; @@ -67,6 +71,10 @@ static void handler_post(struct kprobe *p, struct pt_regs *regs, printk(KERN_INFO "post_handler: p->addr = 0x%p, ex1 = 0x%lx\n", p->addr, regs->ex1); #endif +#ifdef CONFIG_ARM64 + pr_info("post_handler: p->addr = 0x%p, pc = 0x%lx\n", + p->addr, (long)regs->pc); +#endif } /*