File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -7308,21 +7308,6 @@ int perf_event_account_interrupt(struct perf_event *event)
7308
7308
return __perf_event_account_interrupt (event , 1 );
7309
7309
}
7310
7310
7311
- static bool sample_is_allowed (struct perf_event * event , struct pt_regs * regs )
7312
- {
7313
- /*
7314
- * Due to interrupt latency (AKA "skid"), we may enter the
7315
- * kernel before taking an overflow, even if the PMU is only
7316
- * counting user events.
7317
- * To avoid leaking information to userspace, we must always
7318
- * reject kernel samples when exclude_kernel is set.
7319
- */
7320
- if (event -> attr .exclude_kernel && !user_mode (regs ))
7321
- return false;
7322
-
7323
- return true;
7324
- }
7325
-
7326
7311
/*
7327
7312
* Generic event overflow handling, sampling.
7328
7313
*/
@@ -7343,12 +7328,6 @@ static int __perf_event_overflow(struct perf_event *event,
7343
7328
7344
7329
ret = __perf_event_account_interrupt (event , throttle );
7345
7330
7346
- /*
7347
- * For security, drop the skid kernel samples if necessary.
7348
- */
7349
- if (!sample_is_allowed (event , regs ))
7350
- return ret ;
7351
-
7352
7331
/*
7353
7332
* XXX event_limit might not quite work as expected on inherited
7354
7333
* events
You can’t perform that action at this time.
0 commit comments