[RFC bpf-next] lsm: bpf: Remove lsm_prop_bpf
Matt Bobrowski
mattbobrowski at google.com
Mon Oct 27 09:40:51 UTC 2025
On Fri, Oct 24, 2025 at 05:10:22PM -0700, Song Liu wrote:
> lsm_prop_bpf is not used in any code. Remove it.
>
> Signed-off-by: Song Liu <song at kernel.org>
Reviewed-by: Matt Bobrowski <mattbobrowski at google.com>
> ---
>
> Or did I miss any user of it?
No, it doesn't look like you have, and I don't see how struct lsm_prop
could be used from the context of the BPF LSM ATM anyway. Thanks for
cleaning this up.
> ---
> include/linux/lsm/bpf.h | 16 ----------------
> include/linux/security.h | 2 --
> 2 files changed, 18 deletions(-)
> delete mode 100644 include/linux/lsm/bpf.h
>
> diff --git a/include/linux/lsm/bpf.h b/include/linux/lsm/bpf.h
> deleted file mode 100644
> index 8106e206fcef..000000000000
> --- a/include/linux/lsm/bpf.h
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * Linux Security Module interface to other subsystems.
> - * BPF may present a single u32 value.
> - */
> -#ifndef __LINUX_LSM_BPF_H
> -#define __LINUX_LSM_BPF_H
> -#include <linux/types.h>
> -
> -struct lsm_prop_bpf {
> -#ifdef CONFIG_BPF_LSM
> - u32 secid;
> -#endif
> -};
> -
> -#endif /* ! __LINUX_LSM_BPF_H */
> diff --git a/include/linux/security.h b/include/linux/security.h
> index 92ac3f27b973..b6ace332576f 100644
> --- a/include/linux/security.h
> +++ b/include/linux/security.h
> @@ -37,7 +37,6 @@
> #include <linux/lsm/selinux.h>
> #include <linux/lsm/smack.h>
> #include <linux/lsm/apparmor.h>
> -#include <linux/lsm/bpf.h>
>
> struct linux_binprm;
> struct cred;
> @@ -163,7 +162,6 @@ struct lsm_prop {
> struct lsm_prop_selinux selinux;
> struct lsm_prop_smack smack;
> struct lsm_prop_apparmor apparmor;
> - struct lsm_prop_bpf bpf;
> };
>
> extern const char *const lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1];
> --
> 2.47.3
>
More information about the Linux-security-module-archive
mailing list