From: Andrew Morton <akpm@osdl.org>
To: prasanna@in.ibm.com
Cc: ak@suse.de, davem@davemloft.net, systemtap@sources.redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [1/6 PATCH] Kprobes : Prevent possible race conditions generic changes
Date: Thu, 7 Jul 2005 03:25:37 -0700 [thread overview]
Message-ID: <20050707032537.7588acb9.akpm@osdl.org> (raw)
In-Reply-To: <20050707101015.GE12106@in.ibm.com>
Prasanna S Panchamukhi <prasanna@in.ibm.com> wrote:
>
> There are possible race conditions if probes are placed on routines within the
> kprobes files and routines used by the kprobes.
So... don't do that then? Is it likely that anyone would want to stick a
probe on the kprobe code itself?
> -kprobe_opcode_t *get_insn_slot(void)
> +kprobe_opcode_t * __kprobes get_insn_slot(void)
coding style regression...
> -int register_kprobe(struct kprobe *p)
> +static int __kprobes in_kprobes_functions(unsigned long addr)
> +{
> + /* Linker adds these: start and end of __kprobes functions */
> + extern char __kprobes_text_start[], __kprobes_text_end[];
There's an old unix convention that section markers (start, end, edata,
etc) are declared `int'. For some reason we don't do that in the kernel.
Oh well.
> + if ((ret = in_kprobes_functions((unsigned long) p->addr)) !=0)
whitespace broke.
Some people don't like the assign-then-test-it style.
> + return ret;
> if ((ret = arch_prepare_kprobe(p)) != 0) {
> goto rm_kprobe;
> }
hm, who put the unneeded braces in there?
> --- linux-2.6.13-rc1-mm1/include/linux/kprobes.h~kprobes-exclude-functions-generic 2005-07-06 18:51:16.000000000 +0530
> +++ linux-2.6.13-rc1-mm1-prasanna/include/linux/kprobes.h 2005-07-06 18:51:16.000000000 +0530
> @@ -42,6 +42,10 @@
> #define KPROBE_REENTER 0x00000004
> #define KPROBE_HIT_SSDONE 0x00000008
>
> +/* Attach to insert probes on any functions which should be ignored*/
> +#define __kprobes __attribute__((__section__(".kprobes.text")))
> +/* Is this address in the __kprobes functions? */
> +
What's that comment mean?
next prev parent reply other threads:[~2005-07-07 10:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-07 10:10 Prasanna S Panchamukhi
2005-07-07 10:11 ` [2/6 PATCH] Kprobes : Prevent possible race conditions i386 changes Prasanna S Panchamukhi
2005-07-07 10:14 ` [3/6 PATCH] Kprobes : Prevent possible race conditions x86_64 changes Prasanna S Panchamukhi
2005-07-07 10:16 ` [4/6 PATCH] Kprobes : Prevent possible race conditions ppc64 changes Prasanna S Panchamukhi
2005-07-07 10:18 ` [5/6 PATCH] Kprobes : Prevent possible race conditions ia64 changes Prasanna S Panchamukhi
2005-07-07 10:20 ` [6/6 PATCH] Kprobes : Prevent possible race conditions sparc64 changes Prasanna S Panchamukhi
2005-07-08 2:06 ` [5/6 PATCH] Kprobes : Prevent possible race conditions ia64 changes Keshavamurthy Anil S
2005-07-08 11:10 ` Prasanna S Panchamukhi
2005-07-08 19:01 ` Keshavamurthy Anil S
2005-07-08 19:16 ` Prarit Bhargava
2005-07-08 14:13 ` [4/6 PATCH] Kprobes : Prevent possible race conditions ppc64 changes Ananth N Mavinakayanahalli
2005-07-08 11:07 ` [3/6 PATCH] Kprobes : Prevent possible race conditions x86_64 changes Prasanna S Panchamukhi
2005-07-07 13:19 ` [2/6 PATCH] Kprobes : Prevent possible race conditions i386 changes Andi Kleen
2005-07-08 11:05 ` Prasanna S Panchamukhi
2005-07-07 10:25 ` Andrew Morton [this message]
2005-07-07 10:34 ` [1/6 PATCH] Kprobes : Prevent possible race conditions generic changes Andi Kleen
2005-07-07 13:01 ` Prasanna S Panchamukhi
2005-07-08 11:02 ` Prasanna S Panchamukhi
2005-07-07 21:20 ` Vara Prasad
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=20050707032537.7588acb9.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ak@suse.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=prasanna@in.ibm.com \
--cc=systemtap@sources.redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®