From patchwork Thu Aug 1 23:45:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 2837403 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 10FFE9F47C for ; Thu, 1 Aug 2013 23:46:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B30EB20322 for ; Thu, 1 Aug 2013 23:46:28 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B18912025D for ; Thu, 1 Aug 2013 23:46:27 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V52Zd-0002oF-Bv; Thu, 01 Aug 2013 23:46:25 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V52Za-0000S7-Dw; Thu, 01 Aug 2013 23:46:22 +0000 Received: from mail-yh0-f44.google.com ([209.85.213.44]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V52ZW-0000QY-7g for linux-arm-kernel@lists.infradead.org; Thu, 01 Aug 2013 23:46:19 +0000 Received: by mail-yh0-f44.google.com with SMTP id c41so1891yho.17 for ; Thu, 01 Aug 2013 16:45:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=8Qf794YD+re1CThzkU2cuu/MgmPRP6JaTdglwsEmRx8=; b=Qr8Iu4w9rP5TDUltuchInPg8IpZFsN9KdHM52d1qkE/eM/6jVnugGLXpSE266vhRJS Cu7GHZdE9hMobPVaVCdT4/WxUzr3ssnTkC13z+cEGPYjQX9WU9kq2qA9hWvDPsNPVK40 GdGZzsMP/cfie9FaoAuQfUiyQSYBdZLiYWeQmEZAxy+xQxJQoPnpCinbqoaSlJLXqJaB Cp89I9wp4jYBJZ69LTEyI7ZzRTklduMULhHVCcMp/5kF/XNGUWN0ug+qQxCcviFyRMqf VbfJJTqmHkDA0JOl6ShNmblw0SXdHChZ/I3Q+l6bj5iQpablKBLIYD8bPVKzw99Yhd8N b5mw== X-Received: by 10.236.4.72 with SMTP id 48mr2482597yhi.209.1375400757438; Thu, 01 Aug 2013 16:45:57 -0700 (PDT) Received: from localhost.localdomain (pool-71-181-37-252.cncdnh.fast.myfairpoint.net. [71.181.37.252]) by mx.google.com with ESMTPSA id b48sm7874263yhc.8.2013.08.01.16.45.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 16:45:56 -0700 (PDT) From: David Long To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/9] uprobes: move function declarations out of arch Date: Thu, 1 Aug 2013 19:45:45 -0400 Message-Id: <1375400753-3454-2-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1375400753-3454-1-git-send-email-dave.long@linaro.org> References: <1375400753-3454-1-git-send-email-dave.long@linaro.org> X-Gm-Message-State: ALoCoQlWnIcUBSyAHm5nb1lEUpXRsNpr6iDifWoFEIsZ9TN24TwznxBcUY/MRFqDpugCBSGSuGWT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130801_194618_345787_CCAB610B X-CRM114-Status: GOOD ( 11.08 ) X-Spam-Score: -2.6 (--) Cc: Rabin Vincent , "Jon Medhurst \(Tixy\)" , linux-kernel@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "David A. Long" Move the function declarations from the arch header to the common header, since only the function bodies are architecture-specific. These changes are from Vincent Rabin's uprobes patch. Signed-off-by: Rabin Vincent Signed-off-by: David A. Long --- arch/x86/include/asm/uprobes.h | 7 ------- include/linux/uprobes.h | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/uprobes.h b/arch/x86/include/asm/uprobes.h index 6e51979..b20b4d6 100644 --- a/arch/x86/include/asm/uprobes.h +++ b/arch/x86/include/asm/uprobes.h @@ -49,11 +49,4 @@ struct arch_uprobe_task { unsigned int saved_tf; }; -extern int arch_uprobe_analyze_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long addr); -extern int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs); -extern int arch_uprobe_post_xol(struct arch_uprobe *aup, struct pt_regs *regs); -extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk); -extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data); -extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs); -extern unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs); #endif /* _ASM_UPROBES_H */ diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index 06f28be..4e3b847 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h @@ -30,6 +30,7 @@ struct vm_area_struct; struct mm_struct; struct inode; +struct notifier_block; #ifdef CONFIG_ARCH_SUPPORTS_UPROBES # include @@ -125,6 +126,13 @@ extern void uprobe_notify_resume(struct pt_regs *regs); extern bool uprobe_deny_signal(void); extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs); extern void uprobe_clear_state(struct mm_struct *mm); +extern void uprobe_reset_state(struct mm_struct *mm); +extern int arch_uprobe_analyze_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long addr); +extern int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs); +extern int arch_uprobe_post_xol(struct arch_uprobe *aup, struct pt_regs *regs); +extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk); +extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data); +extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs); #else /* !CONFIG_UPROBES */ struct uprobes_state { };