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 branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Thomas Gleixner:
"A few fixes from the perf departement

- prevent a imbalanced preemption disable in the events teardown code
- prevent out of bound acces in perf userspace
- make perf tools compile with UCLIBC again
- a fix for the userspace unwinder utility"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Use this_cpu_ptr() when stopping AUX events
perf evsel: Do not access outside hw cache name arrays
tools lib: Reinstate strlcpy() header guard with __UCLIBC__
perf unwind: Use addr_location::addr instead of ip for entries

+11 -7
+1 -1
kernel/events/core.c
··· 6166 6166 { 6167 6167 struct perf_event *event = info; 6168 6168 struct pmu *pmu = event->pmu; 6169 - struct perf_cpu_context *cpuctx = get_cpu_ptr(pmu->pmu_cpu_context); 6169 + struct perf_cpu_context *cpuctx = this_cpu_ptr(pmu->pmu_cpu_context); 6170 6170 struct remote_output ro = { 6171 6171 .rb = event->rb, 6172 6172 };
+5 -1
tools/include/linux/string.h
··· 8 8 9 9 int strtobool(const char *s, bool *res); 10 10 11 - #ifdef __GLIBC__ 11 + /* 12 + * glibc based builds needs the extern while uClibc doesn't. 13 + * However uClibc headers also define __GLIBC__ hence the hack below 14 + */ 15 + #if defined(__GLIBC__) && !defined(__UCLIBC__) 12 16 extern size_t strlcpy(char *dest, const char *src, size_t size); 13 17 #endif 14 18
+3 -3
tools/perf/util/evsel.c
··· 507 507 u8 op, result, type = (config >> 0) & 0xff; 508 508 const char *err = "unknown-ext-hardware-cache-type"; 509 509 510 - if (type > PERF_COUNT_HW_CACHE_MAX) 510 + if (type >= PERF_COUNT_HW_CACHE_MAX) 511 511 goto out_err; 512 512 513 513 op = (config >> 8) & 0xff; 514 514 err = "unknown-ext-hardware-cache-op"; 515 - if (op > PERF_COUNT_HW_CACHE_OP_MAX) 515 + if (op >= PERF_COUNT_HW_CACHE_OP_MAX) 516 516 goto out_err; 517 517 518 518 result = (config >> 16) & 0xff; 519 519 err = "unknown-ext-hardware-cache-result"; 520 - if (result > PERF_COUNT_HW_CACHE_RESULT_MAX) 520 + if (result >= PERF_COUNT_HW_CACHE_RESULT_MAX) 521 521 goto out_err; 522 522 523 523 err = "invalid-cache";
+1 -1
tools/perf/util/unwind-libdw.c
··· 66 66 if (__report_module(&al, ip, ui)) 67 67 return -1; 68 68 69 - e->ip = ip; 69 + e->ip = al.addr; 70 70 e->map = al.map; 71 71 e->sym = al.sym; 72 72
+1 -1
tools/perf/util/unwind-libunwind-local.c
··· 542 542 thread__find_addr_location(thread, PERF_RECORD_MISC_USER, 543 543 MAP__FUNCTION, ip, &al); 544 544 545 - e.ip = ip; 545 + e.ip = al.addr; 546 546 e.map = al.map; 547 547 e.sym = al.sym; 548 548