Re: [PATCH 71/74] lto, kprobes: Use KSYM_NAME_LEN to sizeidentifier buffers

From: Ananth N Mavinakayanahalli
Date: Tue Aug 21 2012 - 00:44:40 EST


On Sat, Aug 18, 2012 at 07:57:07PM -0700, Andi Kleen wrote:
> From: Joe Mario <jmario@xxxxxxxxxx>
>
> Use KSYM_NAME_LEN to size identifier buffers, so that it can
> be easier increased.
>
> Cc: ananth@xxxxxxxxxx
> Signed-off-by: Joe Mario <jmario@xxxxxxxxxx>
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

Acked-by: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>

> ---
> kernel/kprobes.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index c62b854..b9bd2a8 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -1955,7 +1955,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;
> @@ -2081,7 +2081,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.7.7.6

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