Pull perf/urgent fixes from Arnaldo Carvalho de Melo: Kernel: - Modify breakpoint fixes (Jiri Olsa) perf annotate: - Fix parsing aarch64 branch instructions after objdump update (Kim Phillips) - Fix parsing indirect calls in 'perf annotate' (Martin Liška) perf probe: - Ignore SyS symbols irrespective of endianness on PowerPC (Sandipan Das) perf trace: - Fix include path for asm-generic/unistd.h on arm64 (Kim Phillips) Core libraries: - Fix potential null pointer dereference in perf_evsel__new_idx() (Hisao Tanabe) - Use fixed size string for comms instead of scanf("%m"), that is not present in the bionic libc and leads to a crash (Chris Phlipot) - Fix bad memory access in trace info on 32-bit systems, we were reading 8 bytes from a 4-byte long variable when saving the command line in the perf.data file. (Chris Phlipot) Build system: - Streamline bpf examples and headers installation, clarifying some install messages. (Arnaldo Carvalho de Melo)
Showing the changes to kernel/events (2 of 15 files). Show all
Unified · Split
| @@ -2867,16 +2867,11 @@ static int perf_event_modify_breakpoint(struct perf_event *bp, · 2866 unmodified lines | ||
| 2867 | 2867 | _perf_event_disable(bp); |
| 2868 | 2868 | |
| 2869 | 2869 | err = modify_user_hw_breakpoint_check(bp, attr, true); |
| 2870 | − if (err) { | |
| 2871 | − if (!bp->attr.disabled) | |
| 2872 | − _perf_event_enable(bp); | |
| 2873 | 2870 | |
| 2874 | − return err; | |
| 2875 | − } | |
| 2876 | − | |
| 2877 | − if (!attr->disabled) | |
| 2871 | + if (!bp->attr.disabled) | |
| 2878 | 2872 | _perf_event_enable(bp); |
| 2879 | − return 0; | |
| 2873 | + | |
| 2874 | + return err; | |
| 2880 | 2875 | } |
| 2881 | 2876 | |
| 2882 | 2877 | static int perf_event_modify_attr(struct perf_event *event, |
| @@ -509,6 +509,8 @@ modify_user_hw_breakpoint_check(struct perf_event *bp, struct perf_event_attr *a · 508 unmodified lines | ||
| 509 | 509 | */ |
| 510 | 510 | int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr) |
| 511 | 511 | { |
| 512 | + int err; | |
| 513 | + | |
| 512 | 514 | /* |
| 513 | 515 | * modify_user_hw_breakpoint can be invoked with IRQs disabled and hence it |
| 514 | 516 | * will not be possible to raise IPIs that invoke __perf_event_disable. |
| @@ -520,15 +522,12 @@ int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *att · 5 unmodified lines | ||
| 520 | 522 | else |
| 521 | 523 | perf_event_disable(bp); |
| 522 | 524 | |
| 523 | − if (!attr->disabled) { | |
| 524 | − int err = modify_user_hw_breakpoint_check(bp, attr, false); | |
| 525 | + err = modify_user_hw_breakpoint_check(bp, attr, false); | |
| 525 | 526 | |
| 526 | − if (err) | |
| 527 | − return err; | |
| 527 | + if (!bp->attr.disabled) | |
| 528 | 528 | perf_event_enable(bp); |
| 529 | − bp->attr.disabled = 0; | |
| 530 | − } | |
| 531 | − return 0; | |
| 529 | + | |
| 530 | + return err; | |
| 532 | 531 | } |
| 533 | 532 | EXPORT_SYMBOL_GPL(modify_user_hw_breakpoint); |
| 534 | 533 | |