From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jason Wessel <jason.wessel@windriver.com>,
Ralf Baechle <ralf@linux-mips.org>,
Ingo Molnar <mingo@redhat.com>,
John Stultz <john.stultz@linaro.org>,
Eric Paris <eparis@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 10/10] uprobes: Remove "weak" from function declarations
Date: Thu, 16 Oct 2014 11:27:59 +0530 [thread overview]
Message-ID: <20141016055758.GA24804@linux.vnet.ibm.com> (raw)
In-Reply-To: <20141015170650.4063.2816.stgit@bhelgaas-glaptop2.roam.corp.google.com>
* Bjorn Helgaas <bhelgaas@google.com> [2014-10-15 11:06:50]:
> For the following interfaces:
>
> set_swbp()
> set_orig_insn()
> is_swbp_insn()
> is_trap_insn()
> uprobe_get_swbp_addr()
> arch_uprobe_ignore()
> arch_uprobe_copy_ixol()
>
> kernel/events/uprobes.c provides default definitions explicitly marked
> "weak". Some architectures provide their own definitions intended to
> override the defaults, but the "weak" attribute on the declarations applied
> to the arch definitions as well, so the linker chose one based on link
> order (see 10629d711ed7 ("PCI: Remove __weak annotation from
> pcibios_get_phb_of_node decl")).
>
> Remove the "weak" attribute from the declarations so we always prefer a
> non-weak definition over the weak one, independent of link order.
>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> CC: Victor Kamensky <victor.kamensky@linaro.org>
> CC: Oleg Nesterov <oleg@redhat.com>
> CC: David A. Long <dave.long@linaro.org>
> CC: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> CC: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> ---
> include/linux/uprobes.h | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
> index 4f844c6b03ee..60beb5dc7977 100644
> --- a/include/linux/uprobes.h
> +++ b/include/linux/uprobes.h
> @@ -98,11 +98,11 @@ struct uprobes_state {
> struct xol_area *xol_area;
> };
>
> -extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
> -extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
> -extern bool __weak is_swbp_insn(uprobe_opcode_t *insn);
> -extern bool __weak is_trap_insn(uprobe_opcode_t *insn);
> -extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs);
> +extern int set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
> +extern int set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
> +extern bool is_swbp_insn(uprobe_opcode_t *insn);
> +extern bool is_trap_insn(uprobe_opcode_t *insn);
> +extern unsigned long uprobe_get_swbp_addr(struct pt_regs *regs);
> extern unsigned long uprobe_get_trap_addr(struct pt_regs *regs);
> extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t);
> extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
> @@ -128,8 +128,8 @@ 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);
> -extern bool __weak arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs);
> -extern void __weak arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
> +extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs);
> +extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
> void *src, unsigned long len);
> #else /* !CONFIG_UPROBES */
> struct uprobes_state {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Thanks and Regards
Srikar Dronamraju
next prev parent reply other threads:[~2014-10-16 5:58 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 17:05 [PATCH v1 00/10] Remove weak function declarations Bjorn Helgaas
2014-10-15 17:05 ` [PATCH v1 01/10] audit: Remove "weak" from audit_classify_compat_syscall() declaration Bjorn Helgaas
2014-10-15 23:25 ` Bjorn Helgaas
2014-10-16 17:02 ` Richard Guy Briggs
2014-10-15 17:05 ` [PATCH v1 02/10] x86, intel-mid: Remove "weak" from function declarations Bjorn Helgaas
2014-10-15 23:26 ` Bjorn Helgaas
2014-10-17 0:42 ` sathyanarayanan kuppuswamy
2014-10-17 1:41 ` David Cohen
2014-10-20 16:15 ` Bjorn Helgaas
2014-10-20 17:55 ` David Cohen
2014-10-16 5:09 ` Ingo Molnar
2014-10-15 17:06 ` [PATCH v1 03/10] MIPS: CPC: Make mips_cpc_phys_base() static Bjorn Helgaas
2014-10-15 23:27 ` Bjorn Helgaas
2014-10-15 23:28 ` Bjorn Helgaas
2014-10-21 20:03 ` Bjorn Helgaas
2014-10-15 17:06 ` [PATCH v1 04/10] MIPS: Remove "weak" from platform_maar_init() declaration Bjorn Helgaas
2014-10-15 23:27 ` Bjorn Helgaas
2014-10-21 20:04 ` Bjorn Helgaas
2014-10-15 17:06 ` [PATCH v1 05/10] MIPS: MT: Move "weak" from vpe_run() declaration to definition Bjorn Helgaas
2014-10-15 23:28 ` Bjorn Helgaas
2014-10-16 13:49 ` Bjorn Helgaas
2014-10-21 20:05 ` Bjorn Helgaas
2014-10-15 17:06 ` [PATCH v1 06/10] clocksource: Remove "weak" from clocksource_default_clock() declaration Bjorn Helgaas
2014-10-15 17:36 ` John Stultz
2014-10-15 23:30 ` Bjorn Helgaas
2014-10-16 7:22 ` Martin Schwidefsky
2014-10-16 13:40 ` Bjorn Helgaas
2014-10-16 13:45 ` Martin Schwidefsky
2014-10-16 5:10 ` Ingo Molnar
2014-10-15 17:06 ` [PATCH v1 07/10] vmcore: Remove "weak" from function declarations Bjorn Helgaas
2014-10-15 23:31 ` Bjorn Helgaas
2014-10-15 23:44 ` Bjorn Helgaas
2014-10-16 7:23 ` Martin Schwidefsky
2014-10-16 20:11 ` Vivek Goyal
2014-10-15 17:06 ` [PATCH v1 08/10] kgdb: Remove "weak" from kgdb_arch_pc() declaration Bjorn Helgaas
2014-10-15 23:35 ` Bjorn Helgaas
2014-10-15 23:35 ` Bjorn Helgaas
2014-10-16 13:38 ` Vineet Gupta
2014-10-17 7:59 ` Vineet Gupta
2014-10-20 16:20 ` Bjorn Helgaas
2014-10-16 0:07 ` Harvey Harrison
2014-10-15 17:06 ` [PATCH v1 09/10] memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration Bjorn Helgaas
2014-10-15 23:38 ` Bjorn Helgaas
2014-10-16 7:23 ` Martin Schwidefsky
2014-10-15 17:06 ` [PATCH v1 10/10] uprobes: Remove "weak" from function declarations Bjorn Helgaas
2014-10-15 23:42 ` Bjorn Helgaas
2014-10-15 23:42 ` Bjorn Helgaas
2014-10-15 23:42 ` Bjorn Helgaas
2014-10-16 5:10 ` Ingo Molnar
2014-10-16 5:57 ` Srikar Dronamraju [this message]
2014-10-15 18:27 ` [PATCH v1 00/10] Remove weak " Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141016055758.GA24804@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bhelgaas@google.com \
--cc=eparis@redhat.com \
--cc=hpa@zytor.com \
--cc=jason.wessel@windriver.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=ralf@linux-mips.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.