LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [2.6 patch] include/linux/kprobes.h: always offer show_registers() prototype
@ 2007-04-26 23:47 Adrian Bunk
2007-04-27 5:10 ` Ananth N Mavinakayanahalli
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2007-04-26 23:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: prasanna, ananth, anil.s.keshavamurthy, davem, linux-kernel
Allow gcc to perform show_registers() type checking also with
CONFIG_KPROBES=n.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch has been sent on:
- 27 Mar 2007
include/linux/kprobes.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- linux-2.6.21-rc4-mm1/include/linux/kprobes.h.old 2007-03-26 15:28:27.000000000 +0200
+++ linux-2.6.21-rc4-mm1/include/linux/kprobes.h 2007-03-26 15:32:23.000000000 +0200
@@ -163,7 +163,6 @@
extern void arch_arm_kprobe(struct kprobe *p);
extern void arch_disarm_kprobe(struct kprobe *p);
extern int arch_init_kprobes(void);
-extern void show_registers(struct pt_regs *regs);
extern kprobe_opcode_t *get_insn_slot(void);
extern void free_insn_slot(kprobe_opcode_t *slot, int dirty);
extern void kprobes_inc_nmissed_count(struct kprobe *p);
@@ -241,4 +240,7 @@
{
}
#endif /* CONFIG_KPROBES */
+
+void show_registers(struct pt_regs *regs);
+
#endif /* _LINUX_KPROBES_H */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] include/linux/kprobes.h: always offer show_registers() prototype
2007-04-26 23:47 [2.6 patch] include/linux/kprobes.h: always offer show_registers() prototype Adrian Bunk
@ 2007-04-27 5:10 ` Ananth N Mavinakayanahalli
2007-04-27 23:32 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: Ananth N Mavinakayanahalli @ 2007-04-27 5:10 UTC (permalink / raw)
To: Adrian Bunk
Cc: Andrew Morton, prasanna, anil.s.keshavamurthy, davem, linux-kernel
On Fri, Apr 27, 2007 at 01:47:49AM +0200, Adrian Bunk wrote:
> Allow gcc to perform show_registers() type checking also with
> CONFIG_KPROBES=n.
Is kprobes.h the correct place to allow for this change? Perhaps, with
Christoph's patch http://marc.info/?l=linux-kernel&m=117432009501114&w=2
consolidating the die_notifier code, this could be moved to
include/linux/kdebug.h instead?
Ananth
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> ---
>
> This patch has been sent on:
> - 27 Mar 2007
>
> include/linux/kprobes.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> --- linux-2.6.21-rc4-mm1/include/linux/kprobes.h.old 2007-03-26 15:28:27.000000000 +0200
> +++ linux-2.6.21-rc4-mm1/include/linux/kprobes.h 2007-03-26 15:32:23.000000000 +0200
> @@ -163,7 +163,6 @@
> extern void arch_arm_kprobe(struct kprobe *p);
> extern void arch_disarm_kprobe(struct kprobe *p);
> extern int arch_init_kprobes(void);
> -extern void show_registers(struct pt_regs *regs);
> extern kprobe_opcode_t *get_insn_slot(void);
> extern void free_insn_slot(kprobe_opcode_t *slot, int dirty);
> extern void kprobes_inc_nmissed_count(struct kprobe *p);
> @@ -241,4 +240,7 @@
> {
> }
> #endif /* CONFIG_KPROBES */
> +
> +void show_registers(struct pt_regs *regs);
> +
> #endif /* _LINUX_KPROBES_H */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] include/linux/kprobes.h: always offer show_registers() prototype
2007-04-27 5:10 ` Ananth N Mavinakayanahalli
@ 2007-04-27 23:32 ` Andrew Morton
2007-04-28 12:42 ` Adrian Bunk
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2007-04-27 23:32 UTC (permalink / raw)
To: ananth; +Cc: Adrian Bunk, prasanna, anil.s.keshavamurthy, davem, linux-kernel
On Fri, 27 Apr 2007 10:40:57 +0530
Ananth N Mavinakayanahalli <ananth@in.ibm.com> wrote:
> On Fri, Apr 27, 2007 at 01:47:49AM +0200, Adrian Bunk wrote:
> > Allow gcc to perform show_registers() type checking also with
> > CONFIG_KPROBES=n.
>
> Is kprobes.h the correct place to allow for this change? Perhaps, with
> Christoph's patch http://marc.info/?l=linux-kernel&m=117432009501114&w=2
> consolidating the die_notifier code, this could be moved to
> include/linux/kdebug.h instead?
>
Yes, I think something is definitely wrong here. If the code is presently
calling show_registers() with no prototype in scope, it should be emitting
warnings?
Also, yes, kprobes.h is an inappropriate place for this declaration. It
should be in include/asm-foo/, I guess.
But if we do that, there's an excellent chance of a compile explosion,
because we also have implementations of show_registers() in
drivers/net/wireless/ipw2100.c, drivers/usb/gadget/net2280.c,
drivers/usb/host/ehci-dbg.c, drivers/usb/host/ohci-dbg.c and who knows
where else.
So what I'd suggest is that we rename show_registers() to something saner,
then put the declaration into some arch header file then include that
header in kprobes.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] include/linux/kprobes.h: always offer show_registers() prototype
2007-04-27 23:32 ` Andrew Morton
@ 2007-04-28 12:42 ` Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2007-04-28 12:42 UTC (permalink / raw)
To: Andrew Morton; +Cc: ananth, prasanna, anil.s.keshavamurthy, davem, linux-kernel
On Fri, Apr 27, 2007 at 04:32:51PM -0700, Andrew Morton wrote:
> On Fri, 27 Apr 2007 10:40:57 +0530
> Ananth N Mavinakayanahalli <ananth@in.ibm.com> wrote:
>
> > On Fri, Apr 27, 2007 at 01:47:49AM +0200, Adrian Bunk wrote:
> > > Allow gcc to perform show_registers() type checking also with
> > > CONFIG_KPROBES=n.
> >
> > Is kprobes.h the correct place to allow for this change? Perhaps, with
> > Christoph's patch http://marc.info/?l=linux-kernel&m=117432009501114&w=2
> > consolidating the die_notifier code, this could be moved to
> > include/linux/kdebug.h instead?
> >
>
> Yes, I think something is definitely wrong here. If the code is presently
> calling show_registers() with no prototype in scope, it should be emitting
> warnings?
No, it's not a caller but the function itself that is present wiith
CONFIG_KPROBES=n, giving me warnings with -Wmissing-prototypes.
> Also, yes, kprobes.h is an inappropriate place for this declaration. It
> should be in include/asm-foo/, I guess.
Currently, we have partially both...
And include/linux/ sounds like a better place it the prototype should be
the same on all architectures.
> But if we do that, there's an excellent chance of a compile explosion,
> because we also have implementations of show_registers() in
> drivers/net/wireless/ipw2100.c, drivers/usb/gadget/net2280.c,
> drivers/usb/host/ehci-dbg.c, drivers/usb/host/ohci-dbg.c and who knows
> where else.
>
> So what I'd suggest is that we rename show_registers() to something saner,
> then put the declaration into some arch header file then include that
> header in kprobes.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 6+ messages in thread
* [2.6 patch] include/linux/kprobes.h: always offer show_registers() prototype
@ 2007-06-17 23:43 Adrian Bunk
2007-06-18 6:27 ` S. P. Prasanna
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2007-06-17 23:43 UTC (permalink / raw)
To: Andrew Morton; +Cc: prasanna, ananth, anil.s.keshavamurthy, davem, linux-kernel
Allow gcc to perform show_registers() type checking also with
CONFIG_KPROBES=n.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch has been sent on:
- 27 Apr 2007
- 27 Mar 2007
include/linux/kprobes.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- linux-2.6.21-rc4-mm1/include/linux/kprobes.h.old 2007-03-26 15:28:27.000000000 +0200
+++ linux-2.6.21-rc4-mm1/include/linux/kprobes.h 2007-03-26 15:32:23.000000000 +0200
@@ -163,7 +163,6 @@
extern void arch_arm_kprobe(struct kprobe *p);
extern void arch_disarm_kprobe(struct kprobe *p);
extern int arch_init_kprobes(void);
-extern void show_registers(struct pt_regs *regs);
extern kprobe_opcode_t *get_insn_slot(void);
extern void free_insn_slot(kprobe_opcode_t *slot, int dirty);
extern void kprobes_inc_nmissed_count(struct kprobe *p);
@@ -241,4 +240,7 @@
{
}
#endif /* CONFIG_KPROBES */
+
+void show_registers(struct pt_regs *regs);
+
#endif /* _LINUX_KPROBES_H */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] include/linux/kprobes.h: always offer show_registers() prototype
2007-06-17 23:43 Adrian Bunk
@ 2007-06-18 6:27 ` S. P. Prasanna
0 siblings, 0 replies; 6+ messages in thread
From: S. P. Prasanna @ 2007-06-18 6:27 UTC (permalink / raw)
To: Adrian Bunk
Cc: Andrew Morton, ananth, anil.s.keshavamurthy, davem, linux-kernel
On Mon, Jun 18, 2007 at 01:43:04AM +0200, Adrian Bunk wrote:
> Allow gcc to perform show_registers() type checking also with
> CONFIG_KPROBES=n.
>
Adrian,
Please implement it as Andrew suggested, when this was patch was posted
eariler. Refer this discussion thread below.
http://lkml.org/lkml/2007/4/27/576
NACK
Thanks
Prasanna
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> ---
>
> This patch has been sent on:
> - 27 Apr 2007
> - 27 Mar 2007
>
> include/linux/kprobes.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> --- linux-2.6.21-rc4-mm1/include/linux/kprobes.h.old 2007-03-26 15:28:27.000000000 +0200
> +++ linux-2.6.21-rc4-mm1/include/linux/kprobes.h 2007-03-26 15:32:23.000000000 +0200
> @@ -163,7 +163,6 @@
> extern void arch_arm_kprobe(struct kprobe *p);
> extern void arch_disarm_kprobe(struct kprobe *p);
> extern int arch_init_kprobes(void);
> -extern void show_registers(struct pt_regs *regs);
> extern kprobe_opcode_t *get_insn_slot(void);
> extern void free_insn_slot(kprobe_opcode_t *slot, int dirty);
> extern void kprobes_inc_nmissed_count(struct kprobe *p);
> @@ -241,4 +240,7 @@
> {
> }
> #endif /* CONFIG_KPROBES */
> +
> +void show_registers(struct pt_regs *regs);
> +
> #endif /* _LINUX_KPROBES_H */
--
Prasanna S.P.
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-41776329
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-06-18 6:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-26 23:47 [2.6 patch] include/linux/kprobes.h: always offer show_registers() prototype Adrian Bunk
2007-04-27 5:10 ` Ananth N Mavinakayanahalli
2007-04-27 23:32 ` Andrew Morton
2007-04-28 12:42 ` Adrian Bunk
2007-06-17 23:43 Adrian Bunk
2007-06-18 6:27 ` S. P. Prasanna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).