Revert remainings of "ANDROID: security,perf: Allow further restriction of perf_event_open"

When reverting commit 5dbd8df7b3 ("ANDROID: security,perf: Allow
further restriction of perf_event_open") with commit e92b6ef8fc
("Revert "ANDROID: security,perf: Allow further restriction of
perf_event_open""), some lines were left out. Remove that dead code.

Fixes: e92b6ef8fc ("Revert "ANDROID: security,perf: Allow further restriction of perf_event_open"")
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: Ia53795c909fdb6686176e6a1540f793e248f13a3
This commit is contained in:
Matthias Maennich 2020-03-09 22:25:47 +00:00
parent f3214126fe
commit 60701bc1fe
2 changed files with 0 additions and 8 deletions

View File

@ -1270,11 +1270,6 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
int perf_event_max_stack_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos);
static inline bool perf_paranoid_any(void)
{
return sysctl_perf_event_paranoid > 2;
}
/* Access to perf_event_open(2) syscall. */
#define PERF_SECURITY_OPEN 0

View File

@ -11184,9 +11184,6 @@ SYSCALL_DEFINE5(perf_event_open,
if (err)
return err;
if (perf_paranoid_any() && !capable(CAP_SYS_ADMIN))
return -EACCES;
err = perf_copy_attr(attr_uptr, &attr);
if (err)
return err;