diff mbox series

bpf, lsm: Fix getlsmprop hooks BTF IDs

Message ID 20241123-bpf_lsm_task_getsecid_obj-v1-1-0d0f94649e05@weissschuh.net (mailing list archive)
State New
Headers show
Series bpf, lsm: Fix getlsmprop hooks BTF IDs | expand

Commit Message

Thomas Weißschuh Nov. 23, 2024, 10:19 a.m. UTC
The hooks got renamed, adapt the BTF IDs.
Fixes the following build warning:

  BTFIDS  vmlinux
WARN: resolve_btfids: unresolved symbol bpf_lsm_task_getsecid_obj
WARN: resolve_btfids: unresolved symbol bpf_lsm_current_getsecid_subj

Fixes: 37f670aacd48 ("lsm: use lsm_prop in security_current_getsecid")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 kernel/bpf/bpf_lsm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


---
base-commit: 228a1157fb9fec47eb135b51c0202b574e079ebf
change-id: 20241123-bpf_lsm_task_getsecid_obj-afdd47f84c7f

Best regards,

Comments

Jiri Olsa Nov. 23, 2024, 12:37 p.m. UTC | #1
On Sat, Nov 23, 2024 at 11:19:01AM +0100, Thomas Weißschuh wrote:
> The hooks got renamed, adapt the BTF IDs.
> Fixes the following build warning:
> 
>   BTFIDS  vmlinux
> WARN: resolve_btfids: unresolved symbol bpf_lsm_task_getsecid_obj
> WARN: resolve_btfids: unresolved symbol bpf_lsm_current_getsecid_subj
> 
> Fixes: 37f670aacd48 ("lsm: use lsm_prop in security_current_getsecid")
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

Acked-by: Jiri Olsa <olsajiri@gmail.com>

thanks,
jirka

> ---
>  kernel/bpf/bpf_lsm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c
> index 3bc61628ab251e05d7837eb27dabc3b62bcc4783..5be76572ab2e8a0c6e18a81f9e4c14812a11aad2 100644
> --- a/kernel/bpf/bpf_lsm.c
> +++ b/kernel/bpf/bpf_lsm.c
> @@ -375,8 +375,8 @@ BTF_ID(func, bpf_lsm_socket_socketpair)
>  
>  BTF_ID(func, bpf_lsm_syslog)
>  BTF_ID(func, bpf_lsm_task_alloc)
> -BTF_ID(func, bpf_lsm_current_getsecid_subj)
> -BTF_ID(func, bpf_lsm_task_getsecid_obj)
> +BTF_ID(func, bpf_lsm_current_getlsmprop_subj)
> +BTF_ID(func, bpf_lsm_task_getlsmprop_obj)
>  BTF_ID(func, bpf_lsm_task_prctl)
>  BTF_ID(func, bpf_lsm_task_setscheduler)
>  BTF_ID(func, bpf_lsm_task_to_inode)
> 
> ---
> base-commit: 228a1157fb9fec47eb135b51c0202b574e079ebf
> change-id: 20241123-bpf_lsm_task_getsecid_obj-afdd47f84c7f
> 
> Best regards,
> -- 
> Thomas Weißschuh <linux@weissschuh.net>
>
diff mbox series

Patch

diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c
index 3bc61628ab251e05d7837eb27dabc3b62bcc4783..5be76572ab2e8a0c6e18a81f9e4c14812a11aad2 100644
--- a/kernel/bpf/bpf_lsm.c
+++ b/kernel/bpf/bpf_lsm.c
@@ -375,8 +375,8 @@  BTF_ID(func, bpf_lsm_socket_socketpair)
 
 BTF_ID(func, bpf_lsm_syslog)
 BTF_ID(func, bpf_lsm_task_alloc)
-BTF_ID(func, bpf_lsm_current_getsecid_subj)
-BTF_ID(func, bpf_lsm_task_getsecid_obj)
+BTF_ID(func, bpf_lsm_current_getlsmprop_subj)
+BTF_ID(func, bpf_lsm_task_getlsmprop_obj)
 BTF_ID(func, bpf_lsm_task_prctl)
 BTF_ID(func, bpf_lsm_task_setscheduler)
 BTF_ID(func, bpf_lsm_task_to_inode)