* [PATCH bpf-next] bpf: lsm: Remove hook to bpf_task_storage_free
@ 2024-12-12 7:59 Song Liu
2024-12-12 8:31 ` Matt Bobrowski
2024-12-16 20:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Song Liu @ 2024-12-12 7:59 UTC (permalink / raw)
To: bpf, linux-kernel, linux-security-module
Cc: kernel-team, andrii, ast, daniel, martin.lau, kpsingh,
mattbobrowski, Song Liu
free_task() already calls bpf_task_storage_free(). It is not necessary
to call it again on security_task_free(). Remove the hook.
Signed-off-by: Song Liu <song@kernel.org>
---
This was initially sent in a patchset [1]. However, this patch is not
closely related to other patches in the set, so sending it alone.
[1] https://lore.kernel.org/bpf/20241112083700.356299-1-song@kernel.org/
---
security/bpf/hooks.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/security/bpf/hooks.c b/security/bpf/hooks.c
index 3663aec7bcbd..db759025abe1 100644
--- a/security/bpf/hooks.c
+++ b/security/bpf/hooks.c
@@ -13,7 +13,6 @@ static struct security_hook_list bpf_lsm_hooks[] __ro_after_init = {
#include <linux/lsm_hook_defs.h>
#undef LSM_HOOK
LSM_HOOK_INIT(inode_free_security, bpf_inode_storage_free),
- LSM_HOOK_INIT(task_free, bpf_task_storage_free),
};
static const struct lsm_id bpf_lsmid = {
--
2.43.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next] bpf: lsm: Remove hook to bpf_task_storage_free
2024-12-12 7:59 [PATCH bpf-next] bpf: lsm: Remove hook to bpf_task_storage_free Song Liu
@ 2024-12-12 8:31 ` Matt Bobrowski
2024-12-16 20:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Matt Bobrowski @ 2024-12-12 8:31 UTC (permalink / raw)
To: Song Liu
Cc: bpf, linux-kernel, linux-security-module, kernel-team, andrii,
ast, daniel, martin.lau, kpsingh
On Wed, Dec 11, 2024 at 11:59:56PM -0800, Song Liu wrote:
> free_task() already calls bpf_task_storage_free(). It is not necessary
> to call it again on security_task_free(). Remove the hook.
Acked-by: Matt Bobrowski <mattbobrowski@google.com>
> Signed-off-by: Song Liu <song@kernel.org>
>
> ---
>
> This was initially sent in a patchset [1]. However, this patch is not
> closely related to other patches in the set, so sending it alone.
>
> [1] https://lore.kernel.org/bpf/20241112083700.356299-1-song@kernel.org/
> ---
> security/bpf/hooks.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/security/bpf/hooks.c b/security/bpf/hooks.c
> index 3663aec7bcbd..db759025abe1 100644
> --- a/security/bpf/hooks.c
> +++ b/security/bpf/hooks.c
> @@ -13,7 +13,6 @@ static struct security_hook_list bpf_lsm_hooks[] __ro_after_init = {
> #include <linux/lsm_hook_defs.h>
> #undef LSM_HOOK
> LSM_HOOK_INIT(inode_free_security, bpf_inode_storage_free),
> - LSM_HOOK_INIT(task_free, bpf_task_storage_free),
> };
>
> static const struct lsm_id bpf_lsmid = {
> --
> 2.43.5
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next] bpf: lsm: Remove hook to bpf_task_storage_free
2024-12-12 7:59 [PATCH bpf-next] bpf: lsm: Remove hook to bpf_task_storage_free Song Liu
2024-12-12 8:31 ` Matt Bobrowski
@ 2024-12-16 20:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-16 20:40 UTC (permalink / raw)
To: Song Liu
Cc: bpf, linux-kernel, linux-security-module, kernel-team, andrii,
ast, daniel, martin.lau, kpsingh, mattbobrowski
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Martin KaFai Lau <martin.lau@kernel.org>:
On Wed, 11 Dec 2024 23:59:56 -0800 you wrote:
> free_task() already calls bpf_task_storage_free(). It is not necessary
> to call it again on security_task_free(). Remove the hook.
>
> Signed-off-by: Song Liu <song@kernel.org>
>
> ---
>
> [...]
Here is the summary with links:
- [bpf-next] bpf: lsm: Remove hook to bpf_task_storage_free
https://git.kernel.org/bpf/bpf-next/c/58ecb3a789fd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-16 20:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 7:59 [PATCH bpf-next] bpf: lsm: Remove hook to bpf_task_storage_free Song Liu
2024-12-12 8:31 ` Matt Bobrowski
2024-12-16 20:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).