diff options
author | Luo Gengkun <luogengkun@huaweicloud.com> | 2024-12-23 07:06:49 +0000 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2025-02-26 14:13:58 -0500 |
commit | 9ec84f79c5a7a65cd69b5b705a203759665160cd (patch) | |
tree | a1acc30a161de827a961da3b008e1474536de385 /security | |
parent | 4632cd0ec3faa568660a194d5a93450d9cbf7aa5 (diff) | |
download | linux-9ec84f79c5a7a65cd69b5b705a203759665160cd.tar.gz linux-9ec84f79c5a7a65cd69b5b705a203759665160cd.tar.bz2 linux-9ec84f79c5a7a65cd69b5b705a203759665160cd.zip |
perf: Remove unnecessary parameter of security check
It seems that the attr parameter was never been used in security
checks since it was first introduced by:
commit da97e18458fb ("perf_event: Add support for LSM and SELinux checks")
so remove it.
Signed-off-by: Luo Gengkun <luogengkun@huaweicloud.com>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/security.c | 5 | ||||
-rw-r--r-- | security/selinux/hooks.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/security/security.c b/security/security.c index c9fae447327e..8aa839232c73 100644 --- a/security/security.c +++ b/security/security.c @@ -5883,16 +5883,15 @@ EXPORT_SYMBOL(security_bdev_setintegrity); #ifdef CONFIG_PERF_EVENTS /** * security_perf_event_open() - Check if a perf event open is allowed - * @attr: perf event attribute * @type: type of event * * Check whether the @type of perf_event_open syscall is allowed. * * Return: Returns 0 if permission is granted. */ -int security_perf_event_open(struct perf_event_attr *attr, int type) +int security_perf_event_open(int type) { - return call_int_hook(perf_event_open, attr, type); + return call_int_hook(perf_event_open, type); } /** diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index fb37e87df226..6780425cc7e0 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -7040,7 +7040,7 @@ struct lsm_blob_sizes selinux_blob_sizes __ro_after_init = { }; #ifdef CONFIG_PERF_EVENTS -static int selinux_perf_event_open(struct perf_event_attr *attr, int type) +static int selinux_perf_event_open(int type) { u32 requested, sid = current_sid(); |