hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/tools/perf/util/auxtrace.c
....@@ -2279,6 +2279,7 @@
22792279 char type, u64 start)
22802280 {
22812281 struct sym_args *args = arg;
2282
+ u64 size;
22822283
22832284 if (!kallsyms__is_function(type))
22842285 return 0;
....@@ -2288,7 +2289,9 @@
22882289 args->start = start;
22892290 }
22902291 /* Don't know exactly where the kernel ends, so we add a page */
2291
- args->size = round_up(start, page_size) + page_size - args->start;
2292
+ size = round_up(start, page_size) + page_size - args->start;
2293
+ if (size > args->size)
2294
+ args->size = size;
22922295
22932296 return 0;
22942297 }
....@@ -2449,7 +2452,7 @@
24492452 *size = sym->start - *start;
24502453 if (idx > 0) {
24512454 if (*size)
2452
- return 1;
2455
+ return 0;
24532456 } else if (dso_sym_match(sym, sym_name, &cnt, idx)) {
24542457 print_duplicate_syms(dso, sym_name);
24552458 return -EINVAL;