Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'probes-fixes-v6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull probes fixes from Masami Hiramatsu:

- tracing/kprobes: Fix kernel-doc warnings for the variable length
arguments

- tracing/kprobes: Fix to count the symbols in modules even if the
module name is not specified so that user can probe the symbols in
the modules without module name

* tag 'probes-fixes-v6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tracing/kprobes: Fix symbol counting logic by looking at modules as well
tracing/kprobes: Fix the description of variable length arguments

+22 -6
+22 -6
kernel/trace/trace_kprobe.c
··· 714 714 return 0; 715 715 } 716 716 717 + struct sym_count_ctx { 718 + unsigned int count; 719 + const char *name; 720 + }; 721 + 722 + static int count_mod_symbols(void *data, const char *name, unsigned long unused) 723 + { 724 + struct sym_count_ctx *ctx = data; 725 + 726 + if (strcmp(name, ctx->name) == 0) 727 + ctx->count++; 728 + 729 + return 0; 730 + } 731 + 717 732 static unsigned int number_of_same_symbols(char *func_name) 718 733 { 719 - unsigned int count; 734 + struct sym_count_ctx ctx = { .count = 0, .name = func_name }; 720 735 721 - count = 0; 722 - kallsyms_on_each_match_symbol(count_symbols, func_name, &count); 736 + kallsyms_on_each_match_symbol(count_symbols, func_name, &ctx.count); 723 737 724 - return count; 738 + module_kallsyms_on_each_symbol(NULL, count_mod_symbols, &ctx); 739 + 740 + return ctx.count; 725 741 } 726 742 727 743 static int __trace_kprobe_create(int argc, const char *argv[]) ··· 1023 1007 * @name: The name of the kprobe event 1024 1008 * @loc: The location of the kprobe event 1025 1009 * @kretprobe: Is this a return probe? 1026 - * @args: Variable number of arg (pairs), one pair for each field 1010 + * @...: Variable number of arg (pairs), one pair for each field 1027 1011 * 1028 1012 * NOTE: Users normally won't want to call this function directly, but 1029 1013 * rather use the kprobe_event_gen_cmd_start() wrapper, which automatically ··· 1096 1080 /** 1097 1081 * __kprobe_event_add_fields - Add probe fields to a kprobe command from arg list 1098 1082 * @cmd: A pointer to the dynevent_cmd struct representing the new event 1099 - * @args: Variable number of arg (pairs), one pair for each field 1083 + * @...: Variable number of arg (pairs), one pair for each field 1100 1084 * 1101 1085 * NOTE: Users normally won't want to call this function directly, but 1102 1086 * rather use the kprobe_event_add_fields() wrapper, which