Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH 3/3] kprobes: Use KSYM_NAME_LEN to size identifier buffers

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


andi at firstfloor

Aug 10, 2013, 5:55 PM

Post #1 of 2 (13 views)
Permalink
[PATCH 3/3] kprobes: Use KSYM_NAME_LEN to size identifier buffers

From: Joe Mario <jmario [at] redhat>

Use KSYM_NAME_LEN to size identifier buffers, so that it can
be easier increased.

Cc: ananth [at] in
Signed-off-by: Joe Mario <jmario [at] redhat>
Signed-off-by: Andi Kleen <ak [at] linux>
---
kernel/kprobes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 6e33498..e174daf 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -2083,7 +2083,7 @@ static int __init init_kprobes(void)
{
int i, err = 0;
unsigned long offset = 0, size = 0;
- char *modname, namebuf[128];
+ char *modname, namebuf[KSYM_NAME_LEN];
const char *symbol_name;
void *addr;
struct kprobe_blackpoint *kb;
@@ -2209,7 +2209,7 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v)
const char *sym = NULL;
unsigned int i = *(loff_t *) v;
unsigned long offset = 0;
- char *modname, namebuf[128];
+ char *modname, namebuf[KSYM_NAME_LEN];

head = &kprobe_table[i];
preempt_disable();
--
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


ananth at in

Aug 11, 2013, 9:31 PM

Post #2 of 2 (3 views)
Permalink
Re: [PATCH 3/3] kprobes: Use KSYM_NAME_LEN to size identifier buffers [In reply to]

On Sat, Aug 10, 2013 at 05:55:33PM -0700, Andi Kleen wrote:
> From: Joe Mario <jmario [at] redhat>
>
> Use KSYM_NAME_LEN to size identifier buffers, so that it can
> be easier increased.
>
> Cc: ananth [at] in
> Signed-off-by: Joe Mario <jmario [at] redhat>
> Signed-off-by: Andi Kleen <ak [at] linux>

Acked-by: Ananth N Mavinakayanahalli <ananth [at] in>

> ---
> kernel/kprobes.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index 6e33498..e174daf 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -2083,7 +2083,7 @@ static int __init init_kprobes(void)
> {
> int i, err = 0;
> unsigned long offset = 0, size = 0;
> - char *modname, namebuf[128];
> + char *modname, namebuf[KSYM_NAME_LEN];
> const char *symbol_name;
> void *addr;
> struct kprobe_blackpoint *kb;
> @@ -2209,7 +2209,7 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v)
> const char *sym = NULL;
> unsigned int i = *(loff_t *) v;
> unsigned long offset = 0;
> - char *modname, namebuf[128];
> + char *modname, namebuf[KSYM_NAME_LEN];
>
> head = &kprobe_table[i];
> preempt_disable();
> --
> 1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.