public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] UPROBES: Remove useless __weak attribute
@ 2013-10-09 12:08 Ralf Baechle
  2013-10-10 11:43 ` Oleg Nesterov
  2013-10-11  0:51 ` Srikar Dronamraju
  0 siblings, 2 replies; 5+ messages in thread
From: Ralf Baechle @ 2013-10-09 12:08 UTC (permalink / raw)
  To: Oleg Nesterov, Srikar Dronamraju, Anton Arapov,
	Ananth N Mavinakayanahalli, linux-kernel, linux-mips

<linux/uprobes.h> declares arch_uprobe_skip_sstep() as a weak function.
But as there is no definition of generic version so when trying to build
uprobes for an architecture that doesn't yet have a arch_uprobe_skip_sstep()
implementation, the vmlinux will try to call arch_uprobe_skip_sstep()
somehwere in Stupidhistan leading to a system crash.  We rather want a
proper link error so remove arch_uprobe_skip_sstep().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 include/linux/uprobes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
index 2a9d75d..cec7397 100644
--- a/include/linux/uprobes.h
+++ b/include/linux/uprobes.h
@@ -124,7 +124,7 @@ extern int uprobe_post_sstep_notifier(struct pt_regs *regs);
 extern int uprobe_pre_sstep_notifier(struct pt_regs *regs);
 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 bool arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs);
 extern void uprobe_clear_state(struct mm_struct *mm);
 #else /* !CONFIG_UPROBES */
 struct uprobes_state {

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] UPROBES: Remove useless __weak attribute
  2013-10-09 12:08 [PATCH] UPROBES: Remove useless __weak attribute Ralf Baechle
@ 2013-10-10 11:43 ` Oleg Nesterov
  2013-10-11  0:51 ` Srikar Dronamraju
  1 sibling, 0 replies; 5+ messages in thread
From: Oleg Nesterov @ 2013-10-10 11:43 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Srikar Dronamraju, Anton Arapov, Ananth N Mavinakayanahalli,
	linux-kernel, linux-mips

On 10/09, Ralf Baechle wrote:
>
> <linux/uprobes.h> declares arch_uprobe_skip_sstep() as a weak function.
> But as there is no definition of generic version so when trying to build
> uprobes for an architecture that doesn't yet have a arch_uprobe_skip_sstep()
> implementation, the vmlinux will try to call arch_uprobe_skip_sstep()
> somehwere in Stupidhistan leading to a system crash.  We rather want a
> proper link error so remove arch_uprobe_skip_sstep().
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
> 
>  include/linux/uprobes.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
> index 2a9d75d..cec7397 100644
> --- a/include/linux/uprobes.h
> +++ b/include/linux/uprobes.h
> @@ -124,7 +124,7 @@ extern int uprobe_post_sstep_notifier(struct pt_regs *regs);
>  extern int uprobe_pre_sstep_notifier(struct pt_regs *regs);
>  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 bool arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs);

Agreed. I'll take this patch, thanks.

Oleg.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] UPROBES: Remove useless __weak attribute
  2013-10-09 12:08 [PATCH] UPROBES: Remove useless __weak attribute Ralf Baechle
  2013-10-10 11:43 ` Oleg Nesterov
@ 2013-10-11  0:51 ` Srikar Dronamraju
  2013-10-11 12:24   ` Ralf Baechle
  1 sibling, 1 reply; 5+ messages in thread
From: Srikar Dronamraju @ 2013-10-11  0:51 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Oleg Nesterov, Anton Arapov, Ananth N Mavinakayanahalli,
	linux-kernel, linux-mips

* Ralf Baechle <ralf@linux-mips.org> [2013-10-09 14:08:09]:

> <linux/uprobes.h> declares arch_uprobe_skip_sstep() as a weak function.
> But as there is no definition of generic version so when trying to build
> uprobes for an architecture that doesn't yet have a arch_uprobe_skip_sstep()
> implementation, the vmlinux will try to call arch_uprobe_skip_sstep()
> somehwere in Stupidhistan leading to a system crash.  We rather want a
> proper link error so remove arch_uprobe_skip_sstep().
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
> 

Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>

Will be nice to have another arch(mips) support for uprobes. 

-- 
Thanks and Regards
Srikar Dronamraju


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] UPROBES: Remove useless __weak attribute
  2013-10-11  0:51 ` Srikar Dronamraju
@ 2013-10-11 12:24   ` Ralf Baechle
  2013-10-11 22:06     ` David Daney
  0 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2013-10-11 12:24 UTC (permalink / raw)
  To: Srikar Dronamraju
  Cc: Oleg Nesterov, Anton Arapov, Ananth N Mavinakayanahalli,
	linux-kernel, linux-mips

On Fri, Oct 11, 2013 at 06:21:28AM +0530, Srikar Dronamraju wrote:

> Will be nice to have another arch(mips) support for uprobes. 

It's basically ready to be merged - but it's triggering issues elsewhere
in the kernel which I have to resolve first.

The short version is that the memory special mapping created by uprobe
with VM_EXEC but not VM_READ permissions is not working but it's working
if I add VM_READ.  That should not be necessary so something deep down
in the guts of arch/mips is wrong.

  Ralf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] UPROBES: Remove useless __weak attribute
  2013-10-11 12:24   ` Ralf Baechle
@ 2013-10-11 22:06     ` David Daney
  0 siblings, 0 replies; 5+ messages in thread
From: David Daney @ 2013-10-11 22:06 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Srikar Dronamraju, Oleg Nesterov, Anton Arapov,
	Ananth N Mavinakayanahalli, linux-kernel, linux-mips

On 10/11/2013 05:24 AM, Ralf Baechle wrote:
> On Fri, Oct 11, 2013 at 06:21:28AM +0530, Srikar Dronamraju wrote:
>
>> Will be nice to have another arch(mips) support for uprobes.
>
> It's basically ready to be merged - but it's triggering issues elsewhere
> in the kernel which I have to resolve first.
>
> The short version is that the memory special mapping created by uprobe
> with VM_EXEC but not VM_READ permissions is not working but it's working
> if I add VM_READ.  That should not be necessary so something deep down
> in the guts of arch/mips is wrong.
>

Weird, I have a testcase that explicitly tests VM_EXEC and !VM_READ that 
works.

Do you have more information about the failure, I can look at it in the 
simulator and see where it goes wrong.

Thanks,
David Daney


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-11 22:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09 12:08 [PATCH] UPROBES: Remove useless __weak attribute Ralf Baechle
2013-10-10 11:43 ` Oleg Nesterov
2013-10-11  0:51 ` Srikar Dronamraju
2013-10-11 12:24   ` Ralf Baechle
2013-10-11 22:06     ` David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox