Pull perf fixes from Borislav Petkov: - Fix raw data handling when perf events are used in bpf - Rework how SIGTRAPs get delivered to events to address a bunch of problems with it. Add a selftest for that too * tag 'perf_urgent_for_v6.1_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: bpf: Fix sample_flags for bpf_perf_event_output selftests/perf_events: Add a SIGTRAP stress test with disables perf: Fix missing SIGTRAPs
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -756,11 +756,14 @@ struct perf_event { · 755 unmodified lines | |||
| 756 | struct fasync_struct *fasync; | 756 | struct fasync_struct *fasync; |
| 757 | 757 | ||
| 758 | /* delayed work for NMIs and such */ | 758 | /* delayed work for NMIs and such */ |
| 759 | int pending_wakeup; | 759 | unsigned int pending_wakeup; |
| 760 | int pending_kill; | 760 | unsigned int pending_kill; |
| 761 | int pending_disable; | 761 | unsigned int pending_disable; |
| 762 | unsigned int pending_sigtrap; | ||
| 762 | unsigned long pending_addr; /* SIGTRAP */ | 763 | unsigned long pending_addr; /* SIGTRAP */ |
| 763 | struct irq_work pending; | 764 | struct irq_work pending_irq; |
| 765 | struct callback_head pending_task; | ||
| 766 | unsigned int pending_work; | ||
| 764 | 767 | ||
| 765 | atomic_t event_limit; | 768 | atomic_t event_limit; |
| 766 | 769 | ||
| @@ -877,6 +880,14 @@ struct perf_event_context { · 110 unmodified lines | |||
| 877 | #endif | 880 | #endif |
| 878 | void *task_ctx_data; /* pmu specific data */ | 881 | void *task_ctx_data; /* pmu specific data */ |
| 879 | struct rcu_head rcu_head; | 882 | struct rcu_head rcu_head; |
| 883 | |||
| 884 | /* | ||
| 885 | * Sum (event->pending_sigtrap + event->pending_work) | ||
| 886 | * | ||
| 887 | * The SIGTRAP is targeted at ctx->task, as such it won't do changing | ||
| 888 | * that until the signal is delivered. | ||
| 889 | */ | ||
| 890 | local_t nr_pending; | ||
| 880 | }; | 891 | }; |
| 881 | 892 | ||
| 882 | /* | 893 | /* |